Fix a few regressions with the new bottom sheet
This commit is contained in:
parent
45773aac8d
commit
fbbd90111d
|
@ -71,7 +71,6 @@ class FavoritesAdapter(
|
||||||
|
|
||||||
CoverArt.withContext(layoutInflater.context, maybeNormalizeUrl(track.cover()))
|
CoverArt.withContext(layoutInflater.context, maybeNormalizeUrl(track.cover()))
|
||||||
.fit()
|
.fit()
|
||||||
.placeholder(R.drawable.cover)
|
|
||||||
.transform(RoundedCornersTransformation(16, 0))
|
.transform(RoundedCornersTransformation(16, 0))
|
||||||
.into(holder.cover)
|
.into(holder.cover)
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,6 @@ class PlaylistTracksAdapter(
|
||||||
|
|
||||||
CoverArt.withContext(layoutInflater.context, maybeNormalizeUrl(playlistTrack.track.cover()))
|
CoverArt.withContext(layoutInflater.context, maybeNormalizeUrl(playlistTrack.track.cover()))
|
||||||
.fit()
|
.fit()
|
||||||
.placeholder(R.drawable.cover)
|
|
||||||
.transform(RoundedCornersTransformation(16, 0))
|
.transform(RoundedCornersTransformation(16, 0))
|
||||||
.into(holder.cover)
|
.into(holder.cover)
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,9 @@ import audio.funkwhale.ffa.utils.BottomSheetIneractable
|
||||||
import com.google.android.material.bottomsheet.BottomSheetBehavior
|
import com.google.android.material.bottomsheet.BottomSheetBehavior
|
||||||
import com.google.android.material.card.MaterialCardView
|
import com.google.android.material.card.MaterialCardView
|
||||||
|
|
||||||
|
import androidx.core.content.res.use
|
||||||
|
|
||||||
|
|
||||||
class NowPlayingBottomSheet @JvmOverloads constructor (
|
class NowPlayingBottomSheet @JvmOverloads constructor (
|
||||||
context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
|
context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
|
||||||
) : MaterialCardView(context, attrs), BottomSheetIneractable {
|
) : MaterialCardView(context, attrs), BottomSheetIneractable {
|
||||||
|
@ -19,8 +22,10 @@ class NowPlayingBottomSheet @JvmOverloads constructor (
|
||||||
|
|
||||||
|
|
||||||
init {
|
init {
|
||||||
context.theme.obtainStyledAttributes(attrs, R.styleable.NowPlaying, defStyleAttr, 0).use {
|
targetHeaderId =context.theme.obtainStyledAttributes(
|
||||||
targetHeaderId = it.getResourceId(R.styleable.NowPlaying_target_header, NO_ID)
|
attrs, R.styleable.NowPlaying, defStyleAttr, 0
|
||||||
|
).use {
|
||||||
|
it.getResourceId(R.styleable.NowPlaying_target_header, NO_ID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue