6 changed files with 333 additions and 16 deletions
-
106app/src/main/java/com/ouxuan/oxface/MainActivity.java
-
14app/src/main/res/drawable/dialog_background.xml
-
28app/src/main/res/drawable/enter_button_selector.xml
-
12app/src/main/res/drawable/ic_close.xml
-
40app/src/main/res/drawable/ic_warriors_logo.xml
-
153app/src/main/res/layout/dialog_login_success.xml
@ -0,0 +1,14 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" |
||||
|
android:shape="rectangle"> |
||||
|
|
||||
|
<gradient |
||||
|
android:startColor="#4CAF50" |
||||
|
android:centerColor="#66BB6A" |
||||
|
android:endColor="#81C784" |
||||
|
android:angle="135" |
||||
|
android:type="linear" /> |
||||
|
|
||||
|
<corners android:radius="16dp" /> |
||||
|
|
||||
|
</shape> |
@ -0,0 +1,28 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android"> |
||||
|
<!-- 按下状态 --> |
||||
|
<item android:state_pressed="true"> |
||||
|
<shape android:shape="rectangle"> |
||||
|
<gradient |
||||
|
android:startColor="#FF9800" |
||||
|
android:centerColor="#FF8F00" |
||||
|
android:endColor="#E65100" |
||||
|
android:angle="270" |
||||
|
android:type="linear" /> |
||||
|
<corners android:radius="8dp" /> |
||||
|
</shape> |
||||
|
</item> |
||||
|
|
||||
|
<!-- 正常状态 --> |
||||
|
<item> |
||||
|
<shape android:shape="rectangle"> |
||||
|
<gradient |
||||
|
android:startColor="#FCDA9E" |
||||
|
android:centerColor="#F9C56B" |
||||
|
android:endColor="#F7B23E" |
||||
|
android:angle="270" |
||||
|
android:type="linear" /> |
||||
|
<corners android:radius="8dp" /> |
||||
|
</shape> |
||||
|
</item> |
||||
|
</selector> |
@ -0,0 +1,12 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" |
||||
|
android:width="24dp" |
||||
|
android:height="24dp" |
||||
|
android:viewportWidth="24" |
||||
|
android:viewportHeight="24"> |
||||
|
|
||||
|
<path |
||||
|
android:fillColor="#FFFFFF" |
||||
|
android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z" /> |
||||
|
|
||||
|
</vector> |
@ -0,0 +1,40 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" |
||||
|
android:width="80dp" |
||||
|
android:height="80dp" |
||||
|
android:viewportWidth="80" |
||||
|
android:viewportHeight="80"> |
||||
|
|
||||
|
<!-- 外圆背景 --> |
||||
|
<path |
||||
|
android:fillColor="#FFFFFF" |
||||
|
android:pathData="M40,40m-38,0a38,38 0,1 1,76 0a38,38 0,1 1,-76 0" /> |
||||
|
|
||||
|
<!-- 蓝色内圆 --> |
||||
|
<path |
||||
|
android:fillColor="#1D428A" |
||||
|
android:pathData="M40,40m-32,0a32,32 0,1 1,64 0a32,32 0,1 1,-64 0" /> |
||||
|
|
||||
|
<!-- 金桥简化图案 --> |
||||
|
<path |
||||
|
android:fillColor="#FFC107" |
||||
|
android:pathData="M20,35 L60,35 L60,45 L20,45 Z" /> |
||||
|
|
||||
|
<path |
||||
|
android:fillColor="#FFC107" |
||||
|
android:pathData="M25,30 L55,30 L55,35 L25,35 Z" /> |
||||
|
|
||||
|
<path |
||||
|
android:fillColor="#FFC107" |
||||
|
android:pathData="M30,25 L50,25 L50,30 L30,30 Z" /> |
||||
|
|
||||
|
<!-- WARRIORS 文字简化 --> |
||||
|
<path |
||||
|
android:fillColor="#FFFFFF" |
||||
|
android:pathData="M15,50 L65,50 L65,55 L15,55 Z" /> |
||||
|
|
||||
|
<path |
||||
|
android:fillColor="#FFFFFF" |
||||
|
android:pathData="M15,15 L65,15 L65,20 L15,20 Z" /> |
||||
|
|
||||
|
</vector> |
@ -0,0 +1,153 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
|
xmlns:app="http://schemas.android.com/apk/res-auto" |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:background="@drawable/dialog_background" |
||||
|
android:padding="16dp"> |
||||
|
|
||||
|
<!-- 关闭按钮 --> |
||||
|
<androidx.cardview.widget.CardView |
||||
|
android:id="@+id/closeButtonCard" |
||||
|
android:layout_width="wrap_content" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_marginTop="2dp" |
||||
|
android:layout_marginEnd="2dp" |
||||
|
app:cardCornerRadius="8dp" |
||||
|
app:cardElevation="2dp" |
||||
|
app:cardBackgroundColor="@color/white" |
||||
|
app:layout_constraintEnd_toEndOf="parent" |
||||
|
app:layout_constraintTop_toTopOf="parent"> |
||||
|
|
||||
|
<LinearLayout |
||||
|
android:id="@+id/buttonClose" |
||||
|
android:layout_width="wrap_content" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:orientation="horizontal" |
||||
|
android:gravity="center_vertical" |
||||
|
android:paddingStart="16dp" |
||||
|
android:paddingEnd="16dp" |
||||
|
android:paddingTop="10dp" |
||||
|
android:paddingBottom="10dp" |
||||
|
android:clickable="true" |
||||
|
android:focusable="true" |
||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"> |
||||
|
|
||||
|
<ImageView |
||||
|
android:layout_width="18dp" |
||||
|
android:layout_height="18dp" |
||||
|
android:src="@drawable/ic_close" |
||||
|
android:layout_marginEnd="6dp" |
||||
|
android:contentDescription="关闭图标" |
||||
|
app:tint="@color/primary_text_color" /> |
||||
|
|
||||
|
<TextView |
||||
|
android:layout_width="wrap_content" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:text="关闭" |
||||
|
android:textColor="@color/primary_text_color" |
||||
|
android:textSize="14sp" |
||||
|
android:minWidth="24dp" /> |
||||
|
|
||||
|
</LinearLayout> |
||||
|
|
||||
|
</androidx.cardview.widget.CardView> |
||||
|
|
||||
|
<!-- 主内容容器 --> |
||||
|
<LinearLayout |
||||
|
android:layout_width="0dp" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:orientation="vertical" |
||||
|
android:gravity="center" |
||||
|
android:layout_marginTop="16dp" |
||||
|
android:layout_marginStart="16dp" |
||||
|
android:layout_marginEnd="16dp" |
||||
|
android:layout_marginBottom="16dp" |
||||
|
app:layout_constraintTop_toBottomOf="@+id/closeButtonCard" |
||||
|
app:layout_constraintStart_toStartOf="parent" |
||||
|
app:layout_constraintEnd_toEndOf="parent" |
||||
|
app:layout_constraintBottom_toBottomOf="parent"> |
||||
|
|
||||
|
<!-- Logo --> |
||||
|
<ImageView |
||||
|
android:layout_width="80dp" |
||||
|
android:layout_height="80dp" |
||||
|
android:src="@drawable/ic_warriors_logo" |
||||
|
android:layout_marginBottom="24dp" |
||||
|
android:contentDescription="Warriors Logo" /> |
||||
|
|
||||
|
<!-- 欢迎标题 --> |
||||
|
<TextView |
||||
|
android:layout_width="wrap_content" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:text="尊敬的Test门店" |
||||
|
android:textColor="@color/white" |
||||
|
android:textSize="18sp" |
||||
|
android:textStyle="bold" |
||||
|
android:layout_marginBottom="8dp" /> |
||||
|
|
||||
|
<!-- 欢迎副标题 --> |
||||
|
<TextView |
||||
|
android:layout_width="wrap_content" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:text="欢迎登录欧软智能场馆iPad端核销系统!" |
||||
|
android:textColor="@color/white" |
||||
|
android:textSize="14sp" |
||||
|
android:layout_marginBottom="32dp" |
||||
|
android:gravity="center" /> |
||||
|
|
||||
|
<!-- 选择平台标签 --> |
||||
|
<TextView |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:text="请选择平台" |
||||
|
android:textColor="@color/white" |
||||
|
android:textSize="14sp" |
||||
|
android:layout_marginBottom="12dp" /> |
||||
|
|
||||
|
<!-- 平台选择下拉框 --> |
||||
|
<androidx.cardview.widget.CardView |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_marginBottom="32dp" |
||||
|
app:cardCornerRadius="8dp" |
||||
|
app:cardElevation="2dp" |
||||
|
app:cardBackgroundColor="@color/white"> |
||||
|
|
||||
|
<Spinner |
||||
|
android:id="@+id/spinnerPlatform" |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="52dp" |
||||
|
android:paddingStart="16dp" |
||||
|
android:paddingEnd="16dp" |
||||
|
android:background="@android:color/transparent" |
||||
|
android:layout_gravity="center_vertical" /> |
||||
|
|
||||
|
</androidx.cardview.widget.CardView> |
||||
|
|
||||
|
<!-- 进入使用按钮 --> |
||||
|
<androidx.cardview.widget.CardView |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
app:cardCornerRadius="8dp" |
||||
|
app:cardElevation="0dp" |
||||
|
app:cardBackgroundColor="@android:color/transparent"> |
||||
|
|
||||
|
<TextView |
||||
|
android:id="@+id/buttonEnter" |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="50dp" |
||||
|
android:text="进入使用" |
||||
|
android:textSize="18sp" |
||||
|
android:textStyle="bold" |
||||
|
android:textColor="@color/white" |
||||
|
android:background="@drawable/enter_button_selector" |
||||
|
android:gravity="center" |
||||
|
android:clickable="true" |
||||
|
android:focusable="true" /> |
||||
|
|
||||
|
</androidx.cardview.widget.CardView> |
||||
|
|
||||
|
</LinearLayout> |
||||
|
|
||||
|
</androidx.constraintlayout.widget.ConstraintLayout> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue