playback: fade out content as view slides
Re-add the ability for content to fade out as the playback or queue view slides up. This also migrates the queue slide animation to also fade out content, which allows for the stylistic cohesion I desire.
This commit is contained in:
@@ -68,7 +68,7 @@ fun <T : Music> ImageView.load(music: T?, @DrawableRes error: Int) {
|
||||
dispose()
|
||||
|
||||
load(music) {
|
||||
// Round out the corners if it's enabled
|
||||
// Round out the corners if enabled
|
||||
// We don't do this by default because it's ugly and desecrates album artwork.
|
||||
val settingsManager = SettingsManager.getInstance()
|
||||
|
||||
|
||||
@@ -543,7 +543,10 @@ class PlaybackLayout @JvmOverloads constructor(
|
||||
val halfInRatio = max(ratio - 0.5f, 0f) / 0.5f
|
||||
|
||||
// Optimize out drawing for this view completely
|
||||
contentView.isInvisible = outRatio == 0f
|
||||
contentView.apply {
|
||||
alpha = outRatio
|
||||
isInvisible = alpha == 0f
|
||||
}
|
||||
|
||||
// Slowly reduce the elevation of the container as we slide up, eventually resulting in a
|
||||
// neutral color instead of an elevated one when fully expanded.
|
||||
|
||||
Reference in New Issue
Block a user