From c5081f73be11a974d734a834ab11ce6de892eccd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Mon, 18 Dec 2023 13:12:42 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=A2=E3=83=8B=E3=83=A1=E3=83=BC=E3=82=B7?= =?UTF-8?q?=E3=83=A7=E3=83=B3=E3=82=92=E5=85=A8=E9=83=A8=E3=81=AB=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0=E3=81=99=E3=82=8B=20WIP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/one/nem/lacerta/MainActivity.java | 12 +----------- app/src/main/res/navigation/main_nav.xml | 3 +-- .../lacerta/feature/debug/DebugMenuTopFragment.java | 2 +- .../nem/lacerta/feature/home/HomeTopFragment.java | 2 +- .../lacerta/feature/library/LibraryTopFragment.java | 2 +- shared/ui/src/main/res/values/themes.xml | 4 ++-- 6 files changed, 7 insertions(+), 18 deletions(-) diff --git a/app/src/main/java/one/nem/lacerta/MainActivity.java b/app/src/main/java/one/nem/lacerta/MainActivity.java index b89f58d7..e4aecd88 100644 --- a/app/src/main/java/one/nem/lacerta/MainActivity.java +++ b/app/src/main/java/one/nem/lacerta/MainActivity.java @@ -31,20 +31,10 @@ public class MainActivity extends AppCompatActivity { NavHostFragment navHostFragment = (NavHostFragment) supportFragmentManager.findFragmentById(R.id.nav_host_fragment); - // Animation - if (navHostFragment != null) { - MaterialSharedAxis exitTransition = new MaterialSharedAxis(MaterialSharedAxis.Z, true); - exitTransition.setDuration(500); - navHostFragment.setExitTransition(exitTransition); - - MaterialSharedAxis reenterTransition = new MaterialSharedAxis(MaterialSharedAxis.Z, false); - reenterTransition.setDuration(500); - navHostFragment.setReenterTransition(reenterTransition); - } - BottomNavigationView bottomNavigationView = findViewById(R.id.bottom_nav); NavController navController = navHostFragment.getNavController(); + NavigationUI.setupWithNavController(bottomNavigationView, navController); Toast.makeText(this, "testMessage", Toast.LENGTH_SHORT).show(); diff --git a/app/src/main/res/navigation/main_nav.xml b/app/src/main/res/navigation/main_nav.xml index c1e9ce8c..499af12b 100644 --- a/app/src/main/res/navigation/main_nav.xml +++ b/app/src/main/res/navigation/main_nav.xml @@ -2,7 +2,7 @@ + app:startDestination="@id/feature_home_navigation"> @@ -10,5 +10,4 @@ - \ No newline at end of file diff --git a/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuTopFragment.java b/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuTopFragment.java index ba2e6386..47dcee4b 100644 --- a/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuTopFragment.java +++ b/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuTopFragment.java @@ -40,7 +40,7 @@ public class DebugMenuTopFragment extends Fragment { enterTransition.setDuration(500); setEnterTransition(enterTransition); - MaterialSharedAxis returnTransition = new MaterialSharedAxis(MaterialSharedAxis.Z, false); + MaterialSharedAxis returnTransition = new MaterialSharedAxis(MaterialSharedAxis.Z, true); returnTransition.setDuration(500); setReturnTransition(returnTransition); } diff --git a/feature/home/src/main/java/one/nem/lacerta/feature/home/HomeTopFragment.java b/feature/home/src/main/java/one/nem/lacerta/feature/home/HomeTopFragment.java index 8dca969c..9db88557 100644 --- a/feature/home/src/main/java/one/nem/lacerta/feature/home/HomeTopFragment.java +++ b/feature/home/src/main/java/one/nem/lacerta/feature/home/HomeTopFragment.java @@ -59,7 +59,7 @@ public class HomeTopFragment extends Fragment { enterTransition.setDuration(500); setEnterTransition(enterTransition); - MaterialSharedAxis returnTransition = new MaterialSharedAxis(MaterialSharedAxis.Z, false); + MaterialSharedAxis returnTransition = new MaterialSharedAxis(MaterialSharedAxis.Z, true); returnTransition.setDuration(500); setReturnTransition(returnTransition); } diff --git a/feature/library/src/main/java/one/nem/lacerta/feature/library/LibraryTopFragment.java b/feature/library/src/main/java/one/nem/lacerta/feature/library/LibraryTopFragment.java index d10e5842..9ed56561 100644 --- a/feature/library/src/main/java/one/nem/lacerta/feature/library/LibraryTopFragment.java +++ b/feature/library/src/main/java/one/nem/lacerta/feature/library/LibraryTopFragment.java @@ -55,7 +55,7 @@ public class LibraryTopFragment extends Fragment { enterTransition.setDuration(500); setEnterTransition(enterTransition); - MaterialSharedAxis returnTransition = new MaterialSharedAxis(MaterialSharedAxis.Z, false); + MaterialSharedAxis returnTransition = new MaterialSharedAxis(MaterialSharedAxis.Z, true); returnTransition.setDuration(500); setReturnTransition(returnTransition); } diff --git a/shared/ui/src/main/res/values/themes.xml b/shared/ui/src/main/res/values/themes.xml index 310dfc06..93697985 100644 --- a/shared/ui/src/main/res/values/themes.xml +++ b/shared/ui/src/main/res/values/themes.xml @@ -1,8 +1,8 @@