Matt,

The second text view cannot have height = fill parent

On Oct 27, 6:23 am, Matt Raffel <[email protected]> wrote:
> I tried that :)  I created a second textview control.  It ends up
> pushing the button off the bottom of the screen.
>
> <TextView
>      android:layout_width="fill_parent"
>      android:layout_height="wrap_content"
>      android:text="@string/hello"
>      />
> <TextView
>      android:layout_width="fill_parent"
>      android:layout_height="fill_parent" <<< ---------- this will fill screen 
> and leave no room for Button
>      android:text="@string/empty_string"
>      />
> <Button
>      android:layout_width="fill_parent"
>      android:layout_height="wrap_content"
>      android:gravity="bottom"
>      android:text="@string/btn_start_game"
> />

Use a Relative Layout instead as recommended by paul. Something like
this may work ( I haven't checked - but you get the idea)

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@drawable/blankscreen"
    >
<TextView
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="@string/hello"
    />

<Button
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom ="true"
    android:text="@string/btn_start_game"
/>

</RelativeLayout>

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