android:paddingLeft和android:layout_marginLeft区别:
16lz
2021-12-04
android:paddingLeft和android:layout_marginLeft区别:(转载)
android:paddingLeft和android:layout_marginLeft区别:
当你在LinearLayout中分别设置 android:layout_marginLeft="52dip"和android:paddingLeft="52dip"的 时候,也许你在及时显示界面看到的效果是一样的,但是这两个属性是有区别的,android:layout_marginLef是设置整个布局离左边的距 离是52像素,而android:paddingLeft是设置布局里面的内容距离左边是52像素,这个是可以验证的哦,你对一个EditText来分别 设置这两个属性,你会发现当设android:paddingTop="20dip"的时候在界面上跟本就没什么效果,但是输入内容就看出来了,怎么样?
更多相关文章
- TextView控件的使用(Android设置文本显示格式)
- Android学习笔记(九):Activity-RelativeLayout
- textAppearance的属性设置
- UI知识累积
- android学习笔记(二)——textAppearance的属性设置
- Android技能树 — Drawable小结
- TextView 的点击事件
- Android(安卓)设置文字水平滚动
- android中控件属性大全