There is no need at all for a second linear layout. The weight can be set 
directly on the text view. Also, your example is wrong because a weight is 
meaningless when the dimension is fill_parent. Last but not least, using 
weight causes linear layout to do two measurement passes. In a case like 
this were weight can be avoided, it's better to do so.

On Oct 2, 2008 8:48 AM, "Zachary Becker" <[EMAIL PROTECTED]> wrote:

Another option would be to put your title in a LinearLayout with weight 1 so 
that it takes up all the vertical space except for the space the button 
takes up.

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android";    
android:orientation="ve...
   <LinearLayout android:layout_width="fill_parent"

      android:layout_height="fill_parent" 
      android:layout_weight="1">

      <TextView android:layout_width="fill_parent"          
android:layout_height="wrap_content" 
         android:text="This is a Title" />

   </LinearLayout>

   <Button android:layout_width="wrap_content"       
android:layout_height="wrap_content" 
      android:layout_gravity="bottom"
      android:id="@+id/Submit"
      android:text="Button 1" />

</LinearLayout>

On Thu, Oct 2, 2008 at 8:36 AM, Cadge <[EMAIL PROTECTED]> 
wrote: > > > Ok I understa...

--~--~---------~--~----~------------~-------~--~----~ You received this 
message because you are sub...


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to