How to make a layout to fill the space until another layout at the bottom

Viewed 1924

Ilutration:

"----" indicates a Layout area

"...." indicates another Layout area

<-------------------->
<----<TextView_1>---->
<-------------------->
<-<..<TextView_a...>-> 
<-<...          ...>->
<-<...          ...>->
<-<...         >...>->
<-<................>->
<-<................>->
<-<................>->
<-<..*layout_end*..>->
<-------------------->
<----<TextView_2----->
<-----         >----->
<-------------------->

The content of the "...." layout is just TextView_a, that isn't big enough to fill until the *layout_end*.

If I put match_parent in the "...." layout, the TextView_2 doesn't appear. Like this:

<-------------------->
<----<TextView_1>---->
<-------------------->
<-<..<TextView_a...>-> 
<-<...          ...>->
<-<...          ...>->
<-<...        />...>->
<-<................>->
<-<................>->
<-<................>->
<-<................>->
<-<................>->
<-<................>->
<-<................>->
<-<..*layout_end*..>->

I need to "...." layout fills the space, but leave a space just for the TextView_2. What can I do to have the hight result? That result:

<-------------------->
<----<TextView_1>---->
<-------------------->
<-<..<TextView_a...>-> 
<-<...          ...>->
<-<...          ...>->
<-<...         >...>->
<-<................>->
<-<................>->
<-<................>->
<-<..*layout_end*..>->
<-------------------->
<----<TextView_2----->
<-----         >----->
<-------------------->

Right: http://s30.postimg.org/f63iski0h/correto.png Wrong: http://s11.postimg.org/jdq8al71f/incorreto.png

4 Answers
Related