From 470d3cca27d319eaacb0278fa1c6b0696e36bfec 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 12:35:53 +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 --- .../feature/debug/DebugMenuContainerFragment.java | 13 +++++++++---- .../lacerta/feature/debug/DebugMenuTopFragment.java | 9 +++++++++ .../lacerta/feature/library/LibraryTopFragment.java | 13 +++++++++---- 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuContainerFragment.java b/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuContainerFragment.java index b714b9a3..16a707c1 100644 --- a/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuContainerFragment.java +++ b/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuContainerFragment.java @@ -8,6 +8,8 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import com.google.android.material.transition.MaterialSharedAxis; + import dagger.hilt.android.AndroidEntryPoint; /** @@ -52,10 +54,13 @@ public class DebugMenuContainerFragment extends Fragment { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - if (getArguments() != null) { - mParam1 = getArguments().getString(ARG_PARAM1); - mParam2 = getArguments().getString(ARG_PARAM2); - } + MaterialSharedAxis enterTransition = new MaterialSharedAxis(MaterialSharedAxis.Z, true); + enterTransition.setDuration(500); + setEnterTransition(enterTransition); + + MaterialSharedAxis returnTransition = new MaterialSharedAxis(MaterialSharedAxis.Z, false); + returnTransition.setDuration(500); + setReturnTransition(returnTransition); } @Override 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 26cb3c3b..ba2e6386 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 @@ -9,6 +9,8 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import com.google.android.material.transition.MaterialSharedAxis; + import java.util.ArrayList; import java.util.List; @@ -34,6 +36,13 @@ public class DebugMenuTopFragment 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); } @Override 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 495b235d..d10e5842 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 @@ -8,6 +8,8 @@ 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 LibraryTopFragment#newInstance} factory method to @@ -49,10 +51,13 @@ public class LibraryTopFragment extends Fragment { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - if (getArguments() != null) { - mParam1 = getArguments().getString(ARG_PARAM1); - mParam2 = getArguments().getString(ARG_PARAM2); - } + MaterialSharedAxis enterTransition = new MaterialSharedAxis(MaterialSharedAxis.Z, true); + enterTransition.setDuration(500); + setEnterTransition(enterTransition); + + MaterialSharedAxis returnTransition = new MaterialSharedAxis(MaterialSharedAxis.Z, false); + returnTransition.setDuration(500); + setReturnTransition(returnTransition); } @Override