Skip to content

Instantly share code, notes, and snippets.

Created August 4, 2021 06:27
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
class ExpandableStackViewAdapter(
private val models: List<String>,
private val context: Context
) : BaseAdapter() {
override fun getCount(): Int = models.size
override fun getItem(position: Int): String = models[position]
override fun getItemId(position: Int): Long = position.toLong()
override fun getView(position: Int, convertView: View?, parent: ViewGroup?): View {
val view = LayoutInflater.from(context).inflate(R.layout.card, parent, false)
view.findViewById<AppCompatTextView>( = position.toString()
return view
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment