I. Framelayout (frame layout) Focus:
Framelayout (frame layout) can be said to be the simplest of the five layouts, this layout will default to the control on the screen in the upper-left corner of the area, the subsequent addition of the control will overwrite the previous one, if the size of the control is as large, then the same moment can only see the top of the control
Two. Framelayout (frame layout) Common properties:
Android:foreground: Setting the foreground image of a frame-changing layout container
Android:foregroundgravity: Setting the location of the foreground image display
Three. Example:
1. First create a framelayout XML file
The code is as follows:
1 <?XML version= "1.0" encoding= "Utf-8"?>2 <Framelayoutxmlns:android= "Http://schemas.android.com/apk/res/android"3 Android:layout_width= "Match_parent"4 Android:layout_height= "Match_parent" >5 6 <TextView7 Android:layout_width= "200DP" 8 Android:layout_height= "200DP" 9 Android:background= "#FF0000" /> Ten <TextView One Android:layout_width= "150DP" A Android:layout_height= "150DP" - Android:background= "#00FFFF" /> - <TextView the Android:layout_width= "100DP" - Android:layout_height= "100DP" - Android:background= "#FFFF00" /> - + </Framelayout>
The results of the operation are as follows:
The above is my understanding of framelayout (frame layout)
One of Android five layout frame layouts (framelayout)