通过L1的课程,巩固了ViewGroup,LinearLayout,RelativeLayout,Magin,Pading的知识。
LinearLayout线性布局,通过android:orientation="vertical"设置布局为垂直方向或者android:orientation="horizontal"设置布局为水平方向。
Relativelayout相对布局,布局时需要考虑里面控件和Relativelayout布局之间的相对位置或者几个控件之间的相对位置进行布局。能用Linearlayout的布局就不要用Relativelayout,LinearLayout线性布局,使用权重可以巧妙布局。
Magin是控件相对于其父控件的内边距,Pading是控件内容相对于控件本身的内边距。
转载请注明原文地址: https://ju.6miu.com/read-8254.html