-1

I want to model my layout screen in the following 2 parts.

  1. Basic Information related Linear layout with expandable view initially 20 % of screen height.
  2. Bottom List view occupy Remaining Space.

But When the top view is expanded then i want to make it height upto 50 % and the bottom listview should start then after.

I have attached image for reference.

I have tried setting the layout_weight of top and bottom layout. But not able to find out exact solution. May be i am missing some points.

Let me know if you need more information from my end.

Thanks in Advance.

regards, Rakesh

Layout requirement

Rakesh Gondaliya
  • 1,050
  • 3
  • 25
  • 42

1 Answers1

1

Try to remove the current weight from the top view and in the listview set android:layout_weight="1" and android:layout_height="0dp". This makes the ListView to take whatever height left in the screen.

Ahmed Hegazy
  • 12,395
  • 5
  • 41
  • 64
  • thanks for your reply, But i wanted to make sure that top scoll view maximum height should not go beyond half the height of view. I did it by custom Scrollview. But your answer is correct. Thanks. – Rakesh Gondaliya Jul 28 '15 at 12:00