Development Environment:
Win XP + eclipse-jee-helios (version 3.6) + ADT (version 10.0.1) + Android SDK (version 10 );
Test environment for simulators and real machines: Android2.2
FrameLayout-frame Layout
The frame layout is composed of different components.
<FrameLayout>
<TextView.../> Layer 1
<TextView.../> Layer 2
</FrameLayout>
The second layer can cover one layer. This effect is generally seen on the player, as shown in the following figure:
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/100P4K37-0.png "title =" aa.png "/>
That is, the second layer is deployed on the first layer, and the two la s are superimposed. The following is an example:
1.add the moive.png image of the movie album and play. JPG image of the clicked button to the FrameLayout-> res-> drawable-hdpi folder of the project.
2. In the FrameLayout-> res-> Layout directory of the project, modify the Layout file main. xml to the frame Layout. The Code is as follows:
<?xml version="1.0" encoding="utf-8"?><FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" > <ImageView android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/moive" /> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/play" android:layout_gravity="center" /></FrameLayout>
Deploy the application on the simulator. The running result is as follows:
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/100P43109-1.png "title =" bb.png "/>
Note:ExploitationCtrl + F11You can switch the screen direction of the simulator. In the frame layout, controls are placed in superposition mode, with the upper left corner of the screen as the reference point. In the layout file main. xml, the following controls can be superimposed on the previous controls.
This article from the "Flowers bloom" blog, please be sure to keep this source http://020618.blog.51cto.com/6098149/1293419