<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:layout_width="fill_parent"    android:layout_height="fill_parent"    android:paddingLeft="16dp"    android:paddingRight="16dp"    android:orientation="vertical" >    <EditText        android:layout_width="fill_parent"        android:layout_height="wrap_content"        android:hint="@string/to" />    <EditText        android:layout_width="fill_parent"        android:layout_height="wrap_content"        android:hint="@string/subject" />    <EditText        android:layout_width="fill_parent"        android:layout_height="0dp"        android:layout_weight="1"        android:gravity="top"        android:hint="@string/message" />    <Button        android:layout_width="100dp"        android:layout_height="wrap_content"        android:layout_gravity="right"        android:text="@string/send" /></LinearLayout>

第三个组件因为设置了layout_weight,会随着屏幕的大小变化自动伸缩;没有设置layout_weight的将不会变化。

更多相关文章

  1. android给listview设置分割线Divider样式
  2. Android设置上下边框或者左右边框
  3. Android实现自定义的 时间日期 控件
  4. Android(安卓)关于WebView的相关属性
  5. android webview 使用
  6. ToolBar的使用
  7. android.inputmethodservice.KeyboardView 自定义键盘 字体大小
  8. Notes on the implementation of encryption in Android(安卓)3.
  9. Android(安卓)获取经纬度。2018年写

随机推荐

  1. 安装|卸载apk文件在Android仿真器中
  2. Android中手机声音调节步骤(Android学习随
  3. Linux 下Android(安卓)开发环境搭建
  4. android 中超出屏幕宽度的字符 省略号显
  5. AndroidVirtual Devices (AVD)创建、设置
  6. 面试题5:椭圆里面有个内切圆,内切圆中有文
  7. Android(安卓)8.1 关机充电动画(三)Android
  8. 8 Android平台开发-WIFI 驱动移植 -- 详
  9. Android(安卓)FDE 加密过程
  10. Android学习笔记06:线性布局LinearLayout