Skip to content

Commit

Permalink
(ui): update top-level transition for main destinations
Browse files Browse the repository at this point in the history
  • Loading branch information
mardous committed Dec 22, 2024
1 parent e00e151 commit 15427f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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())
Expand Down

0 comments on commit 15427f7

Please sign in to comment.