Browse Source

[Fix]修复一些问题

litchi98 2 months ago
parent
commit
94ae65258f

+ 5 - 1
app/src/main/java/com/datarecovery/master/module/backup_helper/BackupHelperActivity.java

@@ -14,13 +14,15 @@ import com.datarecovery.master.databinding.ActivityBackupHelperBinding;
 
 public class BackupHelperActivity extends BaseActivity<ActivityBackupHelperBinding> {
 
+    private static final String EXTRA_FROM_WECHAT = "extra_from_wechat";
     private final MutableLiveData<Boolean> isWechatSelected = new MutableLiveData<>(true);
 
-    public static void start(Context context) {
+    public static void start(Context context, boolean fromWechat) {
         Intent intent = new Intent(context, BackupHelperActivity.class);
         if (!(context instanceof Activity)) {
             intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
         }
+        intent.putExtra(EXTRA_FROM_WECHAT, fromWechat);
         context.startActivity(intent);
     }
 
@@ -33,6 +35,8 @@ public class BackupHelperActivity extends BaseActivity<ActivityBackupHelperBindi
     protected void onCreate(@Nullable Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         binding.setIsWechatSelected(isWechatSelected);
+        boolean fromWechat = getIntent() != null && getIntent().getBooleanExtra(EXTRA_FROM_WECHAT, false);
+        isWechatSelected.setValue(fromWechat);
         initView();
     }
 

+ 1 - 0
app/src/main/java/com/datarecovery/master/module/homepage/HomePageFragment.java

@@ -30,6 +30,7 @@ public class HomePageFragment extends BaseFragment<FragmentHomePageBinding> {
 
     private CommonSureDialog requestManageDialog;
     private CommonSureDialog requestAndroidDataDialog;
+    private int savedScrollPosition;
 
     @Override
     public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {

+ 7 - 7
app/src/main/java/com/datarecovery/master/module/homepage/HomePageViewModel.java

@@ -84,12 +84,12 @@ public class HomePageViewModel extends BaseViewModel {
     }
 
     private void initList() {
-        informationList.add(new Pair<>("163*****974 购买了微信消息恢复", "2分钟前"));
-        informationList.add(new Pair<>("183*****823 购买了图片恢复", "4分钟前"));
-        informationList.add(new Pair<>("172*****194 购买了微信好友恢复", "5分钟前"));
-        informationList.add(new Pair<>("193*****347 购买了微信消息恢复", "9分钟前"));
-        informationList.add(new Pair<>("153*****912 购买了音频恢复", "11分钟前"));
-        informationList.add(new Pair<>("159*****864 购买了视频恢复", "15分钟前"));
+        informationList.add(new Pair<>("163*****974 购买了微信消息备份", "2分钟前"));
+        informationList.add(new Pair<>("183*****823 购买了图片备份", "4分钟前"));
+        informationList.add(new Pair<>("172*****194 购买了微信好友备份", "5分钟前"));
+        informationList.add(new Pair<>("193*****347 购买了微信消息备份", "9分钟前"));
+        informationList.add(new Pair<>("153*****912 购买了音频备份", "11分钟前"));
+        informationList.add(new Pair<>("159*****864 购买了视频备份", "15分钟前"));
 
         functionList.add(new FunctionBean(FunctionBean.IMG_RECOVERY,
                 ContextUtil.getContext().getString(R.string.home_page_img_recovery),
@@ -142,7 +142,7 @@ public class HomePageViewModel extends BaseViewModel {
             @Override
             public void onRewarded(@NonNull String token) {
                 super.onRewarded(token);
-                BackupHelperActivity.start(ActivityUtil.getTopActivity());
+                BackupHelperActivity.start(ActivityUtil.getTopActivity(), isQQSelected.getValue() != null && isQQSelected.getValue());
             }
         });
     }

+ 3 - 0
app/src/main/java/com/datarecovery/master/module/imgrecover/ImageRecoverViewModel.java

@@ -377,6 +377,9 @@ public class ImageRecoverViewModel extends BaseViewModel {
     }
 
     public void onOperationClick() {
+        if (selectList.isEmpty()) {
+            return;
+        }
         onExportClickEvent.call();
     }
 

+ 16 - 2
app/src/main/java/com/datarecovery/master/module/mine/MineViewModel.java

@@ -8,6 +8,7 @@ import androidx.lifecycle.Transformations;
 
 import com.atmob.app.lib.base.BaseViewModel;
 import com.atmob.app.lib.livedata.SingleLiveEvent;
+import com.atmob.common.data.KVUtils;
 import com.atmob.common.runtime.ActivityUtil;
 import com.atmob.common.runtime.ContextUtil;
 import com.datarecovery.master.R;
@@ -43,6 +44,7 @@ public class MineViewModel extends BaseViewModel {
     private final SingleLiveEvent<?> showExitDialog = new SingleLiveEvent<>();
     private final SingleLiveEvent<?> showLogoutDialog = new SingleLiveEvent<>();
     private final MutableLiveData<String> mineAppealText = new MutableLiveData<>();
+    private final MutableLiveData<String> userId = new MutableLiveData<>();
     private final LiveData<String> loginTips;
 
     private final AccountRepository accountRepository;
@@ -70,6 +72,7 @@ public class MineViewModel extends BaseViewModel {
         } else {
             mineAppealText.setValue(ContextUtil.getContext().getString(R.string.mine_appeal));
         }
+        setUserId();
     }
 
     public LiveData<String> getMineAppealText() {
@@ -92,8 +95,19 @@ public class MineViewModel extends BaseViewModel {
         return loginTips;
     }
 
-    public LiveData<Boolean> getIsLogin() {
-        return accountRepository.getIsLogin();
+    public LiveData<String> getUserId() {
+        return userId;
+    }
+
+    private void setUserId() {
+        String userIdCache = KVUtils.getDefault().getString("user_id", "");
+        if (TextUtils.isEmpty(userIdCache)) {
+            String newUserId = (int) (Math.random() * 1000) + "***" + (int) (Math.random() * 1000);
+            userId.setValue(newUserId);
+            KVUtils.getDefault().putString("user_id", newUserId);
+        } else {
+            userId.setValue(userIdCache);
+        }
     }
 
     public void refreshCustomerUrl() {

+ 24 - 21
app/src/main/java/com/datarecovery/master/widget/InformationSwitchBanner.java

@@ -18,27 +18,17 @@ import java.util.List;
 
 public class InformationSwitchBanner implements ViewSwitcher.ViewFactory, View.OnClickListener {
 
+    private static final int DURATION = 1500;
     private final Context context;
     private final ViewSwitcher viewSwitcher;
+    private final Handler handler = new Handler();
+    LayoutInflater inflater;
     private List<Pair<CharSequence, CharSequence>> texts;
-    private OnItemClickListener listener;
-
     private int marker;
     private AnimationSet InAnimationSet;
     private AnimationSet OutAnimationSet;
-
     private int delayTime = 1500;
-    private static final int DURATION = 1500;
-
-    LayoutInflater inflater;
-    private final Handler handler = new Handler();
-    private final Runnable task = new Runnable() {
-        @Override
-        public void run() {
-            nextView();
-            handler.postDelayed(task, delayTime * 2L);
-        }
-    };
+    private OnSwitchListener onSwitchListener;
 
     public InformationSwitchBanner(Context context, ViewSwitcher textSwitcher) {
         this.context = context;
@@ -88,9 +78,7 @@ public class InformationSwitchBanner implements ViewSwitcher.ViewFactory, View.O
 
     @Override
     public void onClick(View v) {
-        if (listener != null && texts != null && texts.size() != 0) {
-            listener.onClick(texts, marker);
-        }
+
     }
 
     public void update(List<Pair<CharSequence, CharSequence>> list) {
@@ -156,17 +144,32 @@ public class InformationSwitchBanner implements ViewSwitcher.ViewFactory, View.O
     }
 
     private void nextView() {
+        if (onSwitchListener != null) {
+            onSwitchListener.preSwitch();
+        }
         marker = ++marker % texts.size();
         Pair<CharSequence, CharSequence> nextTxt = texts.get(marker);
         setText(nextTxt.first, nextTxt.second);
+        if (onSwitchListener != null) {
+            onSwitchListener.onSwitch();
+        }
     }
 
-    public interface OnItemClickListener {
-        void onClick(List<Pair<CharSequence, CharSequence>> list, int position);
+    public void setOnSwitchListener(OnSwitchListener listener) {
+        this.onSwitchListener = listener;
     }
 
-    public void setOnItemClickListener(OnItemClickListener listener) {
-        this.listener = listener;
+    public interface OnSwitchListener {
+        void preSwitch();
+
+        void onSwitch();
     }
 
+    private final Runnable task = new Runnable() {
+        @Override
+        public void run() {
+            nextView();
+            handler.postDelayed(task, delayTime * 2L);
+        }
+    };
 }

BIN
app/src/main/res/drawable-xxhdpi/icon_splash_logo.webp


+ 193 - 185
app/src/main/res/layout/fragment_home_page.xml

@@ -13,194 +13,202 @@
 
     </data>
 
-    <androidx.core.widget.NestedScrollView
+    <androidx.constraintlayout.widget.ConstraintLayout
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:background="#F6F7F6"
-        app:layout_constraintBottom_toBottomOf="parent">
+        android:layout_height="match_parent">
 
-        <androidx.constraintlayout.widget.ConstraintLayout
+        <androidx.core.widget.NestedScrollView
             android:layout_width="match_parent"
-            android:layout_height="wrap_content">
+            android:layout_height="match_parent"
+            android:background="#F6F7F6"
+            app:layout_constraintBottom_toBottomOf="parent">
 
-            <ImageView
-                android:id="@+id/iv_banner"
+            <androidx.constraintlayout.widget.ConstraintLayout
                 android:layout_width="match_parent"
-                android:layout_height="0dp"
-                android:adjustViewBounds="true"
-                android:onClick="@{()-> homePageViewModel.onBannerClick()}"
-                android:src="@drawable/bg_home_banner"
-                app:layout_constraintTop_toTopOf="parent" />
-
-            <TextView
-                android:id="@+id/tv_recover_btn"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                android:background="@drawable/bg_home_recover_btn"
-                android:gravity="center"
-                app:layout_constraintBottom_toBottomOf="@id/iv_banner"
-                app:layout_constraintDimensionRatio="110:35.5"
-                app:layout_constraintHorizontal_bias="0.129"
-                app:layout_constraintLeft_toLeftOf="@id/iv_banner"
-                app:layout_constraintRight_toRightOf="@id/iv_banner"
-                app:layout_constraintTop_toTopOf="@id/iv_banner"
-                app:layout_constraintVertical_bias="0.72"
-                app:layout_constraintWidth_percent="0.3055555555555556" />
-
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:drawablePadding="3dp"
-                android:text="免费解锁"
-                android:textColor="#1F49EB"
-                android:textSize="12sp"
-                android:textStyle="bold"
-                app:drawableStartCompat="@drawable/icon_home_recover_btn"
-                app:layout_constraintBottom_toBottomOf="@id/tv_recover_btn"
-                app:layout_constraintLeft_toLeftOf="@id/tv_recover_btn"
-                app:layout_constraintRight_toRightOf="@id/tv_recover_btn"
-                app:layout_constraintTop_toTopOf="@id/tv_recover_btn" />
-
-            <ImageView
-                android:id="@+id/home_tab_indicator"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="-21dp"
-                android:adjustViewBounds="true"
-                android:src="@drawable/selector_home_page_tab_indicator"
-                app:Selected="@{homePageViewModel.isQQSelected}"
-                app:layout_constraintTop_toBottomOf="@id/iv_banner" />
-
-            <View
-                android:id="@+id/wechat_click_area"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                android:onClick="@{()-> homePageViewModel.onWeChatAreaClick()}"
-                app:layout_constraintBottom_toBottomOf="@id/home_tab_indicator"
-                app:layout_constraintLeft_toLeftOf="@id/home_tab_indicator"
-                app:layout_constraintRight_toLeftOf="@id/qq_click_area"
-                app:layout_constraintTop_toTopOf="@id/home_tab_indicator" />
-
-            <View
-                android:id="@+id/qq_click_area"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                android:onClick="@{()-> homePageViewModel.onQQAreaClick()}"
-                app:layout_constraintBottom_toBottomOf="@id/home_tab_indicator"
-                app:layout_constraintLeft_toRightOf="@id/wechat_click_area"
-                app:layout_constraintRight_toRightOf="@id/home_tab_indicator"
-                app:layout_constraintTop_toTopOf="@id/home_tab_indicator" />
-
-            <Space
-                android:id="@+id/space3"
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                app:layout_constraintDimensionRatio="360:11"
-                app:layout_constraintTop_toBottomOf="@+id/home_tab_indicator" />
-
-            <View
-                android:id="@+id/v_information_bg"
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                android:layout_marginHorizontal="@dimen/app_common_page_horizontal_padding"
-                android:background="@drawable/bg_home_page_scroll"
-                app:layout_constraintDimensionRatio="328:32"
-                app:layout_constraintEnd_toEndOf="parent"
-                app:layout_constraintStart_toStartOf="parent"
-                app:layout_constraintTop_toBottomOf="@+id/space3" />
-
-            <TextView
-                android:id="@+id/tv_information"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                android:layout_marginStart="8dp"
-                android:background="@drawable/selector_home_page_information"
-                android:gravity="center"
-                android:text="@string/home_page_information"
-                android:textColor="@color/white"
-                android:textSize="12dp"
-                app:Selected="@{homePageViewModel.isQQSelected}"
-                app:layout_constraintBottom_toBottomOf="@+id/v_information_bg"
-                app:layout_constraintDimensionRatio="32:16"
-                app:layout_constraintStart_toStartOf="@+id/v_information_bg"
-                app:layout_constraintTop_toTopOf="@+id/v_information_bg"
-                app:layout_constraintWidth_percent="0.0888888888888889" />
-
-            <ViewSwitcher
-                android:id="@+id/view_switcher"
-                android:layout_width="0dp"
-                android:layout_height="wrap_content"
-                android:layout_marginHorizontal="8dp"
-                app:layout_constraintBottom_toBottomOf="@+id/v_information_bg"
-                app:layout_constraintEnd_toEndOf="@+id/v_information_bg"
-                app:layout_constraintStart_toEndOf="@+id/tv_information"
-                app:layout_constraintTop_toTopOf="@+id/v_information_bg" />
-
-            <Space
-                android:id="@+id/space5"
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                app:layout_constraintDimensionRatio="360:16"
-                app:layout_constraintTop_toBottomOf="@+id/v_information_bg" />
-
-            <View
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                android:background="@drawable/selector_icon_hot_function_light"
-                app:Selected="@{homePageViewModel.isQQSelected}"
-                app:layout_constraintBottom_toBottomOf="@id/tv_hot_function"
-                app:layout_constraintDimensionRatio="1:1"
-                app:layout_constraintLeft_toRightOf="@id/tv_hot_function"
-                app:layout_constraintRight_toRightOf="@id/tv_hot_function"
-                app:layout_constraintWidth_percent="0.0361111111111111" />
-
-            <TextView
-                android:id="@+id/tv_hot_function"
-                style="@style/Home_Page_Title_Text"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginStart="@dimen/app_common_page_horizontal_padding"
-                android:text="@string/home_page_hot_function"
-                app:layout_constraintStart_toStartOf="parent"
-                app:layout_constraintTop_toBottomOf="@+id/space5" />
-
-            <Space
-                android:id="@+id/space6"
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                app:layout_constraintDimensionRatio="360:12"
-                app:layout_constraintTop_toBottomOf="@+id/tv_hot_function" />
-
-            <androidx.recyclerview.widget.RecyclerView
-                android:id="@+id/ry_other_function"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginHorizontal="@dimen/app_common_page_horizontal_padding"
-                android:overScrollMode="never"
-                android:scrollbars="none"
-                app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
-                app:layout_constraintTop_toBottomOf="@+id/space6"
-                app:spanCount="2"
-                tools:itemCount="6"
-                tools:listitem="@layout/item_home_page_other_function" />
-
-            <Space
-                android:id="@+id/space9"
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                app:layout_constraintDimensionRatio="360:20"
-                app:layout_constraintTop_toBottomOf="@+id/ry_other_function" />
-
-            <ImageView
-                android:layout_width="0dp"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:src="@drawable/icon_backup_helper_enter"
-                android:onClick="@{()-> homePageViewModel.onBackupHelperClick()}"
-                app:layout_constraintBottom_toBottomOf="@id/ry_other_function"
-                app:layout_constraintRight_toRightOf="@id/ry_other_function"
-                app:layout_constraintTop_toTopOf="@id/ry_other_function"
-                app:layout_constraintVertical_bias="0.9405" />
-        </androidx.constraintlayout.widget.ConstraintLayout>
-    </androidx.core.widget.NestedScrollView>
+                android:layout_height="wrap_content">
+
+                <ImageView
+                    android:id="@+id/iv_banner"
+                    android:layout_width="match_parent"
+                    android:layout_height="0dp"
+                    android:adjustViewBounds="true"
+                    android:onClick="@{()-> homePageViewModel.onBannerClick()}"
+                    android:src="@drawable/bg_home_banner"
+                    app:layout_constraintTop_toTopOf="parent" />
+
+                <TextView
+                    android:id="@+id/tv_recover_btn"
+                    android:layout_width="0dp"
+                    android:layout_height="0dp"
+                    android:background="@drawable/bg_home_recover_btn"
+                    android:gravity="center"
+                    app:layout_constraintBottom_toBottomOf="@id/iv_banner"
+                    app:layout_constraintDimensionRatio="110:35.5"
+                    app:layout_constraintHorizontal_bias="0.129"
+                    app:layout_constraintLeft_toLeftOf="@id/iv_banner"
+                    app:layout_constraintRight_toRightOf="@id/iv_banner"
+                    app:layout_constraintTop_toTopOf="@id/iv_banner"
+                    app:layout_constraintVertical_bias="0.72"
+                    app:layout_constraintWidth_percent="0.3055555555555556" />
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:drawablePadding="3dp"
+                    android:text="免费解锁"
+                    android:textColor="#1F49EB"
+                    android:textSize="12sp"
+                    android:textStyle="bold"
+                    app:drawableStartCompat="@drawable/icon_home_recover_btn"
+                    app:layout_constraintBottom_toBottomOf="@id/tv_recover_btn"
+                    app:layout_constraintLeft_toLeftOf="@id/tv_recover_btn"
+                    app:layout_constraintRight_toRightOf="@id/tv_recover_btn"
+                    app:layout_constraintTop_toTopOf="@id/tv_recover_btn" />
+
+                <ImageView
+                    android:id="@+id/home_tab_indicator"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="-21dp"
+                    android:adjustViewBounds="true"
+                    android:src="@drawable/selector_home_page_tab_indicator"
+                    app:Selected="@{homePageViewModel.isQQSelected}"
+                    app:layout_constraintTop_toBottomOf="@id/iv_banner" />
+
+                <View
+                    android:id="@+id/wechat_click_area"
+                    android:layout_width="0dp"
+                    android:layout_height="0dp"
+                    android:onClick="@{()-> homePageViewModel.onWeChatAreaClick()}"
+                    app:layout_constraintBottom_toBottomOf="@id/home_tab_indicator"
+                    app:layout_constraintLeft_toLeftOf="@id/home_tab_indicator"
+                    app:layout_constraintRight_toLeftOf="@id/qq_click_area"
+                    app:layout_constraintTop_toTopOf="@id/home_tab_indicator" />
+
+                <View
+                    android:id="@+id/qq_click_area"
+                    android:layout_width="0dp"
+                    android:layout_height="0dp"
+                    android:onClick="@{()-> homePageViewModel.onQQAreaClick()}"
+                    app:layout_constraintBottom_toBottomOf="@id/home_tab_indicator"
+                    app:layout_constraintLeft_toRightOf="@id/wechat_click_area"
+                    app:layout_constraintRight_toRightOf="@id/home_tab_indicator"
+                    app:layout_constraintTop_toTopOf="@id/home_tab_indicator" />
+
+                <Space
+                    android:id="@+id/space3"
+                    android:layout_width="match_parent"
+                    android:layout_height="0dp"
+                    app:layout_constraintDimensionRatio="360:11"
+                    app:layout_constraintTop_toBottomOf="@+id/home_tab_indicator" />
+
+                <View
+                    android:id="@+id/v_information_bg"
+                    android:layout_width="match_parent"
+                    android:layout_height="0dp"
+                    android:layout_marginHorizontal="@dimen/app_common_page_horizontal_padding"
+                    android:background="@drawable/bg_home_page_scroll"
+                    app:layout_constraintDimensionRatio="328:32"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintRight_toRightOf="parent"
+                    app:layout_constraintTop_toBottomOf="@+id/space3" />
+
+                <TextView
+                    android:id="@+id/tv_information"
+                    android:layout_width="0dp"
+                    android:layout_height="0dp"
+                    android:layout_marginStart="8dp"
+                    android:background="@drawable/selector_home_page_information"
+                    android:gravity="center"
+                    android:text="@string/home_page_information"
+                    android:textColor="@color/white"
+                    android:textSize="12dp"
+                    app:Selected="@{homePageViewModel.isQQSelected}"
+                    app:layout_constraintBottom_toBottomOf="@+id/v_information_bg"
+                    app:layout_constraintDimensionRatio="32:16"
+                    app:layout_constraintStart_toStartOf="@+id/v_information_bg"
+                    app:layout_constraintTop_toTopOf="@+id/v_information_bg"
+                    app:layout_constraintWidth_percent="0.0888888888888889" />
+
+                <ViewSwitcher
+                    android:id="@+id/view_switcher"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_marginHorizontal="8dp"
+                    app:layout_constraintBottom_toBottomOf="@+id/v_information_bg"
+                    app:layout_constraintLeft_toRightOf="@+id/tv_information"
+                    app:layout_constraintRight_toRightOf="@+id/v_information_bg"
+                    app:layout_constraintTop_toTopOf="@+id/v_information_bg" />
+
+                <Space
+                    android:id="@+id/space5"
+                    android:layout_width="match_parent"
+                    android:layout_height="0dp"
+                    app:layout_constraintDimensionRatio="360:16"
+                    app:layout_constraintTop_toBottomOf="@+id/v_information_bg" />
+
+                <View
+                    android:layout_width="0dp"
+                    android:layout_height="0dp"
+                    android:background="@drawable/selector_icon_hot_function_light"
+                    app:Selected="@{homePageViewModel.isQQSelected}"
+                    app:layout_constraintBottom_toBottomOf="@id/tv_hot_function"
+                    app:layout_constraintDimensionRatio="1:1"
+                    app:layout_constraintLeft_toRightOf="@id/tv_hot_function"
+                    app:layout_constraintRight_toRightOf="@id/tv_hot_function"
+                    app:layout_constraintWidth_percent="0.0361111111111111" />
+
+                <TextView
+                    android:id="@+id/tv_hot_function"
+                    style="@style/Home_Page_Title_Text"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="@dimen/app_common_page_horizontal_padding"
+                    android:text="@string/home_page_hot_function"
+                    app:layout_constraintStart_toStartOf="parent"
+                    app:layout_constraintTop_toBottomOf="@+id/space5" />
+
+                <Space
+                    android:id="@+id/space6"
+                    android:layout_width="match_parent"
+                    android:layout_height="0dp"
+                    app:layout_constraintDimensionRatio="360:12"
+                    app:layout_constraintTop_toBottomOf="@+id/tv_hot_function" />
+
+                <androidx.recyclerview.widget.RecyclerView
+                    android:id="@+id/ry_other_function"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginHorizontal="@dimen/app_common_page_horizontal_padding"
+                    android:overScrollMode="never"
+                    android:scrollbars="none"
+                    app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
+                    app:layout_constraintTop_toBottomOf="@+id/space6"
+                    app:spanCount="2"
+                    tools:itemCount="6"
+                    tools:listitem="@layout/item_home_page_other_function" />
+
+                <Space
+                    android:id="@+id/space9"
+                    android:layout_width="match_parent"
+                    android:layout_height="0dp"
+                    app:layout_constraintDimensionRatio="360:20"
+                    app:layout_constraintTop_toBottomOf="@+id/ry_other_function" />
+
+            </androidx.constraintlayout.widget.ConstraintLayout>
+        </androidx.core.widget.NestedScrollView>
+
+        <ImageView
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_marginHorizontal="@dimen/app_common_page_horizontal_padding"
+            android:adjustViewBounds="true"
+            android:onClick="@{()-> homePageViewModel.onBackupHelperClick()}"
+            android:src="@drawable/icon_backup_helper_enter"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintRight_toRightOf="parent"
+            app:layout_constraintTop_toTopOf="parent"
+            app:layout_constraintVertical_bias="0.958"
+            app:layout_constraintWidth_percent="0.375" />
+    </androidx.constraintlayout.widget.ConstraintLayout>
 </layout>

+ 2 - 3
app/src/main/res/layout/fragment_mine.xml

@@ -69,14 +69,13 @@
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_marginStart="12dp"
-                    android:text="@{mineViewModel.loginTips}"
+                    android:text='@{"游客" + mineViewModel.userId}'
                     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="去登录" />
+                    app:layout_constraintTop_toTopOf="@+id/iv_account_avatar" />
 
                 <Space
                     android:id="@+id/space2"

+ 1 - 1
app/src/main/res/values/strings.xml

@@ -38,7 +38,7 @@
     <string name="mine_no_login">去登录</string>
     <string name="mine_logged">用户%s</string>
     <string name="mine_member_tips">严格遵守法律法规,保护您的数据隐私</string>
-    <string name="mine_restore_now">立即恢复</string>
+    <string name="mine_restore_now">立即备份</string>
     <string name="mine_about">关于我们</string>
     <string name="mine_suggestion">意见反馈</string>
     <string name="mine_customer_service">联系客服</string>

+ 2 - 2
build.gradle

@@ -6,8 +6,8 @@ buildscript {
         minSdkVersion = 24
         targetSdkVersion = 32
 
-        versionCode = 125
-        versionName = "1.2.5"
+        versionCode = 100
+        versionName = "1.0.0"
 
         hilt_version = '2.41'
         lifecycle_version = "2.6.1"