1

2つの画像を含むレイアウトを作成する必要があります(画像ファイルを一緒に添付しています)。画像は、最初の画像が2番目の画像に重なるようにする必要があります.Androidの初心者なので、何か助けてください.実際には、無地の画像と斜めの線のある画像の 2 つの画像があります。結果の画像を次のように表示したいと考えています。ここに画像の説明を入力

4

1 に答える 1

6

次のようなフレーム レイアウトが必要です。

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
       android:orientation="vertical"
       android:layout_width="match_parent"
       android:layout_height="match_parent">
  <ImageView
            android:id="@+id/image1"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:src="@drawable/image1"/>
  <ImageView
            android:id="@+id/image2"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:src="@drawable/image2"/>

これにより、アイテムが互いの上にレイアウトされます。:)

于 2013-02-08T11:21:08.873 に答える