靠右显示:用 android:layout_marginLeft,意思是距离左边框的距离;

靠左显示:用android:layout_marginRight,意思是距离右边框的距离。


同理,

android:layout_marginTop: 距离上边框

android:layout_marginBottom: 距离下边框


    

下面,是靠右显示的例子:

                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="100dp"
                android:layout_alignParentRight="true"   // 这个可有可无
                android:orientation="vertical"
                 >


                                    android:id="@+id/text_timer"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="timer" />
           

更多相关文章

  1. android去除ImageButton白色边框
  2. EditText自定义边框
  3. android 布局边框
  4. shape带边框的背景
  5. Android 怎么给图片添加一个边框
  6. android 背景边框变圆角
  7. Android:解决RadioGroup中RadioButton的图片自定义及每项间隔距离
  8. android线性布局控件之间的距离设置
  9. 【Android】Android EditText 去除边框

随机推荐

  1. 为什么mysql字段要使用NOT NULL
  2. MySQL表字段时间设置默认值
  3. MySQL中你可能忽略的COLLATION实例详解
  4. MySql新手入门的基本操作汇总
  5. 浅谈mysql执行过程以及顺序
  6. mysql 8.0.24版本安装配置方法图文教程
  7. MySQL 如何分析查询性能
  8. mysql 8.0.24 安装配置方法图文教程
  9. 如何用Navicat操作MySQL
  10. MySQL EXPLAIN输出列的详细解释