RelativeLayout加上android:layout_alignParentBottom="true"让某一部分靠最底部
2016-03-02 19:06
519 查看
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <Button android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="2" android:text="1/4"/> <Button android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1" android:text="1/2"/> <Button android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="2" android:text="1/4"/> </LinearLayout> <EditText android:layout_width="match_parent" android:layout_height="match_parent" android:text="EditText(充满下方和上方按钮之间的所有屏幕)" /> <Button android:layout_width="match_parent" android:layout_height="wrap_content" android:text="按钮" android:layout_alignParentBottom="true"/> </RelativeLayout>
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE); //一定要在setContentView之前调用
setContentView(R.layout.activity_main);
}
相关文章推荐
- 寻找屏幕上的点击位置--Queen核心技术分享
- question_009-JAVA之Set之HashSet???
- ZOJ 3601 Unrequited Love(模拟)
- 获取设备的唯一标识uuid
- Arduino通信协议设计
- iOS UIViewAinmation 坑
- IOS开发 多线程编程 - NSOperationQueue
- Java中break、continue、return语句的使用区别
- Poj 2785 4 Values whose Sum is 0【二分查找】
- nrf51822添加UUID
- UITableView表索引的颜色设置
- [LeetCode] Unique Paths 题解
- Qt浅谈之四十六QemuQuestAgent的应用
- 动态修改UINavigationBar的背景色
- EasyUI 创建简单窗口
- build.xml: 21: Class not found: javac1.8
- 使用UIAlterView时设置window问题
- 【杭电oj】1509 - Windows Message Queue(优先队列)
- 一般的UI工作流程
- UI 设计的整个工作流程是怎样的?