处理登录也得样式问题
This commit is contained in:
parent
ec90300ea7
commit
c317d05e6e
|
|
@ -1,7 +1,8 @@
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<gradient
|
<gradient
|
||||||
android:angle="45"
|
android:angle="135"
|
||||||
android:endColor="#004A8F"
|
android:startColor="#020810"
|
||||||
android:startColor="#001F3F"
|
android:centerColor="#051120"
|
||||||
|
android:endColor="#091D35"
|
||||||
android:type="linear" />
|
android:type="linear" />
|
||||||
</shape>
|
</shape>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<solid android:color="#3B82F6" />
|
<gradient
|
||||||
<corners android:radius="8dp" />
|
android:angle="0"
|
||||||
|
android:startColor="#0055AA"
|
||||||
|
android:endColor="#00AAEE"
|
||||||
|
android:type="linear" />
|
||||||
|
<corners android:radius="2dp" />
|
||||||
|
<stroke android:width="1dp" android:color="#00CFFF" />
|
||||||
</shape>
|
</shape>
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
@ -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>
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<solid android:color="#FFFFFF" />
|
<solid android:color="#0D2035" />
|
||||||
<corners android:radius="8dp" />
|
<corners android:radius="2dp" />
|
||||||
|
<stroke android:width="1dp" android:color="#1A4A6B" />
|
||||||
</shape>
|
</shape>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,18 @@
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<solid android:color="#22FFFFFF" />
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<corners android:radius="12dp" />
|
<!-- 深色半透明背景 -->
|
||||||
<stroke android:width="1dp" android:color="#44FFFFFF" />
|
<item>
|
||||||
</shape>
|
<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>
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,9 @@
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@drawable/bg_login"
|
android:background="@drawable/bg_login">
|
||||||
android:padding="20dp">
|
|
||||||
|
|
||||||
<!-- 服务器配置入口 (右上角) -->
|
<!-- 服务器配置入口(右上角) -->
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_settings"
|
android:id="@+id/iv_settings"
|
||||||
android:layout_width="40dp"
|
android:layout_width="40dp"
|
||||||
|
|
@ -15,138 +14,280 @@
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:padding="8dp"
|
android:padding="8dp"
|
||||||
android:src="@android:drawable/ic_menu_manage"
|
android:src="@android:drawable/ic_menu_manage"
|
||||||
|
android:tint="#2A6A8A"
|
||||||
android:contentDescription="配置服务器" />
|
android:contentDescription="配置服务器" />
|
||||||
|
|
||||||
<!-- 顶部标题 -->
|
<!-- 顶部 LOGO + 标题区域 -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/ll_header"
|
android:id="@+id/ll_header"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_marginTop="28dp"
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<ImageView
|
<!-- LOGO + 两侧装饰线 -->
|
||||||
android:layout_width="80dp"
|
<LinearLayout
|
||||||
android:layout_height="80dp"
|
android:layout_width="wrap_content"
|
||||||
android:src="@drawable/ic_fire_logo" />
|
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
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:text="消防值守台"
|
android:text="消防值守台"
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="#00CFFF"
|
||||||
android:textSize="26sp"
|
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>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 登录卡片(居中) -->
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerInParent="true">
|
android:layout_centerInParent="true">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/login_card"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/shape_login_box"
|
android:background="@drawable/shape_login_box"
|
||||||
android:elevation="8dp"
|
android:elevation="8dp"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="30dp"
|
android:padding="28dp"
|
||||||
app:layout_constraintWidth_max="450dp"
|
app:layout_constraintWidth_max="450dp"
|
||||||
app:layout_constraintWidth_default="percent"
|
app:layout_constraintWidth_default="percent"
|
||||||
app:layout_constraintWidth_percent="0.85"
|
app:layout_constraintWidth_percent="0.88"
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintBottom_toBottomOf="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_height="wrap_content"
|
||||||
android:layout_marginBottom="25dp"
|
android:gravity="center_vertical"
|
||||||
android:text="用户登录"
|
android:orientation="horizontal"
|
||||||
android:textColor="#FFFFFF"
|
android:layout_marginBottom="20dp">
|
||||||
android:textSize="20sp" />
|
|
||||||
|
<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
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="15dp"
|
android:paddingLeft="10dp"
|
||||||
android:text="测试账号 test010 test011 密码: 123456 必须,不然用不了ptt(2个后台都要加账号才能用)"
|
android:paddingRight="10dp"
|
||||||
android:textColor="#CCFFFFFF"
|
android:text="用 户 登 录"
|
||||||
android:textSize="14sp" />
|
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="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
|
<EditText
|
||||||
android:id="@+id/et_username"
|
android:id="@+id/et_username"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="50dp"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginBottom="15dp"
|
android:layout_marginStart="52dp"
|
||||||
android:background="@drawable/shape_edit_text"
|
android:background="@android:color/transparent"
|
||||||
android:hint="请输入用户名"
|
android:hint="请输入用户名"
|
||||||
android:paddingLeft="15dp"
|
android:paddingRight="12dp"
|
||||||
android:paddingRight="15dp"
|
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textColor="#333333"
|
android:textColor="#DDEEFF"
|
||||||
android:textColorHint="#999999" />
|
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
|
<EditText
|
||||||
android:id="@+id/et_password"
|
android:id="@+id/et_password"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="50dp"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginBottom="10dp"
|
android:layout_marginStart="52dp"
|
||||||
android:background="@drawable/shape_edit_text"
|
android:background="@android:color/transparent"
|
||||||
android:hint="请输入密码"
|
android:hint="请输入密码"
|
||||||
android:inputType="textPassword"
|
android:inputType="textPassword"
|
||||||
android:paddingLeft="15dp"
|
android:paddingRight="12dp"
|
||||||
android:paddingRight="15dp"
|
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textColor="#333333"
|
android:textColor="#DDEEFF"
|
||||||
android:textColorHint="#999999" />
|
android:textColorHint="#2A6A8A"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<!-- 记住登录 -->
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="25dp">
|
android:layout_marginBottom="20dp">
|
||||||
|
|
||||||
<CheckBox
|
<CheckBox
|
||||||
android:id="@+id/cb_remember"
|
android:id="@+id/cb_remember"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="记住登录"
|
android:text="记住登录"
|
||||||
android:textColor="#FFFFFF" />
|
android:textColor="#3A7A9A"
|
||||||
|
android:textSize="13sp" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<!-- 登录按钮 -->
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/btn_login"
|
android:id="@+id/btn_login"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="55dp"
|
android:layout_height="48dp"
|
||||||
android:layout_marginBottom="10dp"
|
android:layout_marginBottom="10dp"
|
||||||
android:background="@drawable/shape_button_login"
|
android:background="@drawable/shape_button_login"
|
||||||
android:text="登录"
|
android:text="登 录"
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="#FFFFFF"
|
||||||
android:textSize="18sp" />
|
android:textSize="15sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:letterSpacing="0.2" />
|
||||||
|
|
||||||
|
<!-- 正式界面登录按钮 -->
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/btn_login_official"
|
android:id="@+id/btn_login_official"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="55dp"
|
android:layout_height="44dp"
|
||||||
android:layout_marginBottom="15dp"
|
android:layout_marginBottom="8dp"
|
||||||
android:background="@drawable/shape_button_login"
|
android:background="@drawable/shape_button_secondary"
|
||||||
android:text="正式界面登录"
|
android:text="正式界面登录"
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="#3A7A9A"
|
||||||
android:textSize="18sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<!-- 退出应用 -->
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/btn_exit"
|
android:id="@+id/btn_exit"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="50dp"
|
android:layout_height="36dp"
|
||||||
android:background="@android:color/transparent"
|
android:background="@android:color/transparent"
|
||||||
android:text="退出应用"
|
android:text="退出应用"
|
||||||
android:textColor="#CCFFFFFF"
|
android:textColor="#1A4A6B"
|
||||||
android:textSize="14sp" />
|
android:textSize="13sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -158,10 +299,10 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_marginBottom="20dp"
|
android:layout_marginBottom="16dp"
|
||||||
android:text="Copyright © 2020-2026 Telewave. All Rights Reserved."
|
android:text="Copyright © 2020-2026 Telewave. All Rights Reserved."
|
||||||
android:textColor="#88FFFFFF"
|
android:textColor="#1A4A6B"
|
||||||
android:textSize="12sp"
|
android:textSize="11sp"
|
||||||
android:padding="10dp"
|
android:padding="10dp"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true" />
|
android:focusable="true" />
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue