layout_gravity=bottom works only in horizontal LinearLayouts. In your case, you should use a RelativeLayout. Then, on your TextView, use android:layout_alignParentTop="true" and on the Button, use android:layout_alignParentBottom="true".
On Thu, Oct 2, 2008 at 8:22 AM, Cadge <[EMAIL PROTECTED]> wrote: > > Ok I tired as you suggested replacing the line > > ----------------------------------- > android:gravity="bottom" > ----------------------------------- > > with > > > ----------------------------------- > android:layout_gravity="bottom" > ----------------------------------- > > with the rest of the code staying as it was. But it still hasn't > changed anything and the button still apears at the top. > > Any ideas? > > Cheers. > > > > On Oct 2, 1:46 pm, Mark Murphy <[EMAIL PROTECTED]> wrote: >> Cadge wrote: >> > I have a (extremely) simple app that shows some text and a button >> > which does nothing just now. As it stands the text appears with button >> > imediately below this. >> >> > What I want to do is keep the text at the top but move the button to >> > the bottom of the screen. >> >> <snip> >> >> > As you can see I have the following line in the Button tag >> >> > ----------------------------------- >> > android:gravity="bottom" >> > ------------------------------------ >> >> > I thought this would move the button to the bottom but it still >> > appears at the top of the screen under the text. >> >> You probably want android:layout_gravity="bottom". It's documented in >> LinearLayout.LayoutParams in the SDK docs. >> >> -- >> Mark Murphy (a Commons Guy)http://commonsware.com >> >> Android Training on the Ranch! -- Mar 16-20, >> 2009http://www.bignerdranch.com/schedule.shtml > > > -- Romain Guy www.curious-creature.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" 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-beginners?hl=en -~----------~----~----~----~------~----~------~--~---

