参阅:http://android.xsoftlab.net/reference/android/widget/FrameLayout.html
public class
FrameLayout
extends ViewGroup
Added in API level 1
java.lang.Object
↳ android.widget.FrameLayout
已知直接子类
AppWidgetHostView
BaseCardView
BrowseFrameLayout
CalendarView
CardView
CollapsingToolbarLayout
DatePicker
GestureOverlayView
HorizontalScrollView
MediaController
NavigationView
NestedScrollView
PercentFrameLayout
ScrollView
SearchOrbView
TabHost
TimePicker
TitleView
ViewAnimator
【概述】
FrameLayout设计用于屏蔽屏幕上的一个区域以显示单个项目。 通常,FrameLayout应该用于保存单个子视图,因为可能难以以可扩展到不同屏幕尺寸的方式组织子视图,而不会使子节点相互重叠。 然而,你可以添加多个孩子到FrameLayout,并通过使用android:layout_gravity属性为每个孩子分配重力来控制它们在FrameLayout中的位置。
子视图在堆栈中绘制,最近添加的子节点在顶部。 FrameLayout的大小是它最大的孩子的大小(加上填充),可见或不可见(如果FrameLayout的父允许)。 仅当setConsiderGoneChildrenWhenMeasuring()设置为true时,才使用GONE的视图进行大小调整。
【嵌套类】
类 FrameLayout.LayoutParams Frame