01.12.2010 16:29, kernelpanic пишет:
if you are using a relative layout with b2&  b3 achored to the bottom
left/right respectively - can you then declare b1 after these in the
XML and align it above b2



You can declare b1 after b2/3 and set layout_above="@id/b2" or "b3".

http://developer.android.com/reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_above

Positioning the top edge of b1 just below the center of the screen is a bit more tricky. I wish there were settings for width/height that meant "x%" of available space.

What would work is:

<LinearLayout orientation="vertical">
<View
visibility="invisible"
layout_weight="1"/>
<RelativeLayout
layout_weight="1"
layout_marginTop="fixed offset below the center"
>
<b2/> <b3/>
<b1
layout_alignParentTop="true"
layout_above="@id/b2"
/>
</RelativeLayout>
</LinearLayout>

The invisible view is there just to take up space and push the top edge of RelativeLayout to the middle of the screen (this is done by setting equal values for layout_weight).

Then there is a top margin on the relative layout to push its top edge some more, by a fixed amount.

--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to