android edittext email,AutoFillEmailEditText

这个博客内容涉及Android开发中自动填充邮箱编辑框(EditText)的实现。通过使用app:AutoFillEmailEditText_domains属性,可以指定邮箱域名,如@qq.com, @gmail.com等,并设置dropdown的样式属性。该功能有助于提升用户输入邮箱的便捷性。
摘要由CSDN通过智能技术生成

Auto fill the custom email to EditText

Step1

//email's domain, split ','(en) and first char must be with '/'

//drop down word color

//drop down bg

//drop down divider

Step2

android:id="@+id/et_mail"

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:layout_marginLeft="20dp"

android:layout_marginRight="20dp"

android:layout_marginTop="10dp"

android:drawablePadding="10dp"

android:hint="邮箱地址"

android:singleLine="true"

android:textSize="15sp"

app:AutoFillEmailEditText_default_drop_down_divider="true"

app:AutoFillEmailEditText_domains="/@qq.com,@gmail.com,@126.com,@163.com" //notice

/>

03586bf915f35b0eb3a75c29c2700c9a.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值