处理登录也得样式问题

This commit is contained in:
lifei 2026-05-30 17:12:08 +08:00
parent ec90300ea7
commit c317d05e6e
7 changed files with 281 additions and 107 deletions

View File

@ -1,7 +1,8 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:angle="45"
android:endColor="#004A8F"
android:startColor="#001F3F"
android:angle="135"
android:startColor="#020810"
android:centerColor="#051120"
android:endColor="#091D35"
android:type="linear" />
</shape>

View File

@ -1,4 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#3B82F6" />
<corners android:radius="8dp" />
<gradient
android:angle="0"
android:startColor="#0055AA"
android:endColor="#00AAEE"
android:type="linear" />
<corners android:radius="2dp" />
<stroke android:width="1dp" android:color="#00CFFF" />
</shape>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@android:color/transparent" />
<corners android:radius="2dp" />
<stroke android:width="1dp" android:color="#1A4A6B" />
</shape>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="#00BFFF" />
</shape>

View File

@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#FFFFFF" />
<corners android:radius="8dp" />
<solid android:color="#0D2035" />
<corners android:radius="2dp" />
<stroke android:width="1dp" android:color="#1A4A6B" />
</shape>

View File

@ -1,5 +1,18 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#22FFFFFF" />
<corners android:radius="12dp" />
<stroke android:width="1dp" android:color="#44FFFFFF" />
</shape>
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 深色半透明背景 -->
<item>
<shape>
<solid android:color="#D0071525" />
<corners android:radius="4dp" />
</shape>
</item>
<!-- 青色发光边框 -->
<item>
<shape>
<solid android:color="@android:color/transparent" />
<stroke android:width="1dp" android:color="#00BFFF" />
<corners android:radius="4dp" />
</shape>
</item>
</layer-list>

View File

@ -3,10 +3,9 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg_login"
android:padding="20dp">
android:background="@drawable/bg_login">
<!-- 服务器配置入口 (右上角) -->
<!-- 服务器配置入口(右上角) -->
<ImageView
android:id="@+id/iv_settings"
android:layout_width="40dp"
@ -15,138 +14,280 @@
android:layout_marginTop="10dp"
android:padding="8dp"
android:src="@android:drawable/ic_menu_manage"
android:tint="#2A6A8A"
android:contentDescription="配置服务器" />
<!-- 顶部标题 -->
<!-- 顶部 LOGO + 标题区域 -->
<LinearLayout
android:id="@+id/ll_header"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:layout_marginTop="28dp"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="80dp"
android:layout_height="80dp"
android:src="@drawable/ic_fire_logo" />
<!-- LOGO + 两侧装饰线 -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<View
android:layout_width="50dp"
android:layout_height="1dp"
android:background="#00BFFF" />
<View
android:layout_width="5dp"
android:layout_height="5dp"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:background="@drawable/shape_dot_accent" />
<ImageView
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:src="@drawable/ic_fire_logo"
android:contentDescription="Logo" />
<View
android:layout_width="5dp"
android:layout_height="5dp"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:background="@drawable/shape_dot_accent" />
<View
android:layout_width="50dp"
android:layout_height="1dp"
android:background="#00BFFF" />
</LinearLayout>
<!-- 系统名称 -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="消防值守台"
android:textColor="#FFFFFF"
android:textColor="#00CFFF"
android:textSize="26sp"
android:textStyle="bold" />
android:textStyle="bold"
android:letterSpacing="0.15" />
<!-- 英文副标题 -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="FIRE WATCH MONITORING PLATFORM"
android:textColor="#2A6A8A"
android:textSize="10sp"
android:letterSpacing="0.1" />
</LinearLayout>
<!-- 登录卡片(居中) -->
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true">
<LinearLayout
android:id="@+id/login_card"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@drawable/shape_login_box"
android:elevation="8dp"
android:gravity="center_horizontal"
android:orientation="vertical"
android:padding="30dp"
android:padding="28dp"
app:layout_constraintWidth_max="450dp"
app:layout_constraintWidth_default="percent"
app:layout_constraintWidth_percent="0.85"
app:layout_constraintWidth_percent="0.88"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent">
<TextView
android:layout_width="wrap_content"
<!-- 卡片标题(带装饰线) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="25dp"
android:text="用户登录"
android:textColor="#FFFFFF"
android:textSize="20sp" />
android:gravity="center_vertical"
android:orientation="horizontal"
android:layout_marginBottom="20dp">
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1"
android:background="#1A4A6B" />
<View
android:layout_width="4dp"
android:layout_height="4dp"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:background="@drawable/shape_dot_accent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:text="用 户 登 录"
android:textColor="#00CFFF"
android:textSize="15sp"
android:textStyle="bold" />
<View
android:layout_width="4dp"
android:layout_height="4dp"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:background="@drawable/shape_dot_accent" />
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1"
android:background="#1A4A6B" />
</LinearLayout>
<!-- 测试账号提示 -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
android:text="测试账号 test010 test011 密码: 123456 必须不然用不了ptt2个后台都要加账号才能用"
android:textColor="#CCFFFFFF"
android:layout_marginBottom="16dp"
android:text="测试账号 test010 test011 密码: 123456"
android:textColor="#2A6A8A"
android:textSize="12sp" />
<!-- 用户名输入框 -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginBottom="14dp"
android:background="@drawable/shape_edit_text">
<TextView
android:layout_width="44dp"
android:layout_height="match_parent"
android:gravity="center"
android:text="账号"
android:textColor="#2A7A9A"
android:textSize="12sp"
android:layout_alignParentStart="true" />
<View
android:layout_width="1dp"
android:layout_height="20dp"
android:layout_centerVertical="true"
android:layout_marginStart="44dp"
android:background="#1A4A6B" />
<EditText
android:id="@+id/et_username"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="52dp"
android:background="@android:color/transparent"
android:hint="请输入用户名"
android:paddingRight="12dp"
android:singleLine="true"
android:textColor="#DDEEFF"
android:textColorHint="#2A6A8A"
android:textSize="14sp" />
</RelativeLayout>
<!-- 密码输入框 -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginBottom="14dp"
android:background="@drawable/shape_edit_text">
<TextView
android:layout_width="44dp"
android:layout_height="match_parent"
android:gravity="center"
android:text="密码"
android:textColor="#2A7A9A"
android:textSize="12sp"
android:layout_alignParentStart="true" />
<View
android:layout_width="1dp"
android:layout_height="20dp"
android:layout_centerVertical="true"
android:layout_marginStart="44dp"
android:background="#1A4A6B" />
<EditText
android:id="@+id/et_password"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="52dp"
android:background="@android:color/transparent"
android:hint="请输入密码"
android:inputType="textPassword"
android:paddingRight="12dp"
android:singleLine="true"
android:textColor="#DDEEFF"
android:textColorHint="#2A6A8A"
android:textSize="14sp" />
</RelativeLayout>
<!-- 记住登录 -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp">
<CheckBox
android:id="@+id/cb_remember"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="记住登录"
android:textColor="#3A7A9A"
android:textSize="13sp" />
</RelativeLayout>
<!-- 登录按钮 -->
<Button
android:id="@+id/btn_login"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginBottom="10dp"
android:background="@drawable/shape_button_login"
android:text="登 录"
android:textColor="#FFFFFF"
android:textSize="15sp"
android:textStyle="bold"
android:letterSpacing="0.2" />
<!-- 正式界面登录按钮 -->
<Button
android:id="@+id/btn_login_official"
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginBottom="8dp"
android:background="@drawable/shape_button_secondary"
android:text="正式界面登录"
android:textColor="#3A7A9A"
android:textSize="14sp" />
<EditText
android:id="@+id/et_username"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginBottom="15dp"
android:background="@drawable/shape_edit_text"
android:hint="请输入用户名"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:singleLine="true"
android:textColor="#333333"
android:textColorHint="#999999" />
<EditText
android:id="@+id/et_password"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginBottom="10dp"
android:background="@drawable/shape_edit_text"
android:hint="请输入密码"
android:inputType="textPassword"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:singleLine="true"
android:textColor="#333333"
android:textColorHint="#999999" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="25dp">
<CheckBox
android:id="@+id/cb_remember"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="记住登录"
android:textColor="#FFFFFF" />
</RelativeLayout>
<Button
android:id="@+id/btn_login"
android:layout_width="match_parent"
android:layout_height="55dp"
android:layout_marginBottom="10dp"
android:background="@drawable/shape_button_login"
android:text="登录"
android:textColor="#FFFFFF"
android:textSize="18sp" />
<Button
android:id="@+id/btn_login_official"
android:layout_width="match_parent"
android:layout_height="55dp"
android:layout_marginBottom="15dp"
android:background="@drawable/shape_button_login"
android:text="正式界面登录"
android:textColor="#FFFFFF"
android:textSize="18sp" />
<Button
android:id="@+id/btn_exit"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@android:color/transparent"
android:text="退出应用"
android:textColor="#CCFFFFFF"
android:textSize="14sp" />
<!-- 退出应用 -->
<Button
android:id="@+id/btn_exit"
android:layout_width="match_parent"
android:layout_height="36dp"
android:background="@android:color/transparent"
android:text="退出应用"
android:textColor="#1A4A6B"
android:textSize="13sp" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
@ -158,10 +299,10 @@
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="20dp"
android:layout_marginBottom="16dp"
android:text="Copyright © 2020-2026 Telewave. All Rights Reserved."
android:textColor="#88FFFFFF"
android:textSize="12sp"
android:textColor="#1A4A6B"
android:textSize="11sp"
android:padding="10dp"
android:clickable="true"
android:focusable="true" />