1. layout_weight----------->控件占整个父布局的比重

android:orientation="vertical" android:layout_width="fill_parent"android:layout_height="fill_parent"><TextViewandroid:text="Button"android:id="@+id/button1" android:layout_width="fill_parent"android:layout_weight= "2"android:layout_height="wrap_content"></TextView><TextView android:text="Button" android:id="@+id/button2"android:layout_weight= "3"android:layout_width="fill_parent" android:layout_height="wrap_content"></TextView></LinearLayout>

效果:

android学习之textView布局文件

2.android:gravity="center_horizontal"-------》gravity指代的是控件中的内容的布局

3.android:padding="10px"------>父容器的边距

更多相关文章

  1. RelativeLayout相对布局
  2. 时钟控件AnalogClock和DigitalClock
  3. android 自动换行布局
  4. 线性布局的常用属性
  5. Android:RelativeLayout布局的相关属性介绍
  6. 安卓基本常用控件: View
  7. Android RelativeLayout布局的相对布局
  8. android-RelativeLayout实现顶部、中部、底部布局
  9. android 开发-spinner下拉框控件的实现

随机推荐

  1. Android将String转化为ArrayList
  2. 实验三 数值积分(android)
  3. Android中ComponentName的简单运用
  4. android 获得一个应用程序的启动次数,运行
  5. Android内部存储和外部存储以及缓存清理
  6. android 自定义radiobutton的样式 实现自
  7. 安卓Doubango架构的使用小结
  8. 常见Android知识点汇总
  9. Android(安卓)EditText添加数字自动加空
  10. ByteBuffer的flip,clear及rewind区别