Android O新特性之统一的布局外边距和内边距
来源:互联网 发布:linux iscsi target 编辑:程序博客网 时间:2024/06/15 22:59
Android O已经推出了,想要去研究的童鞋可以看看这个:https://developer.android.google.cn/preview/index.html
这篇文章主要介绍一下新特性之统一的布局外边距和内边距。
我们一般在编写布局的时候,经常会用到margin和padding,比如margin_left,padding_left等等,Android O之前的版本已经有了"margin:10dp"和"padding:10dp"这样的方法来设置距离上下左右的内外边距,但是显然还有很多情况需要写很多margin_top,margin_left等等。比如我需要距离左右外边距10dp,上下内边距20dp,放在Android O之前我们怎么写:
android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:paddingTop="20dp" android:paddingBottom="20dp"Android O新增加了四个参数:
则对于上面的需求,我们可以这样写:
android:layout_marginHorizontal="10dp"
android:paddingVertical="20dp"
阅读全文
0 0
- Android O新特性之统一的布局外边距和内边距
- Android O 新特性
- Android O 新特性
- Android O新特性
- Android O 新特性
- Android新特性之ContraintLayout约束布局
- css布局之负外边距的妙用
- 内边距和外边距
- 外边距和内边距
- 内边距和外边距
- Android O新特性和行为变更总结
- Android O 新特性和行为变更总结
- Android O 新特性和行为变更总结
- 内边距、边框和外边距的关系
- android的内外边距
- android组件的外边距
- Android Studio2.2 的新特性--约束布局
- Android O 开发者预览版新特性
- rsync exclude include二级目录或子级目录
- oracle中的替换函数replace和translate函数
- Android-线程同步
- Swoole到底是个什么东西?
- 开发环境说明
- Android O新特性之统一的布局外边距和内边距
- C:\inetpub\logs\LogFiles\W3SVC1
- 设计思想
- Linux C 创建多级目录
- Python导出csv中文乱码
- 欢迎使用CSDN-markdown编辑器
- python 列表和列表解析以及排序
- matplotlib解决中文乱码问题
- spark RDD