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

This commit is contained in:
r-ca committed 2023-12-18 13:12:42 +09:00
1 parent 470d3cca27
commit c5081f73be
6 files changed
+7 -18

No files matched your search

@@ -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();
+1 -2
View File
@@ -2,7 +2,7 @@
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/app_main_nav"
app:startDestination="@id/feature_debug_navigation">
app:startDestination="@id/feature_home_navigation">
<include app:graph="@navigation/feature_debug_navigation" />
@@ -10,5 +10,4 @@
<include app:graph="@navigation/feature_home_navigation" />
</navigation>