- 15
- 0
- 约5.92千字
- 约 12页
- 2016-09-18 发布于天津
- 举报
第一章 Android应用初体验
android:layout_centerHorizontal = “true” 水平居中对齐
android:layout_centerVertical = “true” 垂直居中对齐
android:layout_width和android:layout_height属性几乎每类组件都需要android:layout_width和android:layout_height属性。它们通常被设置为以下两种属性值之一。? match_parent:视图与其父视图大小相同。? wrap_content:视图将根据其内容自动调整大小。
android:orientation属性是两个LinearLayout组件都具有的属性,决定了二者的子组件是水平放置的还是垂直放置的。
vertical:垂直放置
horizontal:水平放置
android:text属性TextView与Button组件具有android:text属性。该属性指定组件显示的文字内容。
Android为整个布局文件以及各个字符串生成资源ID,但activity_quiz.xml布局文件中的组件除外,因为不是所有的组件都需要资源ID。
要为组件生成资源ID,请在定义组件时为其添加上android:id属性。
使用类包组织导入,就是让Eclipse依据代码来决定应该导入哪些J
原创力文档

文档评论(0)