打卡程序登录界面
代码:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/background" android:orientation="vertical" tools:context=".MainActivity"> <LinearLayout android:layout_width="wrap_content" android:layout_height="60dp" android:layout_marginTop="20dp" android:layout_gravity="center"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:text="@string/welcome" android:textSize="28sp" android:textColor="#000000"></TextView> </LinearLayout> <RelativeLayout android:layout_width="match_parent" android:layout_height="70dp" android:layout_marginTop="200dp" android:layout_marginStart="50dp" android:layout_marginEnd="50dp"> <TextView android:id="@+id/text_1" android:layout_width="wrap_content" android:layout_height="60dp" android:text="@string/username" android:textSize="30sp" android:textColor="#000000" android:textStyle="bold"> </TextView> <EditText android:layout_width="match_parent" android:layout_height="50dp" android:layout_toEndOf="@+id/text_1"> </EditText> </RelativeLayout> <RelativeLayout android:layout_width="match_parent" android:layout_height="70dp" android:layout_marginStart="50dp" android:layout_marginEnd="50dp"> <TextView android:id="@+id/text_2" android:layout_width="wrap_content" android:layout_height="60dp" android:text="@string/userpassword" android:textSize="30sp" android:textColor="#000000" android:textStyle="bold"> </TextView> <EditText android:layout_width="match_parent" android:layout_height="50dp" android:layout_toEndOf="@+id/text_2"> </EditText> </RelativeLayout> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center"> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/login" tools:ignore="ButtonStyle"> </Button> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/register" tools:ignore="ButtonStyle"> </Button> </LinearLayout> </LinearLayout>
登录界面:
本文作者:万事胜意k
本文链接:https://www.cnblogs.com/ysk0904/p/17170180.html
版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步