mirror of
https://github.com/cmclark00/RetroMusicPlayer.git
synced 2025-05-17 15:45:21 +01:00
Update Material design components to the latest verion
slider is only changed for md3 theme and weird animation is removed
This commit is contained in:
parent
1c49bdcd72
commit
31fd668c83
5 changed files with 3 additions and 9 deletions
|
@ -199,10 +199,6 @@ fun MaterialCardView.animateRadius(cornerRadius: Float, pause: Boolean = true) {
|
|||
}
|
||||
}
|
||||
|
||||
fun MaterialCardView.animateToCircle() {
|
||||
animateRadius(measuredHeight / 2F, pause = false)
|
||||
}
|
||||
|
||||
fun View.focusAndShowKeyboard() {
|
||||
/**
|
||||
* This is to be called when the window already has focus.
|
||||
|
|
|
@ -160,10 +160,8 @@ class MD3PlaybackControlsFragment :
|
|||
private fun updatePlayPauseDrawableState() {
|
||||
if (MusicPlayerRemote.isPlaying) {
|
||||
binding.playPauseButton.setImageResource(R.drawable.ic_pause_outline_small)
|
||||
binding.playPauseCard.animateRadius(40F)
|
||||
} else {
|
||||
binding.playPauseButton.setImageResource(R.drawable.ic_play_arrow_outline_small)
|
||||
binding.playPauseCard.animateToCircle()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:maxHeight="2dp"
|
||||
style="@style/Widget.Retro.Slider"
|
||||
style="@style/Widget.Material3.Slider"
|
||||
app:layout_constraintEnd_toStartOf="@id/songTotalTime"
|
||||
app:layout_constraintStart_toEndOf="@id/songCurrentProgress"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
|
|
@ -256,7 +256,7 @@
|
|||
<item name="cornerSize">50%</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Retro.Slider" parent="Widget.Material3.Slider">
|
||||
<style name="Widget.Retro.Slider" parent="Widget.Material3.Slider.Legacy">
|
||||
<item name="labelBehavior">gone</item>
|
||||
<item name="thumbRadius">6dp</item>
|
||||
<item name="haloRadius">18dp</item>
|
||||
|
|
|
@ -27,7 +27,7 @@ materialIntro = "2.0.0"
|
|||
mediarouter = "1.6.0"
|
||||
nanohttpd = "2.3.1"
|
||||
navigation_version = "2.7.6"
|
||||
mdc_version = "1.9.0"
|
||||
mdc_version = "1.12.0"
|
||||
glide_version = "4.15.1"
|
||||
orgEclipseEgitGithubCore = "2.1.5"
|
||||
playServicesCastFramework = "21.3.0"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue