使用容器

容器可以将一批部件组成特定的结构。

盒模型LinearLayout RelativeLayout规则模型 TableLayout网格模型

盒模型LinearLayout

将部件按行或列对齐排放

5个特性:方向(android:orientation android:horizontal)、填充模型(必须设置android:layout_width android:layout_height)、权重(android:layout_weight)、对齐、内边距(android:padding)

相对布局RelativeLayout规则模型

属性:android:layout_alignParentTop android:layout_alignParentBottom android:layout_alignParentLeft

android:layout_alignParentRight

android:layout_centerHorizontal android:layout_centervertical

android:layout_centerInparent

@+id/...:表述为元素添加标识符

@id/...:表述为元素引用

TableLayout网格模型

TableLayoutRableRow配合使用

android:layout_span可以让一个部件占用多个单元格

滚动

ScrollView滚动屏幕

XML中,ScrollView在最外侧即可

更多相关文章

  1. Android入门教程四十二之GridView(网格视图)的基本使用
  2. 【安卓开发】UI设计基础4:用网格布局 GridLayout 实现计算器UI
  3. android 小部件 AndroidManifest.xml
  4. Android 进程和线程模型
  5. [Android] Android进程和线程模型

随机推荐

  1. Android: TextView常用属性的用法详解
  2. 在eclipse的android工程里引用android sd
  3. Android(安卓)上Camera分析
  4. 使用html,javascript,css,phonegap创建开
  5. android系统定制从听说到入门二
  6. Android面试基础
  7. android基础知识03——事件处理01:主要事
  8. Android架构分析之Android消息处理机制(一
  9. android 跑马灯
  10. android VelocityTracker简单用法