Suresh Sharma
Suresh Sharma

Reputation: 1844

How can we use Linear layout in place of a ListView

Now a days i have a requirement like i need to create a list with fixed 5(max) items or 2(min) items. I am considering the way not to implement listView but trying to implement Linear layout with dynamically added childView. The childitems are editable & clickable textViews with so i need to implement Click Listeners as well. I found many ways to handle kind of requirement but i am still confused which is the best approach so i could assure about the application performance and no backlogs. Can anybody suggest what is the best approach.

Upvotes: 0

Views: 47

Answers (1)

encastellano
encastellano

Reputation: 445

If you only need 5 items,I would use the simplest way, LinearLayout and add childs. Use a "for loop" for adding your childs and implements onClickListeners.

Upvotes: 1

Related Questions