Android開発研究ノート(5)フレームレイアウトFrameLayout

フレームレイアウトFrameLayout、最初の効果:
ここに画像の説明を挿入します
ソースコード:

<FrameLayout
        android:id="@+id/myframe"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:layout_editor_absoluteX="1dp"
        tools:layout_editor_absoluteY="1dp">

        <TextView
            android:layout_width="200dp"
            android:layout_height="200dp"
            android:background="#44E744"/>

        <TextView
            android:layout_width="100dp"
            android:layout_height="100dp"
            android:background="#F44336"
            android:text="西电"
            android:textColor="#F4FF00"
            android:textSize="20sp"
            />

        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/testpic"></ImageView>


    </FrameLayout>

ユニットの補足知識:
ここに画像の説明を挿入します
フレームレイアウト機能:次のコンポーネントは前のレイヤーをカバーします。アニメーションを実行して
、画像を挿入するImageViewを表示できます。srcは最初に画像をドローアブルにコピーしてから参照できます。

おすすめ

転載: blog.csdn.net/qq1198768105/article/details/113823507