Revert "アニメーションを全部に追加する WIP"

This reverts commit c5081f73be.
This commit is contained in:
ろむねこ 2023-12-18 13:12:48 +09:00
parent c5081f73be
commit 8e34ba7939
No known key found for this signature in database
GPG Key ID: FA1F39A1BA37D168
6 changed files with 18 additions and 7 deletions

View File

@ -31,10 +31,20 @@ public class MainActivity extends AppCompatActivity {
NavHostFragment navHostFragment = (NavHostFragment) supportFragmentManager.findFragmentById(R.id.nav_host_fragment); 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); BottomNavigationView bottomNavigationView = findViewById(R.id.bottom_nav);
NavController navController = navHostFragment.getNavController(); NavController navController = navHostFragment.getNavController();
NavigationUI.setupWithNavController(bottomNavigationView, navController); NavigationUI.setupWithNavController(bottomNavigationView, navController);
Toast.makeText(this, "testMessage", Toast.LENGTH_SHORT).show(); Toast.makeText(this, "testMessage", Toast.LENGTH_SHORT).show();

View File

@ -2,7 +2,7 @@
<navigation xmlns:android="http://schemas.android.com/apk/res/android" <navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/app_main_nav" android:id="@+id/app_main_nav"
app:startDestination="@id/feature_home_navigation"> app:startDestination="@id/feature_debug_navigation">
<include app:graph="@navigation/feature_debug_navigation" /> <include app:graph="@navigation/feature_debug_navigation" />
@ -10,4 +10,5 @@
<include app:graph="@navigation/feature_home_navigation" /> <include app:graph="@navigation/feature_home_navigation" />
</navigation> </navigation>

View File

@ -40,7 +40,7 @@ public class DebugMenuTopFragment extends Fragment {
enterTransition.setDuration(500); enterTransition.setDuration(500);
setEnterTransition(enterTransition); setEnterTransition(enterTransition);
MaterialSharedAxis returnTransition = new MaterialSharedAxis(MaterialSharedAxis.Z, true); MaterialSharedAxis returnTransition = new MaterialSharedAxis(MaterialSharedAxis.Z, false);
returnTransition.setDuration(500); returnTransition.setDuration(500);
setReturnTransition(returnTransition); setReturnTransition(returnTransition);
} }

View File

@ -59,7 +59,7 @@ public class HomeTopFragment extends Fragment {
enterTransition.setDuration(500); enterTransition.setDuration(500);
setEnterTransition(enterTransition); setEnterTransition(enterTransition);
MaterialSharedAxis returnTransition = new MaterialSharedAxis(MaterialSharedAxis.Z, true); MaterialSharedAxis returnTransition = new MaterialSharedAxis(MaterialSharedAxis.Z, false);
returnTransition.setDuration(500); returnTransition.setDuration(500);
setReturnTransition(returnTransition); setReturnTransition(returnTransition);
} }

View File

@ -55,7 +55,7 @@ public class LibraryTopFragment extends Fragment {
enterTransition.setDuration(500); enterTransition.setDuration(500);
setEnterTransition(enterTransition); setEnterTransition(enterTransition);
MaterialSharedAxis returnTransition = new MaterialSharedAxis(MaterialSharedAxis.Z, true); MaterialSharedAxis returnTransition = new MaterialSharedAxis(MaterialSharedAxis.Z, false);
returnTransition.setDuration(500); returnTransition.setDuration(500);
setReturnTransition(returnTransition); setReturnTransition(returnTransition);
} }

View File

@ -1,8 +1,8 @@
<resources xmlns:tools="http://schemas.android.com/tools"> <resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. --> <!-- Base application theme. -->
<style name="Base.Theme.Lacerta" parent="Theme.Material3.DayNight.NoActionBar"> <style name="Base.Theme.Lacerta" parent="Theme.Material3.DayNight.NoActionBar">
<!-- Customize your light theme here. -->
<!-- <item name="colorPrimary">@color/my_light_primary</item> -->
</style> </style>
<style name="Theme.Lacerta" parent="Base.Theme.Lacerta" > <style name="Theme.Lacerta" parent="Base.Theme.Lacerta" >