|
|
@@ -1,6 +1,220 @@
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
-<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
|
- android:layout_width="match_parent"
|
|
|
- android:layout_height="match_parent">
|
|
|
+<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
|
+ xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
|
+ xmlns:tools="http://schemas.android.com/tools">
|
|
|
|
|
|
-</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
+ <data>
|
|
|
+
|
|
|
+ <variable
|
|
|
+ name="mineViewModel"
|
|
|
+ type="com.datarecovery.master.module.mine.MineViewModel" />
|
|
|
+
|
|
|
+ <import type="com.atmob.common.ui.SizeUtil" />
|
|
|
+ </data>
|
|
|
+
|
|
|
+ <androidx.constraintlayout.widget.ConstraintLayout
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="match_parent"
|
|
|
+ android:background="#F8F8F8">
|
|
|
+
|
|
|
+ <ImageView
|
|
|
+ android:id="@+id/iv_mine_background"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="0dp"
|
|
|
+ android:src="@drawable/bg_mine_background"
|
|
|
+ app:layout_constraintDimensionRatio="1080:648"
|
|
|
+ app:layout_constraintTop_toTopOf="parent" />
|
|
|
+
|
|
|
+ <Space
|
|
|
+ android:id="@+id/space_status_bar"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="@{SizeUtil.getStatusBarHeight(), default=@dimen/app_status_bar_height}"
|
|
|
+ app:layout_constraintTop_toTopOf="parent" />
|
|
|
+
|
|
|
+ <androidx.core.widget.NestedScrollView
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="0dp"
|
|
|
+ android:scrollbars="none"
|
|
|
+ app:layout_constraintBottom_toBottomOf="parent"
|
|
|
+ app:layout_constraintTop_toBottomOf="@+id/space_status_bar">
|
|
|
+
|
|
|
+ <androidx.constraintlayout.widget.ConstraintLayout
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="wrap_content">
|
|
|
+
|
|
|
+ <Space
|
|
|
+ android:id="@+id/space1"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="0dp"
|
|
|
+ app:layout_constraintDimensionRatio="360:50"
|
|
|
+ app:layout_constraintTop_toTopOf="parent" />
|
|
|
+
|
|
|
+ <View
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="0dp"
|
|
|
+ android:onClick="@{()->mineViewModel.onLoginClick()}"
|
|
|
+ app:layout_constraintBottom_toBottomOf="@+id/iv_account_avatar"
|
|
|
+ app:layout_constraintTop_toTopOf="@+id/iv_account_avatar" />
|
|
|
+
|
|
|
+ <ImageView
|
|
|
+ android:id="@+id/iv_account_avatar"
|
|
|
+ imageDraw="@{mineViewModel.isLogin ? @drawable/icon_logged_avatar:@drawable/icon_not_login_avatar}"
|
|
|
+ android:layout_width="0dp"
|
|
|
+ android:layout_height="0dp"
|
|
|
+ android:layout_marginStart="12dp"
|
|
|
+ app:layout_constraintDimensionRatio="1:1"
|
|
|
+ app:layout_constraintStart_toStartOf="parent"
|
|
|
+ app:layout_constraintTop_toBottomOf="@+id/space1"
|
|
|
+ app:layout_constraintWidth_percent="0.1333333333333333"
|
|
|
+ tools:src="@drawable/icon_not_login_avatar" />
|
|
|
+
|
|
|
+ <TextView
|
|
|
+ android:layout_width="wrap_content"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:layout_marginStart="12dp"
|
|
|
+ android:text="@{mineViewModel.loginTips}"
|
|
|
+ android:textColor="@color/common_txt_color"
|
|
|
+ android:textSize="18sp"
|
|
|
+ android:textStyle="bold"
|
|
|
+ app:layout_constraintBottom_toBottomOf="@+id/iv_account_avatar"
|
|
|
+ app:layout_constraintStart_toEndOf="@+id/iv_account_avatar"
|
|
|
+ app:layout_constraintTop_toTopOf="@+id/iv_account_avatar"
|
|
|
+ tools:text="去登录" />
|
|
|
+
|
|
|
+ <ImageView
|
|
|
+ isGone="@{mineViewModel.isLogin}"
|
|
|
+ android:layout_width="0dp"
|
|
|
+ android:layout_height="0dp"
|
|
|
+ android:layout_marginEnd="@dimen/app_common_page_horizontal_padding"
|
|
|
+ android:src="@drawable/icon_login_arrow"
|
|
|
+ app:layout_constraintBottom_toBottomOf="@+id/iv_account_avatar"
|
|
|
+ app:layout_constraintDimensionRatio="1:1"
|
|
|
+ app:layout_constraintEnd_toEndOf="parent"
|
|
|
+ app:layout_constraintTop_toTopOf="@+id/iv_account_avatar"
|
|
|
+ app:layout_constraintWidth_percent="0.0666666666666667" />
|
|
|
+
|
|
|
+ <Space
|
|
|
+ android:id="@+id/space2"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="0dp"
|
|
|
+ app:layout_constraintDimensionRatio="360:27"
|
|
|
+ app:layout_constraintTop_toBottomOf="@+id/iv_account_avatar" />
|
|
|
+
|
|
|
+ <ImageView
|
|
|
+ android:id="@+id/iv_mine_member"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="0dp"
|
|
|
+ android:layout_marginHorizontal="@dimen/app_common_page_horizontal_padding"
|
|
|
+ android:src="@drawable/bg_mine_member"
|
|
|
+ app:layout_constraintDimensionRatio="984:234"
|
|
|
+ app:layout_constraintTop_toBottomOf="@+id/space2" />
|
|
|
+
|
|
|
+ <ImageView
|
|
|
+ android:id="@+id/iv_mine_member_title"
|
|
|
+ android:layout_width="0dp"
|
|
|
+ android:layout_height="0dp"
|
|
|
+ android:src="@drawable/icon_mine_member_title"
|
|
|
+ app:layout_constraintBottom_toTopOf="@+id/tv_mine_member_tips"
|
|
|
+ app:layout_constraintDimensionRatio="480:67"
|
|
|
+ app:layout_constraintEnd_toEndOf="@+id/iv_mine_member"
|
|
|
+ app:layout_constraintHorizontal_bias="0.0843373493975904"
|
|
|
+ app:layout_constraintStart_toStartOf="@+id/iv_mine_member"
|
|
|
+ app:layout_constraintTop_toTopOf="@+id/iv_mine_member"
|
|
|
+ app:layout_constraintVertical_chainStyle="packed"
|
|
|
+ app:layout_constraintWidth_percent="0.4416666666666667" />
|
|
|
+
|
|
|
+ <TextView
|
|
|
+ android:id="@+id/tv_mine_member_tips"
|
|
|
+ android:layout_width="wrap_content"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:layout_marginTop="3dp"
|
|
|
+ android:letterSpacing="0.09"
|
|
|
+ android:lineSpacingMultiplier="2"
|
|
|
+ android:text="@string/mine_member_tips"
|
|
|
+ android:textColor="#B46B36"
|
|
|
+ android:textSize="11dp"
|
|
|
+ app:layout_constraintBottom_toBottomOf="@id/iv_mine_member"
|
|
|
+ app:layout_constraintStart_toStartOf="@+id/iv_mine_member_title"
|
|
|
+ app:layout_constraintTop_toBottomOf="@+id/iv_mine_member_title" />
|
|
|
+
|
|
|
+ <TextView
|
|
|
+ android:layout_width="0dp"
|
|
|
+ android:layout_height="0dp"
|
|
|
+ android:background="@drawable/bg_mine_restore_now"
|
|
|
+ android:gravity="center"
|
|
|
+ android:text="@string/mine_restore_now"
|
|
|
+ android:textColor="#FFF9EC"
|
|
|
+ android:textSize="12sp"
|
|
|
+ android:textStyle="bold"
|
|
|
+ app:layout_constraintBottom_toBottomOf="@id/iv_mine_member"
|
|
|
+ app:layout_constraintDimensionRatio="82:28"
|
|
|
+ app:layout_constraintEnd_toEndOf="@+id/iv_mine_member"
|
|
|
+ app:layout_constraintHorizontal_bias="0.9549180327868852"
|
|
|
+ app:layout_constraintStart_toStartOf="@id/iv_mine_member"
|
|
|
+ app:layout_constraintTop_toTopOf="@+id/iv_mine_member"
|
|
|
+ app:layout_constraintWidth_percent="0.2277777777777778" />
|
|
|
+
|
|
|
+ <Space
|
|
|
+ android:id="@+id/space3"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="0dp"
|
|
|
+ app:layout_constraintDimensionRatio="360:14"
|
|
|
+ app:layout_constraintTop_toBottomOf="@+id/iv_mine_member" />
|
|
|
+
|
|
|
+ <LinearLayout
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:layout_marginHorizontal="@dimen/app_common_page_horizontal_padding"
|
|
|
+ android:background="@drawable/bg_mine_container"
|
|
|
+ android:orientation="vertical"
|
|
|
+ android:paddingVertical="6dp"
|
|
|
+ app:layout_constraintTop_toBottomOf="@+id/space3">
|
|
|
+
|
|
|
+ <include
|
|
|
+ android:onClick="@{()->mineViewModel.onAboutClick()}"
|
|
|
+ layout="@layout/layout_item_settings"
|
|
|
+ settingsIcon="@{@drawable/icon_small_about}"
|
|
|
+ settingsName="@{@string/mine_about}"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="wrap_content" />
|
|
|
+
|
|
|
+ <include
|
|
|
+ isGone="@{!mineViewModel.isLogin}"
|
|
|
+ layout="@layout/layout_item_settings"
|
|
|
+ settingsIcon="@{@drawable/icon_small_suggestion}"
|
|
|
+ settingsName="@{@string/mine_suggestion}"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="wrap_content" />
|
|
|
+
|
|
|
+ <include
|
|
|
+ layout="@layout/layout_item_settings"
|
|
|
+ settingsIcon="@{@drawable/icon_small_customer_service}"
|
|
|
+ settingsName="@{@string/mine_customer_service}"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="wrap_content" />
|
|
|
+
|
|
|
+ <include
|
|
|
+ isGone="@{!mineViewModel.isLogin}"
|
|
|
+ layout="@layout/layout_item_settings"
|
|
|
+ settingsIcon="@{@drawable/icon_small_account_logout}"
|
|
|
+ settingsName="@{@string/mine_account_logout}"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="wrap_content" />
|
|
|
+
|
|
|
+ <include
|
|
|
+ android:onClick="@{()->mineViewModel.onExitClick()}"
|
|
|
+ isGone="@{!mineViewModel.isLogin}"
|
|
|
+ layout="@layout/layout_item_settings"
|
|
|
+ settingsIcon="@{@drawable/icon_small_exit}"
|
|
|
+ settingsName="@{@string/mine_exit}"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="wrap_content" />
|
|
|
+
|
|
|
+ </LinearLayout>
|
|
|
+
|
|
|
+ </androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
+
|
|
|
+ </androidx.core.widget.NestedScrollView>
|
|
|
+
|
|
|
+ </androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
+</layout>
|