A brief analysis of linear layout example of Android programming
This article illustrates the linear layout usage of Android programming. Share with you for your reference, as follows:
Linear layout
Its child elements can be arranged vertically or horizontally in a row (they are arranged vertically by default when the direction is not set).
The following example is main.xml modified on the basis of others:
string.xml
The renderings are as follows:
Common attributes:
Android: Orientation: you can set the orientation of the layout. Android: Gravity: it is used to control the alignment and layout of components_ Weight: controls the relative size of each component in the layout
For more information about Android programming layout, please see the special topic of our website: summary of Android layout skills
I hope this article will help you in Android programming.