1. Preface
The analysis of this demo is based on the analysis of the API demos of mapdigit.ArticleI further analyzed related knowledge points based on him.
2. Demo Effect
3. Demo Analysis
Hello World layout definition:
<Textview xmlns: Android = "http://schemas.android.com/apk/res/android"
Android: Id = "@ + ID/text"
Android: layout_width = "match_parent"
Android: layout_height = "match_parent"
Android: gravity = "center_vertical | center_horizontal"
Android: text = "@ string/hello_world"/>
In the apidemo example, place Hello world in the middle of the screen. Gravity is similar to alignment on other platforms ).
4. Video Explanation:
Http://www.eyeandroid.com/thread-9756-1-1.html
5. We learned this demo:
1. also talk about layout_gravity and gravity
Http://www.eyeandroid.com/thread-8583-1-1.html
2. Differences between Android: layout_gravity and Android: gravity
Http://www.eyeandroid.com/thread-8582-1-1.html