I would like make an UI consist with a ImageView, a button and two
TextView in a vertical LinearLayout.

But there is a problem -- my image seems consume too much screen
space.

I hope the system will left enough screen space to display two
TextView.

I also tried apply android:adjustViewBounds to the ImageView but still
has no success. android:layout_weight seems not work neither.

BTW, maxHeight works but I don't want to use it because I hope the
image will adjust its size when user change the orientation of the
device.

What I want it to look like:

+-----------------+
|+-----+ +------+ |
||img  | |button| |
||     | |      |
||     | |      | |
|+-----| +------+ |
|                 |
|Hello World      |
|Meow...          |
|                 |
+-----------------+

But what I actually get is the two TextView is totally missing.

The following is my UI XML file content, where should I check or
modifiy?


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

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
              android:orientation="vertical">

    <LinearLayout android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:orientation="horizontal">
        <ImageView android:layout_width="wrap_content"
                   android:layout_height="wrap_content"
                   android:adjustViewBounds="true"
                   android:src="@drawable/image" />

        <Button android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:text="Hello" />
    </LinearLayout>

    <LinearLayout android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:orientation="vertical">

        <TextView android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Hello World 1" />

        <TextView android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Meow..." />

    </LinearLayout>

</LinearLayout>

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