Android基础TOP6_1:FrameLyayout和ImageView制作层叠图片

Activity:

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.example.top6_1.MainActivity" >

    <ImageView 
        android:layout_height="500dp"
        android:layout_width="200dp"
        android:src="@drawable/dfhgc"/>
     <ImageView 
         android:layout_marginTop="50dp"
         android:layout_marginLeft="50dp"
        android:layout_height="500dp"
        android:layout_width="200dp"
        android:src="@drawable/hgcgh"/>
     <ImageView 
           android:layout_marginTop="100dp"
         android:layout_marginLeft="100dp"
        android:layout_height="500dp"
        android:layout_width="200dp"
        android:src="@drawable/fg"/>
      <ImageView 
            android:layout_marginTop="150dp"
         android:layout_marginLeft="150dp"
        android:layout_height="500dp"
        android:layout_width="200dp"
        android:src="@drawable/jhv"/>
     
</FrameLayout>

 运行效果:

原文地址:https://www.cnblogs.com/AndroidCSY/p/6684782.html