FrameLayout of Android layout
preface
As one of the simplest of the six Android layouts, the layout directly opens up a blank area on the screen,
When we add components to it, all components will be placed in the upper left corner of this area;
The size of the frame layout is determined by the largest sub control in the sub control. If all components are the same size, only the top component can be seen at the same time!
Of course, we can also add layout for components_ The gravity property, which determines how the component is treated
Frame layout is used more in game development. We will show you two interesting examples later
(-) introduction to frame layout
The frame layout container creates a blank area called a frame for each added component, and each sub component occupies a frame. These frames will be automatically aligned according to the gravity attribute
(2) Common attributes:
Android: foreground: sets the foreground image of the frame layout container
Android: foregroundgravity: set the position where the foreground image is displayed
(3) Use
The above content introduces the FrameLayout frame layout of Android layout. I hope you like it.