I have one list view and one expandable list view and i want to show both on same view (I can fix the height of list view but that will scroll my list inside that defined height only).
i have these below link so far but by using this method it allocation blank space although it is allocating dynamic height.
http://kk-brothers.blogspot.in/2011/09/dynamically-change-listview-height.html
Asked
Active
Viewed 71 times
0

param
- 393
- 6
- 17
-
can you please upload some screenshot. Is it like one linearlayout listview on top and expandable on bottom? – Pr38y Aug 11 '16 at 11:59
-
here is link http://prntscr.com/c4dzst – param Aug 11 '16 at 12:41
-
You can create this layout using `expandable listview` itself. You can keep some of the item expanded all the time without group icon. It is not good to use two AdapterView in one screen. It slow down screen rendering. – Pr38y Aug 11 '16 at 12:46
-
one is list view and other is expandable list view i need to allocate height for both list dynamic. you are right i should not use two adaptor but it is my requirement. do u have any suggestion or alternate solution , i need to show that way only . – param Aug 11 '16 at 12:50
-
Create expandable list view, by default open first item ingredient. set your group icon and group click listener accordingly. – Pr38y Aug 11 '16 at 12:57
-
As i said, i need the height dynamic for both list ,leave the expandable list view assume it two list view – param Aug 11 '16 at 13:00
-
http://stackoverflow.com/a/26501296/797534 – Pr38y Aug 11 '16 at 13:01
-
Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/120704/discussion-between-param-and-pr38y). – param Aug 11 '16 at 13:11
1 Answers
0
Please check padding/margin also get place in calculation. Conversion of dp into px also required. But I will request not to design like this. It will destroy recycling property of your listview/recyclerview.

Ramit
- 416
- 3
- 8