From 7278eb371baf9c3354a5c070eeff3cd619bda1de Mon Sep 17 00:00:00 2001 From: niushuai233 Date: Mon, 17 Oct 2022 17:28:50 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E8=B0=83=E6=95=B4=E5=8C=85?= =?UTF-8?q?=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/nav/{main => }/device/NavDeviceFragment.java | 5 +---- .../ui/nav/{main => }/device/NavDeviceViewModel.java | 2 +- .../devcontrol/ui/nav/{main => }/log/NavLogFragment.java | 2 +- .../devcontrol/ui/nav/{main => }/log/NavLogViewModel.java | 2 +- .../ui/nav/{main => }/setup/NavSetUpFragment.java | 2 +- .../ui/nav/{main => }/setup/NavSetUpViewModel.java | 2 +- app/src/main/res/layout/main_nav_fragment_device.xml | 2 +- app/src/main/res/layout/main_nav_fragment_log.xml | 2 +- app/src/main/res/layout/main_nav_fragment_set_up.xml | 2 +- app/src/main/res/navigation/main_navigation.xml | 6 +++--- 10 files changed, 12 insertions(+), 15 deletions(-) rename app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/{main => }/device/NavDeviceFragment.java (96%) rename app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/{main => }/device/NavDeviceViewModel.java (87%) rename app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/{main => }/log/NavLogFragment.java (95%) rename app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/{main => }/log/NavLogViewModel.java (87%) rename app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/{main => }/setup/NavSetUpFragment.java (95%) rename app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/{main => }/setup/NavSetUpViewModel.java (87%) diff --git a/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/main/device/NavDeviceFragment.java b/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/device/NavDeviceFragment.java similarity index 96% rename from app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/main/device/NavDeviceFragment.java rename to app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/device/NavDeviceFragment.java index b7ac57c..95d7c7b 100644 --- a/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/main/device/NavDeviceFragment.java +++ b/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/device/NavDeviceFragment.java @@ -1,4 +1,4 @@ -package cc.niushuai.project.devcontrol.ui.nav.main.device; +package cc.niushuai.project.devcontrol.ui.nav.device; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; @@ -12,15 +12,12 @@ import android.widget.SimpleAdapter; import android.widget.TextView; import android.widget.Toast; -import androidx.annotation.NonNull; import androidx.fragment.app.Fragment; -import androidx.gridlayout.widget.GridLayout; import androidx.lifecycle.ViewModelProvider; import java.util.ArrayList; import java.util.HashMap; import java.util.List; -import java.util.Map; import cc.niushuai.project.devcontrol.R; import cc.niushuai.project.devcontrol.base.entity.device.DeviceInfo; diff --git a/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/main/device/NavDeviceViewModel.java b/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/device/NavDeviceViewModel.java similarity index 87% rename from app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/main/device/NavDeviceViewModel.java rename to app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/device/NavDeviceViewModel.java index 5d77a31..68c6619 100644 --- a/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/main/device/NavDeviceViewModel.java +++ b/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/device/NavDeviceViewModel.java @@ -1,4 +1,4 @@ -package cc.niushuai.project.devcontrol.ui.nav.main.device; +package cc.niushuai.project.devcontrol.ui.nav.device; import androidx.lifecycle.MutableLiveData; import androidx.lifecycle.ViewModel; diff --git a/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/main/log/NavLogFragment.java b/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/log/NavLogFragment.java similarity index 95% rename from app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/main/log/NavLogFragment.java rename to app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/log/NavLogFragment.java index bc424ce..9d5e044 100644 --- a/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/main/log/NavLogFragment.java +++ b/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/log/NavLogFragment.java @@ -1,4 +1,4 @@ -package cc.niushuai.project.devcontrol.ui.nav.main.log; +package cc.niushuai.project.devcontrol.ui.nav.log; import android.os.Bundle; import android.view.LayoutInflater; diff --git a/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/main/log/NavLogViewModel.java b/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/log/NavLogViewModel.java similarity index 87% rename from app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/main/log/NavLogViewModel.java rename to app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/log/NavLogViewModel.java index ec3b543..122ee8b 100644 --- a/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/main/log/NavLogViewModel.java +++ b/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/log/NavLogViewModel.java @@ -1,4 +1,4 @@ -package cc.niushuai.project.devcontrol.ui.nav.main.log; +package cc.niushuai.project.devcontrol.ui.nav.log; import androidx.lifecycle.MutableLiveData; import androidx.lifecycle.ViewModel; diff --git a/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/main/setup/NavSetUpFragment.java b/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/setup/NavSetUpFragment.java similarity index 95% rename from app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/main/setup/NavSetUpFragment.java rename to app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/setup/NavSetUpFragment.java index a1a4596..9d499c1 100644 --- a/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/main/setup/NavSetUpFragment.java +++ b/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/setup/NavSetUpFragment.java @@ -1,4 +1,4 @@ -package cc.niushuai.project.devcontrol.ui.nav.main.setup; +package cc.niushuai.project.devcontrol.ui.nav.setup; import android.os.Bundle; import android.view.LayoutInflater; diff --git a/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/main/setup/NavSetUpViewModel.java b/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/setup/NavSetUpViewModel.java similarity index 87% rename from app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/main/setup/NavSetUpViewModel.java rename to app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/setup/NavSetUpViewModel.java index d4701b8..3509e1a 100644 --- a/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/main/setup/NavSetUpViewModel.java +++ b/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/setup/NavSetUpViewModel.java @@ -1,4 +1,4 @@ -package cc.niushuai.project.devcontrol.ui.nav.main.setup; +package cc.niushuai.project.devcontrol.ui.nav.setup; import androidx.lifecycle.MutableLiveData; import androidx.lifecycle.ViewModel; diff --git a/app/src/main/res/layout/main_nav_fragment_device.xml b/app/src/main/res/layout/main_nav_fragment_device.xml index d02cacb..196816a 100644 --- a/app/src/main/res/layout/main_nav_fragment_device.xml +++ b/app/src/main/res/layout/main_nav_fragment_device.xml @@ -4,7 +4,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto" - tools:context=".ui.nav.main.device.NavDeviceFragment"> + tools:context=".ui.nav.device.NavDeviceFragment"> + tools:context=".ui.nav.log.NavLogFragment"> + tools:context=".ui.nav.setup.NavSetUpFragment"> \ No newline at end of file