From a44bdd317ded3281e2986929030e7367c278f42c 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:48 +0900 Subject: [PATCH] =?UTF-8?q?Revert=20"=E3=82=A2=E3=83=8B=E3=83=A1=E3=83=BC?= =?UTF-8?q?=E3=82=B7=E3=83=A7=E3=83=B3=E5=AE=9F=E8=A3=85=E3=83=86=E3=82=B9?= =?UTF-8?q?=E3=83=88"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 7df53d9f40ec6d1d87cbc2414d7e39f87e67e949. --- .../java/one/nem/lacerta/MainActivity.java | 9 --------- .../lacerta/feature/home/HomeTopFragment.java | 19 +++++++++---------- 2 files changed, 9 insertions(+), 19 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..8e18957e 100644 --- a/app/src/main/java/one/nem/lacerta/MainActivity.java +++ b/app/src/main/java/one/nem/lacerta/MainActivity.java @@ -32,15 +32,6 @@ 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); 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..a2023a02 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 @@ -11,8 +11,6 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; -import com.google.android.material.transition.MaterialSharedAxis; - /** * A simple {@link Fragment} subclass. * Use the {@link HomeTopFragment#newInstance} factory method to @@ -54,14 +52,15 @@ public class HomeTopFragment extends Fragment { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - - MaterialSharedAxis enterTransition = new MaterialSharedAxis(MaterialSharedAxis.Z, true); - enterTransition.setDuration(500); - setEnterTransition(enterTransition); - - MaterialSharedAxis returnTransition = new MaterialSharedAxis(MaterialSharedAxis.Z, false); - returnTransition.setDuration(500); - setReturnTransition(returnTransition); + // Transition + TransitionInflater inflater = TransitionInflater.from(requireContext()); + setEnterTransition(inflater.inflateTransition(android.R.transition.slide_top)); + setExitTransition(inflater.inflateTransition(android.R.transition.slide_bottom)); + if (getArguments() != null) { + mParam1 = getArguments().getString(ARG_PARAM1); + mParam2 = getArguments().getString(ARG_PARAM2); + } else { + } } @Override