<requestFocus /> 登录页面的输入框焦点取消方法
来源:互联网 发布:适合大学生交友软件 编辑:程序博客网 时间:2024/06/13 11:30
登录页面的输入框焦点取消方法:
<?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" android:layout_gravity="center"> <RelativeLayout android:layout_width="match_parent" android:layout_height="467dp" android:layout_centerInParent="true" android:focusable="true" android:focusableInTouchMode="true" android:visibility="visible"> <requestFocus/> <RelativeLayout android:id="@+id/rl_top" android:layout_width="305dp" android:layout_height="360dp" android:layout_centerHorizontal="true" android:background="@drawable/shape_round_white_btn_5dp" android:paddingLeft="19dp" android:paddingRight="19dp"> <TextView android:id="@+id/loginPocketScore" android:layout_width="wrap_content" android:layout_height="36dp" android:layout_marginTop="30dp" android:gravity="center" android:text="登录口袋比分" android:textColor="@color/text_normal" android:textSize="25sp"/> <ImageView android:id="@+id/cancel_btn" android:layout_width="36dp" android:layout_height="36dp" android:layout_alignParentRight="true" android:layout_marginTop="30dp" android:padding="8dp" android:scaleType="fitCenter" android:src="@drawable/cancel"/> <ImageView android:id="@+id/phone" android:layout_width="19dp" android:layout_height="19dp" android:layout_below="@+id/loginPocketScore" android:layout_marginTop="35dp" android:scaleType="fitCenter" android:src="@drawable/phone"/> <EditText android:id="@+id/editPhone" android:layout_width="200dp" android:layout_height="29dp" android:layout_below="@+id/loginPocketScore" android:layout_marginLeft="@dimen/border" android:layout_marginTop="30dp" android:layout_toRightOf="@+id/phone" android:background="@null" android:gravity="center_vertical" android:hint="请输入手机号" android:paddingBottom="5dp" android:paddingTop="5dp" android:textColor="@color/text_normal" android:textColorHint="@color/text_desc" android:textSize="@dimen/text_normal_size"/> <View android:id="@+id/view" android:layout_width="match_parent" android:layout_height="1px" android:layout_below="@+id/phone" android:layout_marginTop="15dp" android:background="@color/underline"/> <ImageView android:id="@+id/password" android:layout_width="19dp" android:layout_height="19dp" android:layout_below="@+id/view" android:layout_marginTop="22dp" android:scaleType="fitCenter" android:src="@drawable/password"/> <EditText android:id="@+id/editPwd" android:layout_width="200dp" android:layout_height="29dp" android:layout_below="@+id/view" android:layout_marginLeft="@dimen/border" android:layout_marginTop="15dp" android:layout_toRightOf="@+id/phone" android:background="@null" android:gravity="center_vertical" android:hint="请输入密码" android:inputType="textPassword" android:paddingBottom="5dp" android:paddingTop="5dp" android:textColor="@color/text_normal" android:textColorHint="@color/text_desc" android:textSize="@dimen/text_normal_size"/> <ImageView android:id="@+id/readPwd" android:layout_width="29dp" android:layout_height="29dp" android:layout_alignParentRight="true" android:layout_below="@+id/view" android:layout_marginTop="15dp" android:padding="5dp" android:scaleType="fitCenter" android:src="@drawable/view"/> <View android:id="@+id/view1" android:layout_width="match_parent" android:layout_height="1px" android:layout_below="@+id/editPwd" android:layout_marginTop="15dp" android:background="@color/underline"/> <TextView android:id="@+id/register" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/view1" android:layout_marginLeft="14dp" android:layout_marginTop="20dp" android:text="立即注册" android:textColor="#077be7" android:textSize="@dimen/text_normal_size"/> <TextView android:id="@+id/forgetPwd" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_below="@+id/view1" android:layout_marginRight="14dp" android:layout_marginTop="20dp" android:text="忘记密码?" android:textColor="@color/text_desc" android:textSize="@dimen/text_normal_size"/> <Button android:id="@+id/loginBtn" android:layout_width="281dp" android:layout_height="45dp" android:layout_below="@+id/register" android:layout_marginTop="20dp" android:background="@drawable/shape_round_light_black_btn_20dp" android:text="登录" android:textColor="@color/white" android:textSize="@dimen/text_max_size"/> <TextView android:id="@+id/protocol" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/loginBtn" android:layout_centerHorizontal="true" android:layout_marginTop="@dimen/border" android:ellipsize="end" android:gravity="center" android:text="绑定后意味着同意口袋比分《使用协议》" android:textColor="@color/text_normal" android:textSize="@dimen/text_small_size"/> </RelativeLayout> <TextView android:id="@+id/otherLogin" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/rl_top" android:layout_centerHorizontal="true" android:layout_marginTop="17dp" android:ellipsize="end" android:gravity="center" android:text="你还可以用以下方式登录" android:textColor="@color/white" android:textSize="@dimen/text_small_size"/> <LinearLayout android:layout_width="230dp" android:layout_height="46dp" android:layout_below="@+id/otherLogin" android:layout_centerHorizontal="true" android:layout_marginTop="25dp" android:gravity="center_horizontal|bottom"> <ImageView android:id="@+id/weibo" android:layout_width="46dp" android:layout_height="46dp" android:layout_alignParentLeft="true" android:layout_weight="1" android:src="@drawable/weibo"/> <ImageView android:id="@+id/QQ" android:layout_width="46dp" android:layout_height="46dp" android:layout_weight="1" android:src="@drawable/qq"/> <ImageView android:id="@+id/weixin" android:layout_width="46dp" android:layout_height="46dp" android:layout_weight="1" android:src="@drawable/weixin"/> </LinearLayout> </RelativeLayout></RelativeLayout>
阅读全文
0 0
- <requestFocus /> 登录页面的输入框焦点取消方法
- 进入页面EditText取消焦点防止自动弹出输入框
- android 取消输入框焦点
- java GUI中JTextField的requestFocus()方法获取不到焦点
- Android EditText 的<requestFocus />用于点击tab键或enter键焦点自动进入下一个输入框
- 水晶报表页面打开数据库登录框提示取消方法
- 点击页面其他地方取消EditText的焦点并且隐藏软键盘的方法
- 方向键和回车控制Web页面的输入框焦点
- 方向键和回车控制Web页面的输入框焦点
- ADFS 3.0登录页面不用输入域名的实现方法
- ADFS 3.0登录页面不用输入域名的实现方法
- 手机页面输入框获取焦点
- 输入框获取焦点,页面放大解决方法
- 输入框的获取焦点、失去焦点
- 如何设置win10登录不需输入开机密码_?win10开机密码取消的方法
- requestFocus标签的使用(为控件设置焦点)
- EditText获取输入焦点的方法
- android 取消Edittext焦点,防止输入栏
- FFmpeg:常见结构体的初始化和销毁(AVFormatContext,AVFrame等)——雷神神文
- 动态代理的一个比较优雅的实例
- Android客户端与服务器交互方式(2)
- 多重背包的二进制优化
- 【贪心】17.6.1 漂流 题解
- <requestFocus /> 登录页面的输入框焦点取消方法
- VS中def文件对于生成dll和lib文件的作用
- 数据库学习(1)
- Column ' ' in where clause is ambiguous
- AndroidStudio建立完整JNI开发工程流程及Java通过JNI调用C函数
- IntelliJ IDEA Ultimate 2017激活方法
- Struts2+Spring3整合项目时遇到的一个问题
- 半编译半解释型语言
- Nginx服务器配置PHP