Material fade through preview
This commit is contained in:
@@ -6,8 +6,8 @@ import androidx.annotation.IdRes
|
|||||||
import androidx.core.view.iterator
|
import androidx.core.view.iterator
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.fragment.app.FragmentManager
|
import androidx.fragment.app.FragmentManager
|
||||||
import androidx.fragment.app.FragmentTransaction
|
|
||||||
import com.google.android.material.navigation.NavigationBarView
|
import com.google.android.material.navigation.NavigationBarView
|
||||||
|
import com.google.android.material.transition.MaterialFadeThrough
|
||||||
import org.koitharu.kotatsu.R
|
import org.koitharu.kotatsu.R
|
||||||
import org.koitharu.kotatsu.core.ui.util.RecyclerViewOwner
|
import org.koitharu.kotatsu.core.ui.util.RecyclerViewOwner
|
||||||
import org.koitharu.kotatsu.core.util.ext.firstVisibleItemPosition
|
import org.koitharu.kotatsu.core.util.ext.firstVisibleItemPosition
|
||||||
@@ -120,10 +120,10 @@ class MainNavigationDelegate(
|
|||||||
if (fragmentManager.isStateSaved) {
|
if (fragmentManager.isStateSaved) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
fragment.enterTransition = MaterialFadeThrough()
|
||||||
fragmentManager.beginTransaction()
|
fragmentManager.beginTransaction()
|
||||||
.setReorderingAllowed(true)
|
.setReorderingAllowed(true)
|
||||||
.replace(R.id.container, fragment, TAG_PRIMARY)
|
.replace(R.id.container, fragment, TAG_PRIMARY)
|
||||||
.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE)
|
|
||||||
.commit()
|
.commit()
|
||||||
onFragmentChanged(fragment, fromUser = true)
|
onFragmentChanged(fragment, fromUser = true)
|
||||||
return true
|
return true
|
||||||
|
|||||||
Reference in New Issue
Block a user