android:layout_height="match_parent"和android:layout_marginTop="100dp"同时作用
来源:互联网 发布:dnf 登陆器源码 编辑:程序博客网 时间:2024/05/19 23:19
如果同时设置android:layout_height="match_parent" 和 android:layout_marginTop,会怎么样?
xml文件
<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/activity_margi_top_test" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" android:background="@android:color/holo_green_light" tools:context="com.peggy.winastest.MargiTopTest"><LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginTop="100dp" android:background="@android:color/holo_blue_light"></LinearLayout></RelativeLayout>
结果如下
说明,marginTop =100dp 的基础上填充parent。
0 0
- android:layout_height="match_parent"和android:layout_marginTop="100dp"同时作用
- AidlTokenType.import or android:layout_height="match_parent"
- Android Scrollview 内部组件android:layout_height="match_parent"无效的解决办法
- android ListView条目的子布局设置android:layout_height="match_parent"无效
- ScrollView嵌套LinearLayout设置android:layout_height="match_parent"没效果解决
- 在Scrollview中布局中设置android:layout_height="match_parent"无效
- android:layout_width="match_parent"
- 关于android:layout_weight=0.0dp android:layout_width=0.0dp android:layout_height=0.0dp 的问题
- RelativeLayout中的子view的layout_height="match_parent"不管用
- android:layout_width="match_parent"和 android:layout_width="wrap_content"
- Android 布局 fill_parent、wrap_content和match_parent的区别和作用
- Android 布局 fill_parent、wrap_content和match_parent的区别和作用
- TabHost和android:layout_height="0.0dip"以及android:layout_weight配合在布局中的使用
- TabHost和android:layout_height="0.0dip"以及android:layout_weight配合在布局中的使用
- TabHost和android:layout_height="0.0dip"以及android:layout_weight配合在布局中的使用
- Android fill_parent、wrap_content和match_parent
- RecyclerView android:layout_width="match_parent"无效
- RecyclerView android:layout_width="match_parent"无效解决方法
- android 模拟触摸板控制鼠标(解决小屏幕控制大屏幕)
- Mybatis高级应用-嵌套查询association和collection
- 屏幕适配的前世今生
- 第三十六套
- python使用heapq实现小顶堆(TopK大)/大顶堆(BtmK小)
- android:layout_height="match_parent"和android:layout_marginTop="100dp"同时作用
- DevExpress 编辑GridControl中合并单元格
- Bootstrap 网格系统
- Tinker热修复学习笔记
- 团战可以输、提莫必须死
- bgsave出错原因分析
- JavaScript基础
- 【OA】——hibernate映射关系编写技巧
- java 处理人民日报98年语料库处理复合标注词