I need help with my android app. I need inflate a layout within another layout and I dont know how I do. My xml code is this:
item.xml - I need inflate mult
Kotlin code to do so:
val layoutToInflate =
this.layoutInflater.inflate(R.layout.ly_custom_layout,
null)
container_destacado.addView(layoutToInflate )
in Kotlin with editable textview elements on item.xml
val item = LayoutInflater.from(this).inflate(R.layout.item,null)
val distance_N1_holder = item.findViewById<TextView>(R.id.distance_N1)
distance_N1_holder.text = //dynamically generated value
main.addView(item)