InternationalCodingGuru
InternationalCodingGuru

Reputation: 2258

android listview row with variable number of child views

I have a ListView and each row show a number of TextViews. Some rows contain 1 TextView, while others can contain any number of TextViews, each placed below the previous.

Is there any way to create a single layout file for this, instead of creating a layout file for each case (ie, 1 layout file for the 1 TextView, another for the rows with 2 TextViews, another for the row with 3 TextViews, etc)?

Upvotes: 1

Views: 199

Answers (1)

VKDev
VKDev

Reputation: 604

you can create TextView or inflate custom layout from the code

Upvotes: 1

Related Questions