tags:

views:

94

answers:

1

In a RelativeLayout I have a Button to the right of a TextView. The problem is that the text view gets squished to the left of the screen. I want the Button to be squished to the right and the TextView take up all the remaining space. I can't use 'Fill Layout' on the TextView because the button then gets removed from the View completely.

How do I do this?

+2  A: 

Give your TextView android:layout_weight="1".

RickNotFred
RelativeLayout does not have layout_weight in the eclipse xml editor. I am running SDK 5
jax
Sorry, use a LinearLayout instead. You can always place a "LinearLayout" within a "RelativeLayout" if this is what you need to do to line everything else up.
RickNotFred
oh yeah. good idea I will try that out
jax