Last active
September 21, 2019 00:40
-
-
Save hjiee/a8ef8e9943610981d95d9522d656b078 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ListViewAdapter( | |
private val layoutResId : Int, | |
private val items : List<String> | |
) : BaseAdapter() { | |
// .. 중략 | |
override fun getView(position: Int, view: View?, parent: ViewGroup?): View? { | |
var convertView = view | |
if(convertView == null) { | |
convertView = LayoutInflater.from(parent?.context).inflate(layoutResId, parent, false) | |
} | |
convertView?.tv_item?.text = items[position] | |
return convertView | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment