Daniel,
LinearLayout arranges objects top to bottom (if the orientation is
vertical).
Because of this, the next-to-last view has to be tall enough to push the
last view to the bottom.
The trick is to use layout_weight with that view, which means "take up
any extra space left in the parent".
<LinearLayout orientation="vertical">
<SomeViewAboveTheLL
layout_width="fill_parent"
layout_height="wrap_content"
*layout_weight="1"*
...
/>
<LinearLayout
this will be pushed to the bottom
/>
/>
http://developer.android.com/resources/tutorials/notepad/notepad-ex2.html
(see step 7)
Another way to is to put your LL view inside a RelativeLayout (instead
of LinearLayout). You can then set layout_alignParentBottom="true" for
the LL view:
http://developer.android.com/reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_alignParentBottom
-- Kostya
30.11.2010 0:08, Droid ?????:
I think I used a scrollview and placed some more objects below that.
I remember it worked. Take me too long to dig it out of my sources
haystack though.......
On Nov 26, 8:17 pm, Daniel<[email protected]> wrote:
Hi all,
I have a horizontal linear layout object that contains a row of
ImageViews.
I would like to keep this layout with the images at the bottom of the
screen when displayed. What is the best way to do this and can you
list some example code?
I tried the following and it did work - I had a vertical linear layout
object, added a TextView to it, and then added my other linear layout
object with the images. In my LL object with images, I set the gravity
to BOTTOM like this:
optionsLayout.setGravity(Gravity.BOTTOM);
However, the LL with images did not go to the bottom of the screen.
Also, is there anything like a BorderLayout (Java Swing) that is
available in Android, or example code that simulates the BorderLayout?
Thank you in advance!
--
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en