feat: 登录界面美化,图层控制功能添加
7
app/src/main/res/drawable/login_inputlayout_bg.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#fff5f6fa" />
|
||||
<corners android:radius="40dp" />
|
||||
</shape>
|
||||
6
app/src/main/res/drawable/ripple_btn_normal.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/ripple_color">
|
||||
<item android:drawable="@drawable/shape_btn_normal"/>
|
||||
</ripple>
|
||||
6
app/src/main/res/drawable/ripple_btn_press.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/ripple_color">
|
||||
<item android:drawable="@drawable/shape_btn_press"/>
|
||||
</ripple>
|
||||
8
app/src/main/res/drawable/selector_bg_default_button.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_enabled="false" android:drawable="@drawable/ripple_btn_press"></item>
|
||||
<item android:state_checked="true" android:drawable="@drawable/ripple_btn_press"/>
|
||||
<item android:state_pressed="true" android:drawable="@drawable/ripple_btn_press"/>
|
||||
<item android:state_selected="true" android:drawable="@drawable/ripple_btn_press"></item>
|
||||
<item android:drawable="@drawable/ripple_btn_normal"/>
|
||||
</selector>
|
||||
10
app/src/main/res/drawable/shape_btn_normal.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient android:type="linear"
|
||||
android:centerX="0.5"
|
||||
android:centerY="0.5"
|
||||
android:startColor="#ff6d0bbd"
|
||||
android:endColor="#ff445ff5" />
|
||||
<corners android:radius="30dp" />
|
||||
</shape>
|
||||
8
app/src/main/res/drawable/shape_btn_press.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/colorPrimarySurface"></solid>
|
||||
<stroke android:color="@color/colorSecondary"></stroke>
|
||||
<corners android:radius="30dp" />
|
||||
</shape>
|
||||
@@ -17,60 +17,127 @@
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/login_bg">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/login_fragment_logo"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:contentDescription="@string/imagedescription"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/ic_launcher"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.1"
|
||||
app:roundPercent="0.2" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/login_fragment_user_layout"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:scrollbarAlwaysDrawHorizontalTrack="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.4">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/login_username"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/input_user_name"
|
||||
android:text="@{loginUserModel.loginUser.username}" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_height="match_parent"
|
||||
app:layout_constraintWidth_percent="0.5"
|
||||
app:layout_constraintLeft_toLeftOf="parent">
|
||||
<ImageView
|
||||
android:id="@+id/login_fragment_logo"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:contentDescription="@string/imagedescription"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/logo"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.4"
|
||||
app:layout_constraintHorizontal_bias="0.4"
|
||||
app:roundPercent="0.2" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/login_fragment_user_layout">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/login_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_constraintWidth_percent="0.5"
|
||||
app:layout_constraintRight_toRightOf="parent">
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/input_password"
|
||||
android:inputType="textPassword"
|
||||
android:text="@{loginUserModel.loginUser.password}" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="2dp"
|
||||
app:layout_constraintWidth_percent="0.7"
|
||||
app:cardUseCompatPadding="true">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="@dimen/activity_horizontal_margin"
|
||||
android:paddingVertical="@dimen/activity_vertical_margin"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/title_default_style"
|
||||
android:background="@color/transparent"
|
||||
android:gravity="center"
|
||||
android:textStyle="bold"
|
||||
android:text="Login to OneMap QE"
|
||||
android:layout_marginVertical="@dimen/activity_vertical_margin"></TextView>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/login_fragment_user_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:startIconDrawable="@mipmap/login_username"
|
||||
app:startIconTint="@color/colorSecondary"
|
||||
android:scrollbarAlwaysDrawHorizontalTrack="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.4">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/login_username"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/input_user_name"
|
||||
android:lines="1"
|
||||
android:background="@drawable/login_inputlayout_bg"
|
||||
android:text="@{loginUserModel.loginUser.username}"
|
||||
tools:ignore="TouchTargetSizeCheck" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:startIconDrawable="@mipmap/login_password"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:startIconTint="@color/colorSecondary"
|
||||
app:layout_constraintTop_toBottomOf="@id/login_fragment_user_layout">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/login_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/input_password"
|
||||
android:lines="1"
|
||||
android:inputType="textPassword"
|
||||
android:background="@drawable/login_inputlayout_bg"
|
||||
android:text="@{loginUserModel.loginUser.password}"
|
||||
tools:ignore="TouchTargetSizeCheck" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_login_forget_passwd"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="right"
|
||||
android:text="忘记密码?"
|
||||
android:textColor="@color/colorSecondary"
|
||||
android:padding="@dimen/default_widget_padding"
|
||||
android:layout_marginTop="@dimen/fab_margin"></TextView>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/login_activity_login_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="@{()->activity.onClickLoginButton()}"
|
||||
android:text="@string/login"
|
||||
app:cornerRadius="30dp"
|
||||
style="@style/btn_gradient_color" />
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||
android:id="@+id/login_fragment_register_button"
|
||||
@@ -80,24 +147,12 @@
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:text="@string/logon"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintHorizontal_chainStyle="spread"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/login_activity_login_button"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.8" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||
android:id="@+id/login_activity_login_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="@{()->activity.onClickLoginButton()}"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:text="@string/login"
|
||||
app:layout_constraintBaseline_toBaselineOf="@id/login_fragment_register_button"
|
||||
app:layout_constraintLeft_toRightOf="@id/login_fragment_register_button"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
12
app/src/main/res/layout/fragment_layer_manager.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:context=".ui.fragment.empty.EmptyFragment">
|
||||
|
||||
<ExpandableListView
|
||||
android:id="@+id/elv_layer_manager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
10
app/src/main/res/layout/layer_manager_checked_child.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<androidx.appcompat.widget.AppCompatCheckBox
|
||||
android:id="@+id/chk_layermanager_child"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="true"></androidx.appcompat.widget.AppCompatCheckBox>
|
||||
</LinearLayout>
|
||||
11
app/src/main/res/layout/layer_manager_checked_parent.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<androidx.appcompat.widget.AppCompatCheckBox
|
||||
android:id="@+id/chk_layermanager_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
android:checked="true"></androidx.appcompat.widget.AppCompatCheckBox>
|
||||
</LinearLayout>
|
||||
@@ -41,9 +41,9 @@
|
||||
android:icon="@drawable/baseline_person_24"
|
||||
android:title="我的数据" />
|
||||
<item
|
||||
android:id="@+id/personal_center_menu_offline_map4"
|
||||
android:id="@+id/personal_center_menu_layer_manager"
|
||||
android:icon="@drawable/baseline_person_24"
|
||||
android:title="menu_gallery" />
|
||||
android:title="图层管理" />
|
||||
|
||||
<item
|
||||
android:id="@+id/personal_center_menu_test"
|
||||
|
||||
BIN
app/src/main/res/mipmap-xhdpi/login_bg.png
Normal file
|
After Width: | Height: | Size: 52 KiB |
BIN
app/src/main/res/mipmap-xhdpi/login_password.png
Normal file
|
After Width: | Height: | Size: 638 B |
BIN
app/src/main/res/mipmap-xhdpi/login_username.png
Normal file
|
After Width: | Height: | Size: 529 B |
BIN
app/src/main/res/mipmap-xhdpi/logo.png
Normal file
|
After Width: | Height: | Size: 9.5 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/login_bg.png
Normal file
|
After Width: | Height: | Size: 114 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/login_password.png
Normal file
|
After Width: | Height: | Size: 1002 B |
BIN
app/src/main/res/mipmap-xxhdpi/login_username.png
Normal file
|
After Width: | Height: | Size: 953 B |
BIN
app/src/main/res/mipmap-xxhdpi/logo.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
@@ -37,4 +37,12 @@
|
||||
tools:layout="@layout/fragment_qs_record_list">
|
||||
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/QsLayerManagerFragment"
|
||||
android:name="com.navinfo.omqs.ui.fragment.layermanager.LayermanagerFragment"
|
||||
android:label="图层管理"
|
||||
tools:layout="@layout/fragment_qs_record_list">
|
||||
|
||||
</fragment>
|
||||
</navigation>
|
||||
@@ -2,9 +2,16 @@
|
||||
<resources>
|
||||
<color name="transp">#00000000</color>
|
||||
<color name="line_gray" comment="轻度灰色,一般用于下划线,不可点击按钮的边框">#dadade</color>
|
||||
<color name="colorPrimary">#3F51B5</color>
|
||||
<color name="colorPrimary">#6c14c4</color>
|
||||
<color name="colorSecondary">#4c54ec</color>
|
||||
<color name="colorAccent">#c42cd4</color>
|
||||
<color name="colorSurface">#FFFFFF</color>
|
||||
<color name="colorOnSurface">#4263EB</color>
|
||||
<color name="colorPrimarySurface">#aa342c4c</color>
|
||||
<color name="colorOnPrimarySurface">#FFFFFF</color>
|
||||
<color name="colorError">#e74c3c</color>
|
||||
<color name="ripple_color">#342c4c</color>
|
||||
<color name="colorPrimaryDark">#303F9F</color>
|
||||
<color name="colorAccent">#FF4081</color>
|
||||
<color name="white">#FFFFFF</color> <!--白色 -->
|
||||
<color name="ivory">#FFFFF0</color> <!--象牙色 -->
|
||||
<color name="lightyellow">#FFFFE0</color> <!--亮黄色 -->
|
||||
|
||||
@@ -75,6 +75,15 @@
|
||||
<item name="android:paddingBottom">1dp</item>
|
||||
</style>
|
||||
|
||||
<style name="btn_gradient_color" parent="TextAppearance.AppCompat.Button">
|
||||
<item name="android:textColor">@color/btn_select_color</item>
|
||||
<item name="android:background">@drawable/selector_bg_default_button</item>
|
||||
<item name="android:clickable">true</item>
|
||||
<item name="android:focusable">true</item>
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:paddingBottom">1dp</item>
|
||||
</style>
|
||||
|
||||
<style name="fm_btn_default_blue_white" parent="@android:style/Widget.Button">
|
||||
<item name="android:background">@drawable/selector_bg_blue_gray_bg_4_radius</item>
|
||||
<item name="android:textColor">@color/selector_default_text_color_white_enable_gray</item>
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Base.Theme.OMQualityInspection" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<!-- Customize your light theme here. -->
|
||||
<!-- <item name="colorPrimary">@color/my_light_primary</item> -->
|
||||
<!-- 应用程序的主色调 -->
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<!-- 应用程序的次要色调 -->
|
||||
<item name="colorSecondary">@color/colorSecondary</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
<item name="colorSurface">@color/colorSurface</item>
|
||||
<item name="colorOnSurface">@color/colorOnSurface</item>
|
||||
<item name="colorPrimarySurface">@color/colorPrimarySurface</item>
|
||||
<item name="colorError">@color/colorError</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.OMQualityInspection" parent="Base.Theme.OMQualityInspection" />
|
||||
|
||||