<?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:屏幕自适应
  2. Android 屏幕实现上下翻转
  3. Android设定屏幕只竖屏或只横屏的两种方式
  4. Android显示调用App内部组件/第三方App内组件
  5. Android 解决setRequestedOrientation之后手机屏幕的旋转不触发o
  6. Android之屏幕切换使用技巧
  7. Android 中屏幕点击事件的实现

随机推荐

  1. 设置当TextView中的文字超过TextView的容
  2. ShareSDK for Android常见问题汇总(一)
  3. Android中CountDownTimer 实现倒计时功能
  4. Android(安卓)LayoutInflater.inflate()
  5. Android关闭系统锁屏
  6. android日期选择控件
  7. Android播放音频的两种方式
  8. android xt910 救砖攻略
  9. Android(安卓)view触摸反馈原理和源码分
  10. android拨打电话二三事