diff --git a/app/src/main/java/com/simplified/wsstatussaver/fragments/ToolFragment.kt b/app/src/main/java/com/simplified/wsstatussaver/fragments/ToolFragment.kt index df0c5ab..fef5e15 100644 --- a/app/src/main/java/com/simplified/wsstatussaver/fragments/ToolFragment.kt +++ b/app/src/main/java/com/simplified/wsstatussaver/fragments/ToolFragment.kt @@ -24,7 +24,7 @@ import androidx.core.content.getSystemService import androidx.core.view.doOnPreDraw import androidx.lifecycle.Observer import androidx.navigation.fragment.findNavController -import com.google.android.material.transition.MaterialFadeThrough +import com.google.android.material.transition.MaterialSharedAxis import com.simplified.wsstatussaver.R import com.simplified.wsstatussaver.WhatSaveViewModel import com.simplified.wsstatussaver.databinding.FragmentToolBinding @@ -72,8 +72,8 @@ class ToolFragment : BaseFragment(R.layout.fragment_tool) { postponeEnterTransition() view.doOnPreDraw { startPostponedEnterTransition() } - enterTransition = MaterialFadeThrough().addTarget(view) - reenterTransition = MaterialFadeThrough().addTarget(view) + enterTransition = MaterialSharedAxis(MaterialSharedAxis.Y, true) + reenterTransition = MaterialSharedAxis(MaterialSharedAxis.Y, true) } private fun openMessageView() { diff --git a/app/src/main/java/com/simplified/wsstatussaver/fragments/statuses/StatusesFragment.kt b/app/src/main/java/com/simplified/wsstatussaver/fragments/statuses/StatusesFragment.kt index 643e910..1d37f48 100644 --- a/app/src/main/java/com/simplified/wsstatussaver/fragments/statuses/StatusesFragment.kt +++ b/app/src/main/java/com/simplified/wsstatussaver/fragments/statuses/StatusesFragment.kt @@ -30,7 +30,7 @@ import androidx.recyclerview.widget.RecyclerView.AdapterDataObserver import androidx.swiperefreshlayout.widget.SwipeRefreshLayout.OnRefreshListener import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.snackbar.Snackbar -import com.google.android.material.transition.MaterialFadeThrough +import com.google.android.material.transition.MaterialSharedAxis import com.simplified.wsstatussaver.R import com.simplified.wsstatussaver.WhatSaveViewModel import com.simplified.wsstatussaver.adapter.StatusAdapter @@ -88,8 +88,8 @@ abstract class StatusesFragment : BaseFragment(R.layout.fragment_statuses), super.onViewCreated(view, savedInstanceState) postponeEnterTransition() view.doOnPreDraw { startPostponedEnterTransition() } - enterTransition = MaterialFadeThrough().addTarget(view) - reenterTransition = MaterialFadeThrough().addTarget(view) + enterTransition = MaterialSharedAxis(MaterialSharedAxis.Y, true) + reenterTransition = MaterialSharedAxis(MaterialSharedAxis.Y, true) _binding = StatusesBinding(FragmentStatusesBinding.bind(view)).apply { swipeRefreshLayout.setOnRefreshListener(this@StatusesFragment) swipeRefreshLayout.setColorSchemeColors(view.context.primaryColor())