-1

画面の半分を分割する方法?? このレイアウトの下に画像を追加するにはどうすればよいですか? これは全画面をキャプチャします。このレイアウトに、いくつかのテキストビューまたは画像を含むもう 1 つのレイアウトを追加したいのですが、どうすればよいですか? 全画面表示を半分にして、このレイアウトの下に新しい latout を追加したいのですが、どうすればいいですか?? この画像のように http://imgur.com/dlXCoCu しかし、画面は次のように見えます http://imgur.com/4WRxONf

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/db1_root"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#333333"
android:orientation="horizontal" >

<LinearLayout
    android:layout_width="0dp"
    android:layout_height="match_parent"
    android:layout_marginBottom="1dp"

    android:layout_marginTop="1dp"
    android:layout_weight="1"
    android:background="#ffffff"
    android:orientation="vertical" >

    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="0.3"
        android:paddingLeft="1dp"
        android:src="@drawable/ic_launcher" />

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="20dp"
        android:layout_weight="0.1"
        android:paddingTop="5dp"
        android:text="CONTAINS"
        android:textColor="#000000"
        android:textSize="10dip" />





     <com.schoollunchapp.HorizontalListView
           android:id="@+id/listview"
           android:layout_width="wrap_content"
           android:layout_height="0dp"
              android:layout_weight="0.6"

           android:background="#ddd" >

</com.schoollunchapp.HorizontalListView>








 </LinearLayout>

 <TextView
    android:id="@+id/imageView1"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_weight="1"
    android:paddingLeft="1dp"
    android:textColor="#ffffff"
    android:text="kurdfgkjdfuhfudshfkdshfdfhs
 kdjhfjdshfkjdshfkdshfkshjdhfskjhfksdhfksjhfkjsdhfkjsdhfk
 jshfshfshfdshdfshdkjfhsafkjsahdfksahdf" />

4

1 に答える 1

0

コンテナレイアウト内にネストされ、指定された別の線形レイアウトにTextViewを配置しようとしましたか

android:layout_weight="1"

? この SO questionもご覧ください。

于 2013-07-17T17:29:08.750 に答える