24.2.7
布局:login_layout.xml
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/loginbg_icon" android:orientation="vertical" android:weightSum="1"> <LinearLayout android:layout_width="match_parent" android:layout_height="400dp"></LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="100dp" android:layout_weight="0.73" android:orientation="vertical"> <EditText android:id="@+id/phone_text" android:layout_width="300dp" android:layout_height="wrap_content" android:layout_gravity="center" android:digits="0,1,2,3,4,5,6,7,8,9" android:hint="Phone" android:inputType="number" android:maxLength="11" android:textColor="@android:color/holo_blue_light" /> <EditText android:id="@+id/password_text" android:layout_width="300dp" android:layout_height="wrap_content" android:layout_gravity="center" android:digits="0,1,2,3,4,5,6,7,8,9,qwertyuiopasdfghjklzxcvbnm,_,." android:hint="Password" android:inputType="numberPassword" android:maxLength="18" android:textColor="@android:color/holo_blue_light" /> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:orientation="horizontal" android:weightSum="1"> <CheckBox android:id="@+id/remember_pass" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Remember Password" android:textColor="@android:color/holo_blue_light" /> </LinearLayout> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:orientation="horizontal" android:weightSum="1"> <Button android:id="@+id/signUp_btn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="60dp" android:background="@drawable/button_selector_draw" android:text="Sign Up" android:textAllCaps="false" android:textColor="@android:color/holo_blue_light" /> <Button android:id="@+id/signIn_btn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/button_selector_draw" android:text="Sign In" android:textAllCaps="false" android:textColor="@android:color/holo_blue_light" /> </LinearLayout> </LinearLayout> </LinearLayout>
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 【杭电多校比赛记录】2025“钉耙编程”中国大学生算法设计春季联赛(1)