android:layout_marginLeft等的简单用法
16lz
2021-01-23
靠右显示:用 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去除ImageButton白色边框
- EditText自定义边框
- android 布局边框
- shape带边框的背景
- Android 怎么给图片添加一个边框
- android 背景边框变圆角
- Android:解决RadioGroup中RadioButton的图片自定义及每项间隔距离
- android线性布局控件之间的距离设置
- 【Android】Android EditText 去除边框