C C++最全安卓布局——注册页面_安卓布注册登录页面(3),2024年最新保准看明白

img
img

网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。

需要这份系统化的资料的朋友,可以添加戳这里获取

一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!

android中的hint属性;
输入框 指定提示语
gravity 这个英文单词是重心的意思,在这里就表示停靠位置的意思。
android:gravity 是设置该view里面的内容相对于该view的位置,例如设置button里面的text相对于view的靠左,居中等位置。(也可以在Layout布局属性中添加,设置Layout中组件的位置)。
android:gravity只对该组件内的东西有效
Padding 为内边框,指该控件内部内容,如文本/图片距离该控件的边距
Margin 同级控件之间的距离,不是子控件边框与父控件边框的距离
如果左右上下都是相同的设置则可以直接设置
android:layout_margin="10dip" 
android:padding="5dip"
安卓android:contentDescription
这时用户点击这个控件。android系统会自动使用人声朗读控件上android:contentDescription属性说指向的内容。

这样用户就可以知道这个控件是做什么用的。

这个属性的主要功能就是为视力有障碍的人增加对控件的解释。
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
 android:layout\_width="match\_parent"
 android:layout\_height="match\_parent" >

    <LinearLayout 
 android:id="@+id/regist\_username" 
 android:layout\_width="match\_parent"
 android:layout\_height="wrap\_content"
 android:layout\_centerHorizontal="true"
 android:layout\_marginLeft="10dp"
 android:layout\_marginRight="10dp"
 android:layout\_marginTop="22dp"
 android:orientation="horizontal">
        <TextView 
 android:id="@+id/tv\_yonghu"
 android:layout\_width="80dp"
 android:layout\_height="wrap\_content"
 android:gravity="right"
 android:paddingRight="5dp"
 android:text="用户名:"/>
        <EditText 
 android:id="@+id/et\_usenames"
 android:layout\_width="match\_parent"
 android:layout\_height="wrap\_content"
 android:hint="请输入你的用户名"
 android:textSize="14dp"
 />
    </LinearLayout>
    <LinearLayout 
 android:id="@+id/pass\_name" 
 android:layout\_width="match\_parent"
 android:layout\_height="wrap\_content"
 android:layout\_centerHorizontal="true"
 android:layout\_below="@+id/regist\_username"
 android:layout\_marginLeft="10dp"
 android:layout\_marginRight="10dp"
 android:layout\_marginTop="5dp"
 android:orientation="horizontal"
 >
        <TextView 
 android:id="@+id/tv\_mima"
 android:layout\_width="80dp"
 android:layout\_height="wrap\_content"
 android:gravity="right"
 android:paddingRight="5dp"
 android:text="密 码:"
 />
        <EditText 
 android:id="@+id/et\_passmima"
 android:layout\_width="match\_parent"
 android:layout\_height="wrap\_content"
 android:hint="请输入你的密码"
 android:textSize="14dp"
 />
    </LinearLayout>
    <RadioGroup 


![img](https://img-blog.csdnimg.cn/img_convert/c5701093d2b586898ef61f970683c68d.png)
![img](https://img-blog.csdnimg.cn/img_convert/fff9c6034c3df713f8f64f7fd8ff76cb.png)

**网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。**

**[需要这份系统化的资料的朋友,可以添加戳这里获取](https://bbs.csdn.net/topics/618668825)**


**一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!**

5)**


**一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!**

  • 3
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值