Hızlı yanıt: kod örneği
Parameter variable cannot be re-assigned, you will need to create a local variable to hold your returned view:
override fun getView(position: Int, convertView: View?, parent: ViewGroup): View? { var holder: ViewHolder var retView: View if(convertView == null){ retView = vi.inflate(resource, null) holder = ViewHolder() holder.image = retView.findViewById(R.id.myImage) as ImageView? retView.tag = holder } else { holder = convertView.tag as ViewHolder retView = convertView } return retView}