|
@ -4,149 +4,214 @@ |
|
|
xmlns:tools="http://schemas.android.com/tools" |
|
|
xmlns:tools="http://schemas.android.com/tools" |
|
|
android:layout_width="match_parent" |
|
|
android:layout_width="match_parent" |
|
|
android:layout_height="match_parent" |
|
|
android:layout_height="match_parent" |
|
|
android:background="@color/background_color" |
|
|
|
|
|
|
|
|
android:background="@drawable/gradient_background" |
|
|
android:fillViewport="true"> |
|
|
android:fillViewport="true"> |
|
|
|
|
|
|
|
|
<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:minHeight="@dimen/min_screen_height" |
|
|
android:minHeight="@dimen/min_screen_height" |
|
|
|
|
|
android:paddingStart="32dp" |
|
|
|
|
|
android:paddingEnd="32dp" |
|
|
tools:context=".MainActivity"> |
|
|
tools:context=".MainActivity"> |
|
|
|
|
|
|
|
|
<!-- 应用Logo --> |
|
|
|
|
|
|
|
|
<!-- Logo容器 --> |
|
|
|
|
|
<androidx.cardview.widget.CardView |
|
|
|
|
|
android:id="@+id/logoContainer" |
|
|
|
|
|
android:layout_width="120dp" |
|
|
|
|
|
android:layout_height="120dp" |
|
|
|
|
|
android:layout_marginTop="80dp" |
|
|
|
|
|
app:cardCornerRadius="60dp" |
|
|
|
|
|
app:cardElevation="12dp" |
|
|
|
|
|
app:cardBackgroundColor="@color/white" |
|
|
|
|
|
app:layout_constraintEnd_toEndOf="parent" |
|
|
|
|
|
app:layout_constraintStart_toStartOf="parent" |
|
|
|
|
|
app:layout_constraintTop_toTopOf="parent"> |
|
|
|
|
|
|
|
|
<ImageView |
|
|
<ImageView |
|
|
android:id="@+id/imageViewLogo" |
|
|
android:id="@+id/imageViewLogo" |
|
|
android:layout_width="100dp" |
|
|
|
|
|
android:layout_height="100dp" |
|
|
|
|
|
android:layout_marginTop="40dp" |
|
|
|
|
|
|
|
|
android:layout_width="60dp" |
|
|
|
|
|
android:layout_height="60dp" |
|
|
|
|
|
android:layout_gravity="center" |
|
|
android:src="@drawable/ic_login_logo" |
|
|
android:src="@drawable/ic_login_logo" |
|
|
android:contentDescription="@string/app_logo" |
|
|
|
|
|
app:layout_constraintEnd_toEndOf="parent" |
|
|
|
|
|
app:layout_constraintStart_toStartOf="parent" |
|
|
|
|
|
app:layout_constraintTop_toTopOf="parent" /> |
|
|
|
|
|
|
|
|
android:contentDescription="@string/app_logo" /> |
|
|
|
|
|
|
|
|
<!-- 应用标题 --> |
|
|
|
|
|
<TextView |
|
|
|
|
|
android:id="@+id/textViewTitle" |
|
|
|
|
|
android:layout_width="wrap_content" |
|
|
|
|
|
android:layout_height="wrap_content" |
|
|
|
|
|
android:layout_marginTop="20dp" |
|
|
|
|
|
android:text="@string/app_name" |
|
|
|
|
|
android:textSize="24sp" |
|
|
|
|
|
android:textStyle="bold" |
|
|
|
|
|
android:textColor="@color/primary_text_color" |
|
|
|
|
|
app:layout_constraintEnd_toEndOf="parent" |
|
|
|
|
|
app:layout_constraintStart_toStartOf="parent" |
|
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/imageViewLogo" /> |
|
|
|
|
|
|
|
|
</androidx.cardview.widget.CardView> |
|
|
|
|
|
|
|
|
<!-- 登录卡片容器 --> |
|
|
|
|
|
|
|
|
<!-- 用户名输入框 --> |
|
|
<androidx.cardview.widget.CardView |
|
|
<androidx.cardview.widget.CardView |
|
|
|
|
|
android:id="@+id/usernameCard" |
|
|
android:layout_width="0dp" |
|
|
android:layout_width="0dp" |
|
|
android:layout_height="wrap_content" |
|
|
android:layout_height="wrap_content" |
|
|
android:layout_marginStart="32dp" |
|
|
|
|
|
android:layout_marginTop="40dp" |
|
|
|
|
|
android:layout_marginEnd="32dp" |
|
|
|
|
|
android:layout_marginBottom="32dp" |
|
|
|
|
|
app:cardCornerRadius="16dp" |
|
|
|
|
|
app:cardElevation="8dp" |
|
|
|
|
|
app:cardBackgroundColor="@color/card_background" |
|
|
|
|
|
|
|
|
android:layout_marginTop="80dp" |
|
|
|
|
|
app:cardCornerRadius="25dp" |
|
|
|
|
|
app:cardElevation="4dp" |
|
|
|
|
|
app:cardBackgroundColor="@color/white" |
|
|
app:layout_constraintEnd_toEndOf="parent" |
|
|
app:layout_constraintEnd_toEndOf="parent" |
|
|
app:layout_constraintStart_toStartOf="parent" |
|
|
app:layout_constraintStart_toStartOf="parent" |
|
|
app:layout_constraintTop_toBottomOf="@+id/textViewTitle" |
|
|
|
|
|
app:layout_constraintBottom_toBottomOf="parent"> |
|
|
|
|
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/logoContainer"> |
|
|
|
|
|
|
|
|
<LinearLayout |
|
|
<LinearLayout |
|
|
android:layout_width="match_parent" |
|
|
android:layout_width="match_parent" |
|
|
android:layout_height="wrap_content" |
|
|
|
|
|
android:orientation="vertical" |
|
|
|
|
|
android:padding="32dp"> |
|
|
|
|
|
|
|
|
android:layout_height="50dp" |
|
|
|
|
|
android:orientation="horizontal" |
|
|
|
|
|
android:gravity="center_vertical" |
|
|
|
|
|
android:paddingStart="16dp" |
|
|
|
|
|
android:paddingEnd="16dp"> |
|
|
|
|
|
|
|
|
<!-- 登录卡片内的Logo --> |
|
|
|
|
|
<ImageView |
|
|
<ImageView |
|
|
android:id="@+id/imageViewLoginLogo" |
|
|
|
|
|
android:layout_width="80dp" |
|
|
|
|
|
android:layout_height="80dp" |
|
|
|
|
|
android:layout_gravity="center" |
|
|
|
|
|
android:layout_marginBottom="24dp" |
|
|
|
|
|
android:src="@drawable/ic_login_logo" |
|
|
|
|
|
android:contentDescription="@string/login_logo" /> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 用户名输入框 --> |
|
|
|
|
|
<com.google.android.material.textfield.TextInputLayout |
|
|
|
|
|
android:layout_width="match_parent" |
|
|
|
|
|
android:layout_height="wrap_content" |
|
|
|
|
|
android:layout_marginBottom="16dp" |
|
|
|
|
|
android:hint="@string/hint_username" |
|
|
|
|
|
app:startIconDrawable="@drawable/ic_person" |
|
|
|
|
|
app:boxStrokeColor="@color/primary_color" |
|
|
|
|
|
app:hintTextColor="@color/primary_color" |
|
|
|
|
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"> |
|
|
|
|
|
|
|
|
android:layout_width="24dp" |
|
|
|
|
|
android:layout_height="24dp" |
|
|
|
|
|
android:src="@drawable/ic_person" |
|
|
|
|
|
android:layout_marginEnd="12dp" |
|
|
|
|
|
android:contentDescription="用户图标" /> |
|
|
|
|
|
|
|
|
<com.google.android.material.textfield.TextInputEditText |
|
|
|
|
|
|
|
|
<EditText |
|
|
android:id="@+id/editTextUsername" |
|
|
android:id="@+id/editTextUsername" |
|
|
android:layout_width="match_parent" |
|
|
|
|
|
android:layout_height="wrap_content" |
|
|
|
|
|
|
|
|
android:layout_width="0dp" |
|
|
|
|
|
android:layout_height="match_parent" |
|
|
|
|
|
android:layout_weight="1" |
|
|
|
|
|
android:hint="@string/hint_username" |
|
|
android:inputType="text" |
|
|
android:inputType="text" |
|
|
android:maxLines="1" |
|
|
android:maxLines="1" |
|
|
|
|
|
android:background="@android:color/transparent" |
|
|
android:textColor="@color/primary_text_color" |
|
|
android:textColor="@color/primary_text_color" |
|
|
|
|
|
android:textColorHint="@color/secondary_text_color" |
|
|
android:textSize="16sp" /> |
|
|
android:textSize="16sp" /> |
|
|
|
|
|
|
|
|
</com.google.android.material.textfield.TextInputLayout> |
|
|
|
|
|
|
|
|
</LinearLayout> |
|
|
|
|
|
|
|
|
|
|
|
</androidx.cardview.widget.CardView> |
|
|
|
|
|
|
|
|
<!-- 密码输入框 --> |
|
|
<!-- 密码输入框 --> |
|
|
<com.google.android.material.textfield.TextInputLayout |
|
|
|
|
|
android:layout_width="match_parent" |
|
|
|
|
|
|
|
|
<androidx.cardview.widget.CardView |
|
|
|
|
|
android:id="@+id/passwordCard" |
|
|
|
|
|
android:layout_width="0dp" |
|
|
android:layout_height="wrap_content" |
|
|
android:layout_height="wrap_content" |
|
|
android:layout_marginBottom="24dp" |
|
|
|
|
|
android:hint="@string/hint_password" |
|
|
|
|
|
app:startIconDrawable="@drawable/ic_lock" |
|
|
|
|
|
app:endIconMode="password_toggle" |
|
|
|
|
|
app:boxStrokeColor="@color/primary_color" |
|
|
|
|
|
app:hintTextColor="@color/primary_color" |
|
|
|
|
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"> |
|
|
|
|
|
|
|
|
android:layout_marginTop="16dp" |
|
|
|
|
|
app:cardCornerRadius="25dp" |
|
|
|
|
|
app:cardElevation="4dp" |
|
|
|
|
|
app:cardBackgroundColor="@color/white" |
|
|
|
|
|
app:layout_constraintEnd_toEndOf="parent" |
|
|
|
|
|
app:layout_constraintStart_toStartOf="parent" |
|
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/usernameCard"> |
|
|
|
|
|
|
|
|
<com.google.android.material.textfield.TextInputEditText |
|
|
|
|
|
android:id="@+id/editTextPassword" |
|
|
|
|
|
|
|
|
<LinearLayout |
|
|
android:layout_width="match_parent" |
|
|
android:layout_width="match_parent" |
|
|
android:layout_height="wrap_content" |
|
|
|
|
|
|
|
|
android:layout_height="50dp" |
|
|
|
|
|
android:orientation="horizontal" |
|
|
|
|
|
android:gravity="center_vertical" |
|
|
|
|
|
android:paddingStart="16dp" |
|
|
|
|
|
android:paddingEnd="16dp"> |
|
|
|
|
|
|
|
|
|
|
|
<ImageView |
|
|
|
|
|
android:layout_width="24dp" |
|
|
|
|
|
android:layout_height="24dp" |
|
|
|
|
|
android:src="@drawable/ic_lock" |
|
|
|
|
|
android:layout_marginEnd="12dp" |
|
|
|
|
|
android:contentDescription="密码图标" /> |
|
|
|
|
|
|
|
|
|
|
|
<EditText |
|
|
|
|
|
android:id="@+id/editTextPassword" |
|
|
|
|
|
android:layout_width="0dp" |
|
|
|
|
|
android:layout_height="match_parent" |
|
|
|
|
|
android:layout_weight="1" |
|
|
|
|
|
android:hint="@string/hint_password" |
|
|
android:inputType="textPassword" |
|
|
android:inputType="textPassword" |
|
|
android:maxLines="1" |
|
|
android:maxLines="1" |
|
|
|
|
|
android:background="@android:color/transparent" |
|
|
android:textColor="@color/primary_text_color" |
|
|
android:textColor="@color/primary_text_color" |
|
|
|
|
|
android:textColorHint="@color/secondary_text_color" |
|
|
android:textSize="16sp" /> |
|
|
android:textSize="16sp" /> |
|
|
|
|
|
|
|
|
</com.google.android.material.textfield.TextInputLayout> |
|
|
|
|
|
|
|
|
</LinearLayout> |
|
|
|
|
|
|
|
|
|
|
|
</androidx.cardview.widget.CardView> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 提示文字 --> |
|
|
|
|
|
<TextView |
|
|
|
|
|
android:id="@+id/textViewHint" |
|
|
|
|
|
android:layout_width="0dp" |
|
|
|
|
|
android:layout_height="wrap_content" |
|
|
|
|
|
android:layout_marginTop="16dp" |
|
|
|
|
|
android:text="登录账号密码请从PC端后台管理【设备运营管理平台管理】里获取" |
|
|
|
|
|
android:textColor="@color/white" |
|
|
|
|
|
android:textSize="12sp" |
|
|
|
|
|
android:gravity="center" |
|
|
|
|
|
android:alpha="0.8" |
|
|
|
|
|
app:layout_constraintEnd_toEndOf="parent" |
|
|
|
|
|
app:layout_constraintStart_toStartOf="parent" |
|
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/passwordCard" /> |
|
|
|
|
|
|
|
|
<!-- 登录按钮 --> |
|
|
<!-- 登录按钮 --> |
|
|
<com.google.android.material.button.MaterialButton |
|
|
|
|
|
|
|
|
<androidx.cardview.widget.CardView |
|
|
|
|
|
android:id="@+id/loginButtonCard" |
|
|
|
|
|
android:layout_width="0dp" |
|
|
|
|
|
android:layout_height="wrap_content" |
|
|
|
|
|
android:layout_marginTop="60dp" |
|
|
|
|
|
app:cardCornerRadius="25dp" |
|
|
|
|
|
app:cardElevation="0dp" |
|
|
|
|
|
app:cardBackgroundColor="@android:color/transparent" |
|
|
|
|
|
app:layout_constraintEnd_toEndOf="parent" |
|
|
|
|
|
app:layout_constraintStart_toStartOf="parent" |
|
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/textViewHint"> |
|
|
|
|
|
|
|
|
|
|
|
<Button |
|
|
android:id="@+id/buttonLogin" |
|
|
android:id="@+id/buttonLogin" |
|
|
android:layout_width="match_parent" |
|
|
android:layout_width="match_parent" |
|
|
android:layout_height="56dp" |
|
|
|
|
|
|
|
|
android:layout_height="50dp" |
|
|
android:text="@string/login_button" |
|
|
android:text="@string/login_button" |
|
|
android:textSize="16sp" |
|
|
|
|
|
|
|
|
android:textSize="18sp" |
|
|
android:textStyle="bold" |
|
|
android:textStyle="bold" |
|
|
android:textColor="@android:color/white" |
|
|
|
|
|
app:backgroundTint="@color/primary_color" |
|
|
|
|
|
app:cornerRadius="28dp" |
|
|
|
|
|
app:elevation="4dp" /> |
|
|
|
|
|
|
|
|
android:textColor="@color/white" |
|
|
|
|
|
android:background="@drawable/gradient_button_selector" |
|
|
|
|
|
android:elevation="0dp" |
|
|
|
|
|
android:stateListAnimator="@null" /> |
|
|
|
|
|
|
|
|
|
|
|
</androidx.cardview.widget.CardView> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 版本信息 --> |
|
|
|
|
|
<LinearLayout |
|
|
|
|
|
android:layout_width="0dp" |
|
|
|
|
|
android:layout_height="wrap_content" |
|
|
|
|
|
android:layout_marginBottom="20dp" |
|
|
|
|
|
android:orientation="horizontal" |
|
|
|
|
|
app:layout_constraintBottom_toBottomOf="parent" |
|
|
|
|
|
app:layout_constraintEnd_toEndOf="parent" |
|
|
|
|
|
app:layout_constraintStart_toStartOf="parent"> |
|
|
|
|
|
|
|
|
|
|
|
<TextView |
|
|
|
|
|
android:layout_width="0dp" |
|
|
|
|
|
android:layout_height="wrap_content" |
|
|
|
|
|
android:layout_weight="1" |
|
|
|
|
|
android:text="重启设备" |
|
|
|
|
|
android:textColor="@color/white" |
|
|
|
|
|
android:textSize="12sp" |
|
|
|
|
|
android:alpha="0.7" /> |
|
|
|
|
|
|
|
|
<!-- 忘记密码链接 --> |
|
|
|
|
|
<TextView |
|
|
<TextView |
|
|
android:id="@+id/textViewForgotPassword" |
|
|
|
|
|
android:layout_width="wrap_content" |
|
|
android:layout_width="wrap_content" |
|
|
android:layout_height="wrap_content" |
|
|
android:layout_height="wrap_content" |
|
|
android:layout_gravity="center" |
|
|
|
|
|
android:layout_marginTop="16dp" |
|
|
|
|
|
android:text="@string/forgot_password" |
|
|
|
|
|
android:textColor="@color/secondary_text_color" |
|
|
|
|
|
android:textSize="14sp" |
|
|
|
|
|
android:padding="8dp" |
|
|
|
|
|
android:background="?attr/selectableItemBackgroundBorderless" |
|
|
|
|
|
android:clickable="true" |
|
|
|
|
|
android:focusable="true" /> |
|
|
|
|
|
|
|
|
android:text="Version 1.8.3.9" |
|
|
|
|
|
android:textColor="@color/white" |
|
|
|
|
|
android:textSize="12sp" |
|
|
|
|
|
android:alpha="0.7" /> |
|
|
|
|
|
|
|
|
</LinearLayout> |
|
|
</LinearLayout> |
|
|
|
|
|
|
|
|
</androidx.cardview.widget.CardView> |
|
|
|
|
|
|
|
|
<TextView |
|
|
|
|
|
android:layout_width="0dp" |
|
|
|
|
|
android:layout_height="wrap_content" |
|
|
|
|
|
android:layout_marginBottom="4dp" |
|
|
|
|
|
android:text="本机设备ID:c9cb00145a2ac56f" |
|
|
|
|
|
android:textColor="@color/white" |
|
|
|
|
|
android:textSize="12sp" |
|
|
|
|
|
android:alpha="0.7" |
|
|
|
|
|
android:gravity="end" |
|
|
|
|
|
app:layout_constraintBottom_toTopOf="@+id/linearLayout" |
|
|
|
|
|
app:layout_constraintEnd_toEndOf="parent" |
|
|
|
|
|
app:layout_constraintStart_toStartOf="parent" |
|
|
|
|
|
android:id="@+id/linearLayout" /> |
|
|
|
|
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout> |
|
|
</androidx.constraintlayout.widget.ConstraintLayout> |
|
|
|
|
|
|