android:layout_marginLeft等的简单用法
16lz
2021-12-04
靠右显示:用 android:layout_marginLeft,意思是距离左边框的距离;
靠左显示:用android:layout_marginRight,意思是距离右边框的距离。
同理,
android:layout_marginTop: 距离上边框
android:layout_marginBottom: 距离下边框
下面,是靠右显示的例子:
android:layout_height="wrap_content"
android:layout_marginLeft="100dp"
android:layout_alignParentRight="true" // 这个可有可无
android:orientation="vertical"
>
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="timer" />
更多相关文章
- 详解android:scaleType属性
- setEmptyView
- ImageView的属性android:scaleType
- android控件之ImageButton android:scaleType
- Android(安卓)EditView 属性大全
- 2013.11.29 ——— android layout不显示布局绘图 显示空白
- android设定手机的显示模式,横竖屏,是否全屏
- Android属性
- android设定手机的显示模式,横竖屏,是否全屏