diff --git a/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/setup/NavSetUpFragment.java b/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/setup/NavSetUpFragment.java index 9d499c1..74e92fe 100644 --- a/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/setup/NavSetUpFragment.java +++ b/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/setup/NavSetUpFragment.java @@ -6,13 +6,15 @@ import android.view.View; import android.view.ViewGroup; import android.widget.TextView; +import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; +import androidx.lifecycle.LifecycleObserver; import androidx.lifecycle.ViewModelProvider; +import cc.niushuai.project.devcontrol.base.ui.BaseFragment; import cc.niushuai.project.devcontrol.databinding.MainNavFragmentSetUpBinding; - -public class NavSetUpFragment extends Fragment { +public class NavSetUpFragment extends BaseFragment { private MainNavFragmentSetUpBinding navFragmentSetUpBinding; @@ -20,18 +22,26 @@ public class NavSetUpFragment extends Fragment { public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - navFragmentSetUpBinding = MainNavFragmentSetUpBinding.inflate(inflater, container, false); + navFragmentSetUpBinding = MainNavFragmentSetUpBinding.inflate(getLayoutInflater()); - NavSetUpViewModel navSetUpViewModel = new ViewModelProvider(this).get(NavSetUpViewModel.class); View rootView = navFragmentSetUpBinding.getRoot(); - TextView textView = navFragmentSetUpBinding.navSetupFragmentTextview; - - navSetUpViewModel.getText().observe(getViewLifecycleOwner(), textView::setText); + this.init(); + this.addListener(); + rootView.requestLayout(); return rootView; } + private void addListener() { + + } + + private void init() { + + } + + @Override public void onDestroyView() { super.onDestroyView(); diff --git a/app/src/main/res/layout/main_nav_fragment_set_up.xml b/app/src/main/res/layout/main_nav_fragment_set_up.xml index aeac68d..8f01d42 100644 --- a/app/src/main/res/layout/main_nav_fragment_set_up.xml +++ b/app/src/main/res/layout/main_nav_fragment_set_up.xml @@ -6,15 +6,123 @@ android:layout_height="match_parent" tools:context=".ui.nav.setup.NavSetUpFragment"> - + android:layout_marginTop="10dp"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/setup_styles.xml b/app/src/main/res/values/setup_styles.xml new file mode 100644 index 0000000..e30ddd9 --- /dev/null +++ b/app/src/main/res/values/setup_styles.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ccd079a..71e2bf0 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -25,6 +25,19 @@ btn 2 btn 3 + + + + 通用 + 备份 + 恢复 + 日志 + 总开关 + 日志级别 + 保留天数 + + + 设备 日志