Fixed shared element(image) overlapping on bottom sheet
This commit is contained in:
parent
734cdea427
commit
2517220f1b
2 changed files with 16 additions and 5 deletions
|
@ -104,7 +104,9 @@ class AlbumDetailsFragment : AbsMainActivityFragment(R.layout.fragment_album_det
|
|||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
sharedElementEnterTransition = MaterialContainerTransform().apply {
|
||||
drawingViewId = R.id.fragment_container
|
||||
scrimColor = Color.TRANSPARENT
|
||||
setAllContainerColors(requireContext().resolveColor(R.attr.colorSurface))
|
||||
setPathMotion(MaterialArcMotion())
|
||||
}
|
||||
}
|
||||
|
@ -229,7 +231,8 @@ class AlbumDetailsFragment : AbsMainActivityFragment(R.layout.fragment_album_det
|
|||
loadAlbumCover(album)
|
||||
simpleSongAdapter.swapDataSet(album.songs)
|
||||
if (albumArtistExists) {
|
||||
detailsViewModel.getAlbumArtist(album.albumArtist.toString()).observe(viewLifecycleOwner, {
|
||||
detailsViewModel.getAlbumArtist(album.albumArtist.toString())
|
||||
.observe(viewLifecycleOwner, {
|
||||
loadArtistImage(it)
|
||||
})
|
||||
} else {
|
||||
|
@ -303,7 +306,12 @@ class AlbumDetailsFragment : AbsMainActivityFragment(R.layout.fragment_album_det
|
|||
})
|
||||
GlideApp.with(requireContext()).asBitmapPalette().artistImageOptions(artist)
|
||||
//.forceDownload(PreferenceUtil.isAllowedToDownloadMetadata())
|
||||
.load(RetroGlideExtension.getArtistModel(artist, PreferenceUtil.isAllowedToDownloadMetadata()))
|
||||
.load(
|
||||
RetroGlideExtension.getArtistModel(
|
||||
artist,
|
||||
PreferenceUtil.isAllowedToDownloadMetadata()
|
||||
)
|
||||
)
|
||||
.dontAnimate()
|
||||
.dontTransform()
|
||||
.into(object : RetroMusicColoredTarget(binding.artistImage) {
|
||||
|
@ -313,7 +321,8 @@ class AlbumDetailsFragment : AbsMainActivityFragment(R.layout.fragment_album_det
|
|||
}
|
||||
|
||||
private fun loadAlbumCover(album: Album) {
|
||||
GlideApp.with(requireContext()).asBitmapPalette().albumCoverOptions(album.safeGetFirstSong())
|
||||
GlideApp.with(requireContext()).asBitmapPalette()
|
||||
.albumCoverOptions(album.safeGetFirstSong())
|
||||
//.checkIgnoreMediaStore()
|
||||
.load(RetroGlideExtension.getSongModel(album.safeGetFirstSong()))
|
||||
.into(object : SingleColorTarget(binding.image) {
|
||||
|
|
|
@ -73,7 +73,9 @@ abstract class AbsArtistDetailsFragment : AbsMainActivityFragment(R.layout.fragm
|
|||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
sharedElementEnterTransition = MaterialContainerTransform().apply {
|
||||
drawingViewId = R.id.fragment_container
|
||||
scrimColor = Color.TRANSPARENT
|
||||
setAllContainerColors(requireContext().resolveColor(R.attr.colorSurface))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue