Add elevation to play/pause button
Add some elevation to the play/pause button for visual flair.
This commit is contained in:
parent
1b91930621
commit
373c54e28c
9 changed files with 10 additions and 7 deletions
|
@ -51,6 +51,7 @@ class MusicLoader(private val context: Context) {
|
|||
|
||||
@Suppress("DEPRECATION")
|
||||
private fun buildSelector() {
|
||||
// TODO: Upgrade this to be compatible with Android Q.
|
||||
val blacklistDatabase = BlacklistDatabase.getInstance(context)
|
||||
|
||||
val paths = blacklistDatabase.readPaths()
|
||||
|
|
|
@ -11,6 +11,7 @@ import androidx.fragment.app.Fragment
|
|||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.navigation.fragment.findNavController
|
||||
import androidx.recyclerview.widget.ItemTouchHelper
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import org.oxycblt.auxio.R
|
||||
import org.oxycblt.auxio.databinding.FragmentQueueBinding
|
||||
import org.oxycblt.auxio.music.BaseModel
|
||||
|
@ -111,9 +112,10 @@ class QueueFragment : Fragment() {
|
|||
|
||||
// Apply bottom padding to make sure that the last queue item isnt incorrectly lost,
|
||||
// but also make sure that the added padding wont clip the child views entirely.
|
||||
(v as ViewGroup).apply {
|
||||
(v as RecyclerView).apply {
|
||||
clipToPadding = false
|
||||
updatePadding(bottom = bottom)
|
||||
overScrollMode = RecyclerView.OVER_SCROLL_IF_CONTENT_SCROLLS
|
||||
}
|
||||
|
||||
insets
|
||||
|
|
|
@ -138,8 +138,9 @@ class BlacklistDialog : LifecycleDialog() {
|
|||
// Instead of having to do a ton of cleanup and horrible code changes
|
||||
// to restart this application non-destructively, I just restart the UI task [There is only
|
||||
// one, after all] and then kill the application using exitProcess. Works well enough.
|
||||
val intent = Intent(requireContext().applicationContext, MainActivity::class.java)
|
||||
intent.flags = Intent.FLAG_ACTIVITY_CLEAR_TASK
|
||||
val intent = Intent(requireContext().applicationContext, MainActivity::class.java).setFlags(
|
||||
Intent.FLAG_ACTIVITY_CLEAR_TASK
|
||||
)
|
||||
|
||||
startActivity(intent)
|
||||
|
||||
|
|
|
@ -188,7 +188,6 @@
|
|||
<org.oxycblt.auxio.playback.PlayPauseButton
|
||||
android:id="@+id/playback_play_pause"
|
||||
style="@style/PlayPause"
|
||||
android:contentDescription="@string/description_play_pause"
|
||||
android:onClick="@{() -> playbackModel.invertPlayingStatus()}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@+id/playback_song_duration"
|
||||
|
|
|
@ -189,7 +189,6 @@
|
|||
<org.oxycblt.auxio.playback.PlayPauseButton
|
||||
android:id="@+id/playback_play_pause"
|
||||
style="@style/PlayPause"
|
||||
android:contentDescription="@string/description_play_pause"
|
||||
android:onClick="@{() -> playbackModel.invertPlayingStatus()}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@+id/playback_song_container_duration"
|
||||
|
|
|
@ -178,7 +178,6 @@
|
|||
android:id="@+id/playback_play_pause"
|
||||
style="@style/PlayPause"
|
||||
android:layout_marginBottom="@dimen/spacing_large"
|
||||
android:contentDescription="@string/description_play_pause"
|
||||
android:onClick="@{() -> playbackModel.invertPlayingStatus()}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@+id/playback_song_duration"
|
||||
|
|
|
@ -176,7 +176,6 @@
|
|||
android:id="@+id/playback_play_pause"
|
||||
style="@style/PlayPause"
|
||||
android:layout_marginBottom="@dimen/spacing_medium"
|
||||
android:contentDescription="@string/description_play_pause"
|
||||
android:onClick="@{() -> playbackModel.invertPlayingStatus()}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@+id/playback_song_duration"
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
android:id="@+id/queue_recycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:overScrollMode="ifContentScrolls"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/item_queue_song" />
|
||||
|
||||
|
|
|
@ -258,6 +258,8 @@
|
|||
<item name="android:layout_width">@dimen/size_play_pause</item>
|
||||
<item name="android:background">@drawable/ui_circle_ripple</item>
|
||||
<item name="android:backgroundTint">?attr/colorPrimary</item>
|
||||
<item name="android:elevation">@dimen/elevation_normal</item>
|
||||
<item name="android:contentDescription">@string/description_play_pause</item>
|
||||
<item name="android:tint">?android:attr/windowBackground</item>
|
||||
<item name="android:layout_marginStart">@dimen/spacing_large</item>
|
||||
<item name="android:layout_marginTop">@dimen/spacing_medium</item>
|
||||
|
|
Loading…
Reference in a new issue