-4

この画像 http://imgur.com/isvfTqZのように 3 つの画像ビューを水平方向に並べるにはどうすればよいですか ? この typelayout の作成方法。それはlinearlayoutまたはRelativelayoutです助けてください??? imageview と textview を水平方向に垂直方向に組み合わせるにはどうすればよいですか?

<?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:orientation="vertical" >

<ImageView
    android:id="@+id/imageView5"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginTop="92dp"
    android:background="#F9F939"
    android:src="@drawable/ic_launcher"
    android:layout_toLeftOf ="@+id/imageView6"
    android:layout_centerInParent="true"
    android:padding="15dp" />

 <ImageView
    android:id="@+id/imageView6"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="#54F71D"
    android:src="@drawable/ic_launcher"
    android:layout_centerInParent="true"
    android:padding="15dp"
    android:layout_margin="10dp" />

   <ImageView
    android:id="@+id/imageView7"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="#1DF7AB"
    android:src="@drawable/ic_launcher"
    android:layout_centerInParent="true"
    android:layout_toRightOf="@+id/imageView6"
    android:padding="15dp" />



 </RelativeLayout>
4

3 に答える 3

0

方向 = 水平で LinearLayout を使用する

于 2013-07-29T08:50:03.630 に答える
-1

Relative レイアウトを使用する場合は、android:layout_toLeftOf="+@id/img1" または android:layout_toRightOf="+@id/img1" のプロパティを使用します。それ以外の場合は、LinearLayout を使用しても問題ありません。

于 2013-07-29T09:01:49.540 に答える