-2

I have a listview with each list element having 2 linear layouts under a single linear layout(vertical orientation). The second linear layout is set to gone and is visible only when we click on first one and is set to gone when we again touch first one.It works fine for all list elements except the last on in the list. When I click the last element of the list which is aligned to the bottom of my tab's screen, it do not expands or show the second linear layout on touching the first one.

Jango
  • 119
  • 1
  • 1
  • 10

2 Answers2

0

Have you consider to use ExpandableListView. Here is a nice tutorial http://www.androidhive.info/2013/07/android-expandable-list-view-tutorial/

Using 2 linear layouts in a linear layout will significantly reduce the performance of your app if you have a lots of elements in your ListView

Radoslav
  • 1,446
  • 1
  • 16
  • 30
  • No an ExpandableListView is not suitable for this simple task. And i doubt there is performance reduction using some linear layouts. – greenapps Sep 24 '14 at 07:01
0

Got it by using setselection method. and by the way there was a reason for not using the well known Expandable list view.

Jango
  • 119
  • 1
  • 1
  • 10