home: fix visual clipping on shuffle fab shadow

Fix visual clipping on the shuffle FAB's shadow.

Turns out padding, while slower, is actually the better inset handling
method, as it allows me to avoid visual clipping in some cases.
This commit is contained in:
Alexander Capehart 2023-02-12 21:52:00 -07:00
parent 1826ae3215
commit c9ddda2ebd
No known key found for this signature in database
GPG key ID: 37DBE3621FE9AD47
3 changed files with 6 additions and 1 deletions

View file

@ -10,12 +10,15 @@
track/disc fields
- Music loading has been made slightly faster
- Improved sort menu usability
- Fall back to `TXXX:RELEASETYPE` on ID3v2 files
#### What's Fixed
- Fixed non-functioning "repeat all" repeat mode
- Fixed visual clipping of shuffle button shadow
#### Dev/Meta
- Started using dependency injection
- Updated to MDC 1.8.0 alpha-01
## 3.0.2

View file

@ -22,6 +22,7 @@ import android.util.AttributeSet
import android.view.WindowInsets
import android.widget.FrameLayout
import androidx.annotation.AttrRes
import androidx.core.view.updatePadding
import org.oxycblt.auxio.util.systemBarInsetsCompat
/**
@ -38,7 +39,7 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr
override fun onApplyWindowInsets(insets: WindowInsets): WindowInsets {
// Prevent excessive layouts by using translation instead of padding.
translationY = -insets.systemBarInsetsCompat.bottom.toFloat()
updatePadding(bottom = insets.systemBarInsetsCompat.bottom)
return insets
}
}

View file

@ -5,6 +5,7 @@
<style name="Widget.Auxio.AppBarLayout" parent="Widget.Material3.AppBarLayout">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:stateListAnimator">@null</item>
</style>
<!-- Base toolbar style -->