Fix landscape issues with MainFragment
Make MainFragment & CompactPlaybackFragment look better in landscape mode.
This commit is contained in:
parent
7458588913
commit
9b22fcb8e6
77 changed files with 549 additions and 339 deletions
|
@ -21,6 +21,7 @@ import org.oxycblt.auxio.music.Song
|
|||
import org.oxycblt.auxio.playback.PlaybackViewModel
|
||||
import org.oxycblt.auxio.utils.accent
|
||||
import org.oxycblt.auxio.utils.getTransparentAccent
|
||||
import org.oxycblt.auxio.utils.isLandscape
|
||||
import org.oxycblt.auxio.utils.toColor
|
||||
import kotlin.IllegalArgumentException
|
||||
|
||||
|
@ -155,7 +156,11 @@ class MainFragment : Fragment() {
|
|||
if (song == null) {
|
||||
logD("Hiding CompactPlaybackFragment since no song is being played.")
|
||||
|
||||
binding.compactPlayback.visibility = View.GONE
|
||||
// Dont hide if the mode is landscape.
|
||||
if (!isLandscape(resources)) {
|
||||
binding.compactPlayback.visibility = View.GONE
|
||||
}
|
||||
|
||||
playbackModel.disableAnimation()
|
||||
} else {
|
||||
binding.compactPlayback.visibility = View.VISIBLE
|
||||
|
|
|
@ -37,11 +37,14 @@ class CompactPlaybackFragment : Fragment() {
|
|||
|
||||
binding.lifecycleOwner = viewLifecycleOwner
|
||||
|
||||
// Put a placeholder song in the binding & hide the playback fragment initially,
|
||||
// just in case.
|
||||
// Put a placeholder song in the binding & hide the playback fragment initially.
|
||||
binding.song = MusicStore.getInstance().songs[0]
|
||||
binding.playbackModel = playbackModel
|
||||
|
||||
if (playbackModel.song.value == null) {
|
||||
hideAll(binding)
|
||||
}
|
||||
|
||||
binding.root.setOnClickListener {
|
||||
findNavController().navigate(
|
||||
MainFragmentDirections.actionGoToPlayback()
|
||||
|
@ -59,8 +62,12 @@ class CompactPlaybackFragment : Fragment() {
|
|||
if (it != null) {
|
||||
logD("Updating song display to ${it.name}")
|
||||
|
||||
showAll(binding)
|
||||
|
||||
binding.song = it
|
||||
binding.playbackProgress.max = it.seconds.toInt()
|
||||
} else {
|
||||
hideAll(binding)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -114,4 +121,34 @@ class CompactPlaybackFragment : Fragment() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Hide all UI elements, and disable the fragment from being clickable.
|
||||
*/
|
||||
private fun hideAll(binding: FragmentCompactPlaybackBinding) {
|
||||
binding.apply {
|
||||
root.isEnabled = false
|
||||
|
||||
playbackCover.visibility = View.INVISIBLE
|
||||
playbackSong.visibility = View.INVISIBLE
|
||||
playbackInfo.visibility = View.INVISIBLE
|
||||
playbackControls.visibility = View.INVISIBLE
|
||||
playbackProgress.visibility = View.INVISIBLE
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unhide all UI elements, and make the fragment clickable.
|
||||
*/
|
||||
private fun showAll(binding: FragmentCompactPlaybackBinding) {
|
||||
binding.apply {
|
||||
root.isEnabled = true
|
||||
|
||||
playbackCover.visibility = View.VISIBLE
|
||||
playbackSong.visibility = View.VISIBLE
|
||||
playbackInfo.visibility = View.VISIBLE
|
||||
playbackControls.visibility = View.VISIBLE
|
||||
playbackProgress.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import android.annotation.TargetApi
|
|||
import android.content.Context
|
||||
import android.content.res.ColorStateList
|
||||
import android.content.res.Configuration
|
||||
import android.content.res.Resources
|
||||
import android.os.Build
|
||||
import android.text.SpannableString
|
||||
import android.text.Spanned
|
||||
|
@ -55,6 +56,13 @@ fun ImageButton.disable(context: Context) {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the device is currently in landscape.
|
||||
*/
|
||||
fun isLandscape(resources: Resources): Boolean {
|
||||
return resources.configuration.orientation == Configuration.ORIENTATION_LANDSCAPE
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a [Toast] from a [String]
|
||||
* @param context [Context] required to create the toast
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
android:strokeColor="#ffffff">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:type="linear"
|
||||
android:endX="64.75"
|
||||
android:endY="28.5"
|
||||
android:startX="60"
|
||||
android:startY="61.5"
|
||||
android:endX="64.75"
|
||||
android:endY="28.5">
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#2196f3"
|
||||
android:offset="0.0" />
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorPrimary"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorPrimary">
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,16.5c-2.49,0 -4.5,-2.01 -4.5,-4.5S9.51,7.5 12,7.5s4.5,2.01 4.5,4.5 -2.01,4.5 -4.5,4.5zM12,11c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1z" />
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorPrimary"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorPrimary">
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M9,11.75c-0.69,0 -1.25,0.56 -1.25,1.25s0.56,1.25 1.25,1.25 1.25,-0.56 1.25,-1.25 -0.56,-1.25 -1.25,-1.25zM15,11.75c-0.69,0 -1.25,0.56 -1.25,1.25s0.56,1.25 1.25,1.25 1.25,-0.56 1.25,-1.25 -0.56,-1.25 -1.25,-1.25zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8 0,-0.29 0.02,-0.58 0.05,-0.86 2.36,-1.05 4.23,-2.98 5.21,-5.37C11.07,8.33 14.05,10 17.42,10c0.78,0 1.53,-0.09 2.25,-0.26 0.21,0.71 0.33,1.47 0.33,2.26 0,4.41 -3.59,8 -8,8z" />
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorPrimary"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorPrimary">
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M10.85,12.65h2.3L12,9l-1.15,3.65zM20,8.69V4h-4.69L12,0.69 8.69,4H4v4.69L0.69,12 4,15.31V20h4.69L12,23.31 15.31,20H20v-4.69L23.31,12 20,8.69zM14.3,16l-0.7,-2h-3.2l-0.7,2H7.8L11,7h2l3.2,9h-1.9z" />
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z" />
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="@color/background"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="@color/background">
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41z" />
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorPrimary"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorPrimary">
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2L18,7L6,7v12zM8,9h8v10L8,19L8,9zM15.5,4l-1,-1h-5l-1,1L5,4v2h14L19,4z" />
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorPrimary"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorPrimary">
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M20,8.69L20,4h-4.69L12,0.69 8.69,4L4,4v4.69L0.69,12 4,15.31L4,20h4.69L12,23.31 15.31,20L20,20v-4.69L23.31,12 20,8.69zM12,18c-3.31,0 -6,-2.69 -6,-6s2.69,-6 6,-6 6,2.69 6,6 -2.69,6 -6,6zM12,8c-2.21,0 -4,1.79 -4,4s1.79,4 4,4 4,-1.79 4,-4 -1.79,-4 -4,-4z" />
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M 5.88,7.06 12,13.166667 18.12,7.06 20,8.94 l -8,8 -8,-8 z" />
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorPrimary"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorPrimary">
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M11,15h2v2h-2zM11,7h2v6h-2zM11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8z" />
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorPrimary"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorPrimary">
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M7,14c-1.66,0 -3,1.34 -3,3 0,1.31 -1.16,2 -2,2 0.92,1.22 2.49,2 4,2 2.21,0 4,-1.79 4,-4 0,-1.66 -1.34,-3 -3,-3zM20.71,4.63l-1.34,-1.34c-0.39,-0.39 -1.02,-0.39 -1.41,0L9,12.25 11.75,15l8.96,-8.96c0.39,-0.39 0.39,-1.02 0,-1.41z" />
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M20,9H4v2h16V9zM4,15h16v-2H4V15z" />
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
android:strokeColor="#ffffff">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:type="linear"
|
||||
android:endX="64.75"
|
||||
android:endY="28.5"
|
||||
android:startX="60"
|
||||
android:startY="61.5"
|
||||
android:endX="64.75"
|
||||
android:endY="28.5">
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#2196f3"
|
||||
android:offset="0.0" />
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorPrimary"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorPrimary">
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M22,2L6,2v16h16L22,2zM18,7h-3v5.5c0,1.38 -1.12,2.5 -2.5,2.5S10,13.88 10,12.5s1.12,-2.5 2.5,-2.5c0.57,0 1.08,0.19 1.5,0.51L14,5h4v2zM4,6L2,6v16h16v-2L4,20L4,6z" />
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M7,7h10v3l4,-4 -4,-4v3L5,5v6h2L7,7zM17,17L7,17v-3l-4,4 4,4v-3h12v-6h-2v4z" />
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M7,7h10v3l4,-4 -4,-4v3L5,5v6h2L7,7zM17,17L7,17v-3l-4,4 4,4v-3h12v-6h-2v4z" />
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M7,7h10v3l4,-4 -4,-4v3L5,5v6h2L7,7zM17,17L7,17v-3l-4,4 4,4v-3h12v-6h-2v4zM13,15L13,9h-1l-2,1v1h1.5v4L13,15z" />
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M7,7h10v3l4,-4 -4,-4v3L5,5v6h2L7,7zM17,17L7,17v-3l-4,4 4,4v-3h12v-6h-2v4zM13,15L13,9h-1l-2,1v1h1.5v4L13,15z" />
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorPrimary"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorPrimary">
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M20,15.31L23.31,12 20,8.69V4h-4.69L12,0.69 8.69,4H4v4.69L0.69,12 4,15.31V20h4.69L12,23.31 15.31,20H20v-4.69zM12,18c-3.31,0 -6,-2.69 -6,-6s2.69,-6 6,-6 6,2.69 6,6 -2.69,6 -6,6z" />
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?android:attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?android:attr/colorControlNormal">
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M5.571 19.5h4.286v-15H5.571zm8.572-15v15h4.286v-15z" />
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector android:width="32dp"
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:tint="@color/control_color"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
android:viewportHeight="24">
|
||||
<group
|
||||
android:name="play"
|
||||
android:pivotX="12"
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M5.078 4.089V12h13.844zm0 15.822V12h13.844z" />
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector android:width="32dp"
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:tint="@color/control_color"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
android:viewportHeight="24">
|
||||
|
||||
<group
|
||||
android:name="play"
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M15,6L3,6v2h12L15,6zM15,10L3,10v2h12v-2zM3,16h8v-2L3,14v2zM17,6v8.18c-0.31,-0.11 -0.65,-0.18 -1,-0.18 -1.66,0 -3,1.34 -3,3s1.34,3 3,3 3,-1.34 3,-3L19,8h3L22,6h-5z" />
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M4,6L2,6v16h16v-2L4,20L4,6zM22,2L6,2v16h16L22,2zM19,11h-4v4h-2v-4L9,11L9,9h4L13,5h2v4h4v2z" />
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="@color/inactive_color"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="@color/inactive_color">
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M15,6L3,6v2h12L15,6zM15,10L3,10v2h12v-2zM3,16h8v-2L3,14v2zM17,6v8.18c-0.31,-0.11 -0.65,-0.18 -1,-0.18 -1.66,0 -3,1.34 -3,3s1.34,3 3,3 3,-1.34 3,-3L19,8h3L22,6h-5z" />
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M15.5,14h-0.79l-0.28,-0.27C15.41,12.59 16,11.11 16,9.5 16,5.91 13.09,3 9.5,3S3,5.91 3,9.5 5.91,16 9.5,16c1.61,0 3.09,-0.59 4.23,-1.57l0.27,0.28v0.79l5,4.99L20.49,19l-4.99,-5zM9.5,14C7.01,14 5,11.99 5,9.5S7.01,5 9.5,5 14,7.01 14,9.5 11.99,14 9.5,14z" />
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M19.44,12.99l-0.01,0.02c0.04,-0.33 0.08,-0.67 0.08,-1.01 0,-0.34 -0.03,-0.66 -0.07,-0.99l0.01,0.02 2.44,-1.92 -2.43,-4.22 -2.87,1.16 0.01,0.01c-0.52,-0.4 -1.09,-0.74 -1.71,-1h0.01L14.44,2H9.57l-0.44,3.07h0.01c-0.62,0.26 -1.19,0.6 -1.71,1l0.01,-0.01 -2.88,-1.17 -2.44,4.22 2.44,1.92 0.01,-0.02c-0.04,0.33 -0.07,0.65 -0.07,0.99 0,0.34 0.03,0.68 0.08,1.01l-0.01,-0.02 -2.1,1.65 -0.33,0.26 2.43,4.2 2.88,-1.15 -0.02,-0.04c0.53,0.41 1.1,0.75 1.73,1.01h-0.03L9.58,22h4.85s0.03,-0.18 0.06,-0.42l0.38,-2.65h-0.01c0.62,-0.26 1.2,-0.6 1.73,-1.01l-0.02,0.04 2.88,1.15 2.43,-4.2s-0.14,-0.12 -0.33,-0.26l-2.11,-1.66zM12,15.5c-1.93,0 -3.5,-1.57 -3.5,-3.5s1.57,-3.5 3.5,-3.5 3.5,1.57 3.5,3.5 -1.57,3.5 -3.5,3.5z" />
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M10.59,9.17L5.41,4 4,5.41l5.17,5.17 1.42,-1.41zM14.5,4l2.04,2.04L4,18.59 5.41,20 17.96,7.46 20,9.5L20,4h-5.5zM14.83,13.41l-1.41,1.41 3.13,3.13L14.5,20L20,20v-5.5l-2.04,2.04 -3.13,-3.13z" />
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M10.59,9.17L5.41,4 4,5.41l5.17,5.17 1.42,-1.41zM14.5,4l2.04,2.04L4,18.59 5.41,20 17.96,7.46 20,9.5L20,4h-5.5zM14.83,13.41l-1.41,1.41 3.13,3.13L14.5,20L20,20v-5.5l-2.04,2.04 -3.13,-3.13z" />
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:autoMirrored="true"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M6,18l8.5,-6L6,6v12zM16,6v12h2V6h-2z" />
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:autoMirrored="true"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M6,18l8.5,-6L6,6v12zM16,6v12h2V6h-2z" />
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:autoMirrored="true"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M6,6h2v12L6,18zM9.5,12l8.5,6L18,6z" />
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:autoMirrored="true"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M6,6h2v12L6,18zM9.5,12l8.5,6L18,6z" />
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorPrimary"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorPrimary">
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12,3v10.55c-0.59,-0.34 -1.27,-0.55 -2,-0.55 -2.21,0 -4,1.79 -4,4s1.79,4 4,4 4,-1.79 4,-4V7h4V3h-6z" />
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorPrimary"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorPrimary">
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M3.694 17.992H0.976l4.142-12h3.27l4.136 12H9.806L6.8 8.734H6.706zm-0.17-4.717h6.422v1.98H3.524zm10.313 4.717v-1.506l5.988-8.402h-6V5.992h9.188v1.505L17.018 15.9h6.006v2.092z"
|
||||
android:strokeWidth="0.4125"
|
||||
android:fillColor="@android:color/white" />
|
||||
android:strokeWidth="0.4125" />
|
||||
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M15.5 20.535h-7l3.5 3.456 3.5-3.456z"
|
||||
android:strokeWidth="0.139935"
|
||||
android:fillColor="@android:color/white" />
|
||||
android:strokeWidth="0.139935" />
|
||||
</vector>
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorPrimary"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorPrimary">
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M15.5 3.448h-7L12-0.008l3.5 3.456z"
|
||||
android:strokeWidth="0.139935"
|
||||
android:fillColor="@android:color/white" />
|
||||
android:strokeWidth="0.139935" />
|
||||
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M3.694 17.992H0.976l4.142-12h3.27l4.136 12H9.806L6.8 8.734H6.706zm-0.17-4.717h6.422v1.98H3.524zm10.313 4.717v-1.506l5.988-8.402h-6V5.992h9.188v1.505L17.018 15.9h6.006v2.092z"
|
||||
android:strokeWidth="0.4125"
|
||||
android:fillColor="@android:color/white" />
|
||||
android:strokeWidth="0.4125" />
|
||||
</vector>
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M3,18h6v-2L3,16v2zM3,6v2h18L21,6L3,6zM3,13h12v-2L3,11v2z" />
|
||||
|
|
|
@ -2,17 +2,17 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?android:attr/colorPrimary"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?android:attr/colorPrimary">
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M6.542 18q-1.508-0.006-2.595-0.716-1.082-0.711-1.667-2.06-0.578-1.348-0.573-3.244 0-1.89 0.58-3.221 0.584-1.331 1.665-2.025 1.088-0.7 2.59-0.7 1.503 0 2.584 0.7 1.088 0.7 1.673 2.03 0.584 1.326 0.578 3.216 0 1.902-0.584 3.25-0.579 1.348-1.66 2.06Q8.05 18 6.542 18zm0-2.025q1.03 0 1.643-0.999 0.614-0.998 0.608-2.996 0-1.314-0.28-2.188-0.275-0.875-0.784-1.315-0.503-0.44-1.187-0.44-1.023 0-1.637 0.987-0.614 0.988-0.62 2.957 0 1.33 0.276 2.222 0.28 0.886 0.789 1.332 0.508 0.44 1.193 0.44zM17.51 6q0.924 0 1.777 0.3 0.86 0.293 1.532 0.953 0.679 0.66 1.07 1.749 0.398 1.083 0.404 2.668-0.006 1.472-0.351 2.629-0.34 1.15-0.976 1.958-0.638 0.806-1.538 1.23-0.895 0.417-2.005 0.417-1.199 0-2.117-0.446-0.918-0.45-1.479-1.224-0.555-0.779-0.672-1.749h2.496q0.146 0.632 0.614 0.982 0.468 0.344 1.158 0.344 1.169 0 1.777-0.982 0.608-0.987 0.614-2.702h-0.082Q19.463 12.635 19.007 13q-0.456 0.362-1.046 0.559-0.585 0.197-1.246 0.197-1.058 0-1.894-0.48-0.83-0.479-1.31-1.32-0.479-0.846-0.473-1.929-0.006-1.173 0.555-2.082 0.562-0.914 1.567-1.433Q16.172 5.994 17.51 6zm0.018 1.918q-0.59 0-1.053 0.271Q16.02 8.46 15.75 8.923q-0.263 0.462-0.257 1.038-0.006 0.575 0.252 1.032 0.263 0.457 0.719 0.728 0.456 0.265 1.04 0.265 0.439 0 0.807-0.158 0.374-0.158 0.65-0.434 0.28-0.282 0.438-0.65 0.158-0.372 0.163-0.795-0.005-0.558-0.269-1.02-0.263-0.463-0.725-0.734-0.461-0.277-1.04-0.277z"
|
||||
android:strokeWidth="0.404319"
|
||||
android:fillColor="@android:color/white"
|
||||
tools:ignore="VectorPath" />
|
||||
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M15.5 20.544h-7L12 24l3.5-3.456z"
|
||||
android:strokeWidth="0.139935"
|
||||
android:fillColor="@android:color/white" />
|
||||
android:strokeWidth="0.139935" />
|
||||
</vector>
|
||||
|
|
|
@ -2,17 +2,17 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorPrimary"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorPrimary">
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M6.542 18q-1.508-0.006-2.595-0.716-1.082-0.711-1.667-2.06-0.578-1.348-0.573-3.244 0-1.89 0.58-3.221 0.584-1.331 1.665-2.025 1.088-0.7 2.59-0.7 1.503 0 2.584 0.7 1.088 0.7 1.673 2.03 0.584 1.326 0.578 3.216 0 1.902-0.584 3.25-0.579 1.348-1.66 2.06Q8.05 18 6.542 18zm0-2.025q1.03 0 1.643-0.999 0.614-0.998 0.608-2.996 0-1.314-0.28-2.188-0.275-0.875-0.784-1.315-0.503-0.44-1.187-0.44-1.023 0-1.637 0.987-0.614 0.988-0.62 2.957 0 1.33 0.276 2.222 0.28 0.886 0.789 1.332 0.508 0.44 1.193 0.44zM17.51 6q0.924 0 1.777 0.3 0.86 0.293 1.532 0.953 0.679 0.66 1.07 1.749 0.398 1.083 0.404 2.668-0.006 1.472-0.351 2.629-0.34 1.15-0.976 1.958-0.638 0.806-1.538 1.23-0.895 0.417-2.005 0.417-1.199 0-2.117-0.446-0.918-0.45-1.479-1.224-0.555-0.779-0.672-1.749h2.496q0.146 0.632 0.614 0.982 0.468 0.344 1.158 0.344 1.169 0 1.777-0.982 0.608-0.987 0.614-2.702h-0.082Q19.463 12.635 19.007 13q-0.456 0.362-1.046 0.559-0.585 0.197-1.246 0.197-1.058 0-1.894-0.48-0.83-0.479-1.31-1.32-0.479-0.846-0.473-1.929-0.006-1.173 0.555-2.082 0.562-0.914 1.567-1.433Q16.172 5.994 17.51 6zm0.018 1.918q-0.59 0-1.053 0.271Q16.02 8.46 15.75 8.923q-0.263 0.462-0.257 1.038-0.006 0.575 0.252 1.032 0.263 0.457 0.719 0.728 0.456 0.265 1.04 0.265 0.439 0 0.807-0.158 0.374-0.158 0.65-0.434 0.28-0.282 0.438-0.65 0.158-0.372 0.163-0.795-0.005-0.558-0.269-1.02-0.263-0.463-0.725-0.734-0.461-0.277-1.04-0.277z"
|
||||
android:strokeWidth="0.404319"
|
||||
android:fillColor="@android:color/white"
|
||||
tools:ignore="VectorPath" />
|
||||
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M15.5 3.456h-7L12 0l3.5 3.456z"
|
||||
android:strokeWidth="0.139935"
|
||||
android:fillColor="@android:color/white" />
|
||||
android:strokeWidth="0.139935" />
|
||||
</vector>
|
||||
|
|
105
app/src/main/res/layout-land/fragment_compact_playback.xml
Normal file
105
app/src/main/res/layout-land/fragment_compact_playback.xml
Normal file
|
@ -0,0 +1,105 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".playback.CompactPlaybackFragment">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="song"
|
||||
type="org.oxycblt.auxio.music.Song" />
|
||||
|
||||
<variable
|
||||
name="playbackModel"
|
||||
type="org.oxycblt.auxio.playback.PlaybackViewModel" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/root_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:animateLayoutChanges="true"
|
||||
android:background="@drawable/ui_background_ripple"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/playback_cover"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="@dimen/margin_small"
|
||||
android:contentDescription="@{@string/description_album_cover(song.name)}"
|
||||
app:coverArt="@{song}"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_info"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_song"
|
||||
tools:src="@drawable/ic_song" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/playback_song"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/margin_mid_small"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="@dimen/margin_mid_small"
|
||||
android:ellipsize="marquee"
|
||||
android:fontFamily="@font/inter_semibold"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:singleLine="true"
|
||||
android:text="@{song.name}"
|
||||
android:textAppearance="@style/TextAppearance.SmallHeader"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_info"
|
||||
app:layout_constraintEnd_toStartOf="@+id/playback_controls"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_cover"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
tools:text="Song Name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/playback_info"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/margin_mid_small"
|
||||
android:layout_marginEnd="@dimen/margin_mid_small"
|
||||
android:layout_marginBottom="@dimen/margin_small"
|
||||
android:ellipsize="marquee"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:singleLine="true"
|
||||
android:text="@{@string/format_info(song.album.artist.name, song.album.name)}"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Caption"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_progress"
|
||||
app:layout_constraintEnd_toStartOf="@+id/playback_controls"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_cover"
|
||||
app:layout_constraintTop_toBottomOf="@+id/playback_song"
|
||||
tools:text="Artist Name / Album Name" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/playback_controls"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:layout_width="@dimen/size_play_pause_compact"
|
||||
android:layout_height="@dimen/size_play_pause_compact"
|
||||
android:layout_marginEnd="@dimen/margin_mid_small"
|
||||
android:background="@drawable/ui_unbounded_ripple"
|
||||
android:contentDescription="@{playbackModel.isPlaying ? @string/description_pause : @string/description_play}"
|
||||
android:onClick="@{() -> playbackModel.invertPlayingStatus()}"
|
||||
android:tint="@color/control_color"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:src="@drawable/ic_play_to_pause" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/playback_progress"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/height_compact_progress"
|
||||
android:clickable="false"
|
||||
android:progressBackgroundTint="?attr/colorControlNormal"
|
||||
android:progressTint="?attr/colorPrimary"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
tools:progress="70" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
51
app/src/main/res/layout-land/fragment_main.xml
Normal file
51
app/src/main/res/layout-land/fragment_main.xml
Normal file
|
@ -0,0 +1,51 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".MainFragment">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/main_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:animateLayoutChanges="true"
|
||||
android:fitsSystemWindows="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/explore_nav_host"
|
||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/compact_playback"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:navGraph="@navigation/nav_explore"
|
||||
tools:layout="@layout/fragment_library" />
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/compact_playback"
|
||||
android:name="org.oxycblt.auxio.playback.CompactPlaybackFragment"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="?android:attr/windowBackground"
|
||||
android:elevation="@dimen/elevation_weird"
|
||||
android:outlineProvider="bounds"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/nav_bar"
|
||||
app:layout_constraintTop_toTopOf="@+id/nav_bar"
|
||||
tools:layout="@layout/fragment_compact_playback" />
|
||||
|
||||
<com.google.android.material.bottomnavigation.BottomNavigationView
|
||||
android:id="@+id/nav_bar"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/background"
|
||||
app:elevation="@dimen/elevation_normal"
|
||||
app:labelVisibilityMode="selected"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:menu="@menu/menu_nav" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
|
@ -1,14 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/nav_host"
|
||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||
app:defaultNavHost="true"
|
||||
app:navGraph="@navigation/nav_main" />
|
||||
</layout>
|
|
@ -62,9 +62,9 @@
|
|||
android:layout_marginStart="@dimen/margin_medium"
|
||||
android:layout_marginTop="@dimen/margin_medium"
|
||||
android:layout_marginEnd="@dimen/margin_medium"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="@{album.name}"
|
||||
android:ellipsize="end"
|
||||
app:autoSizeMaxTextSize="@dimen/text_size_detail_header_max"
|
||||
app:autoSizeMinTextSize="@dimen/text_size_min"
|
||||
app:autoSizeStepGranularity="@dimen/text_size_increment"
|
||||
|
@ -80,9 +80,9 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
android:background="@drawable/ui_ripple"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="@drawable/ui_ripple"
|
||||
android:onClick="@{() -> detailModel.doNavToParent()}"
|
||||
android:text="@{album.artist.name}"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
|
@ -108,8 +108,8 @@
|
|||
style="@style/HeaderText"
|
||||
android:layout_marginTop="@dimen/margin_medium"
|
||||
android:text="@string/label_songs"
|
||||
app:layout_constraintTop_toBottomOf="@+id/album_details"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/album_details" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/album_sort_button"
|
||||
|
|
|
@ -16,12 +16,13 @@
|
|||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/root_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:animateLayoutChanges="true"
|
||||
android:background="@drawable/ui_background_ripple"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:focusable="true">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/playback_progress"
|
||||
|
@ -39,8 +40,8 @@
|
|||
android:id="@+id/playback_cover"
|
||||
android:layout_width="@dimen/size_cover_compact"
|
||||
android:layout_height="@dimen/size_cover_compact"
|
||||
android:contentDescription="@{@string/description_album_cover(song.name)}"
|
||||
android:layout_margin="@dimen/margin_mid_small"
|
||||
android:contentDescription="@{@string/description_album_cover(song.name)}"
|
||||
app:coverArt="@{song}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
@ -86,13 +87,13 @@
|
|||
<ImageButton
|
||||
android:id="@+id/playback_controls"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:layout_marginEnd="@dimen/margin_mid_small"
|
||||
android:contentDescription="@{playbackModel.isPlaying ? @string/description_pause : @string/description_play}"
|
||||
android:layout_width="@dimen/size_play_pause_compact"
|
||||
android:layout_height="@dimen/size_play_pause_compact"
|
||||
android:layout_marginEnd="@dimen/margin_mid_small"
|
||||
android:background="@drawable/ui_unbounded_ripple"
|
||||
android:tint="@color/control_color"
|
||||
android:contentDescription="@{playbackModel.isPlaying ? @string/description_pause : @string/description_play}"
|
||||
android:onClick="@{() -> playbackModel.invertPlayingStatus()}"
|
||||
android:tint="@color/control_color"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
|
|
@ -59,9 +59,9 @@
|
|||
style="@style/DetailTitleText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
android:layout_marginTop="@dimen/margin_medium"
|
||||
android:layout_marginEnd="@dimen/margin_medium"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
android:text="@{genre.name}"
|
||||
app:autoSizeMaxTextSize="@dimen/text_size_detail_header_max"
|
||||
app:autoSizeMinTextSize="@dimen/text_size_min"
|
||||
|
@ -77,9 +77,9 @@
|
|||
android:id="@+id/genre_counts"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
app:genreCounts="@{genre}"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/genre_name"
|
||||
|
@ -89,10 +89,10 @@
|
|||
android:id="@+id/genre_song_count"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
android:text="@{@plurals/format_song_count(genre.songs.size, genre.songs.size)}"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/genre_counts"
|
||||
tools:text="80 Songs" />
|
||||
|
|
|
@ -7,15 +7,15 @@
|
|||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:animateLayoutChanges="true">
|
||||
android:animateLayoutChanges="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/library_toolbar"
|
||||
style="@style/Toolbar.Style"
|
||||
android:theme="@style/Toolbar.Style.Search"
|
||||
android:background="?android:attr/windowBackground"
|
||||
android:elevation="@dimen/elevation_normal"
|
||||
android:theme="@style/Toolbar.Style.Search"
|
||||
app:menu="@menu/menu_library"
|
||||
app:title="@string/label_library" />
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:tools="http://schemas.android.com/tools"
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".loading.LoadingFragment">
|
||||
|
||||
<data>
|
||||
|
@ -34,11 +34,11 @@
|
|||
android:id="@+id/loading_error_icon"
|
||||
android:layout_width="@dimen/size_error_icon"
|
||||
android:layout_height="@dimen/size_error_icon"
|
||||
android:contentDescription="@string/description_error"
|
||||
android:indeterminateTint="?attr/colorPrimary"
|
||||
android:indeterminateTintMode="src_in"
|
||||
android:src="@drawable/ic_error"
|
||||
android:visibility="gone"
|
||||
android:contentDescription="@string/description_error"
|
||||
app:layout_constraintBottom_toTopOf="@+id/loading_error_text"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
@ -49,10 +49,10 @@
|
|||
android:id="@+id/loading_error_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/margin_small"
|
||||
android:fontFamily="@font/inter"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:layout_marginTop="@dimen/margin_small"
|
||||
app:layout_constraintBottom_toTopOf="@+id/loading_retry_button"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
|
@ -71,11 +71,11 @@
|
|||
android:textColor="?attr/colorPrimary"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/loading_grant_button"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/loading_error_text"
|
||||
app:layout_constraintBottom_toTopOf="@+id/loading_grant_button"
|
||||
app:layout_constraintVertical_bias="0.673"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".MainFragment">
|
||||
|
||||
<!-- TODO: Fix elevation -->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/main_layout"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -29,6 +27,8 @@
|
|||
android:name="org.oxycblt.auxio.playback.CompactPlaybackFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:attr/windowBackground"
|
||||
android:elevation="@dimen/elevation_high"
|
||||
android:outlineProvider="bounds"
|
||||
app:layout_constraintBottom_toTopOf="@+id/nav_bar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
@ -40,6 +40,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/background"
|
||||
android:elevation="@dimen/elevation_normal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
|
|
@ -21,18 +21,18 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:animateLayoutChanges="true"
|
||||
android:fitsSystemWindows="true"
|
||||
android:background="@color/background">
|
||||
android:background="@color/background"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/playback_toolbar"
|
||||
style="@style/Toolbar.Style.Icon"
|
||||
android:elevation="0dp"
|
||||
app:navigationIcon="@drawable/ic_down"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:title="@string/label_playback"
|
||||
app:menu="@menu/menu_playback" />
|
||||
app:menu="@menu/menu_playback"
|
||||
app:navigationIcon="@drawable/ic_down"
|
||||
app:title="@string/label_playback" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/playback_cover"
|
||||
|
@ -40,8 +40,8 @@
|
|||
android:layout_height="0dp"
|
||||
android:layout_margin="@dimen/margin_mid_large"
|
||||
android:contentDescription="@{@string/description_album_cover(song.name)}"
|
||||
android:outlineProvider="bounds"
|
||||
android:elevation="@dimen/elevation_normal"
|
||||
android:outlineProvider="bounds"
|
||||
app:coverArt="@{song}"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_song"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
|
@ -54,15 +54,15 @@
|
|||
android:id="@+id/playback_song"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="marquee"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:focusable="true"
|
||||
android:fontFamily="@font/inter_semibold"
|
||||
android:singleLine="true"
|
||||
android:layout_marginStart="@dimen/margin_mid_large"
|
||||
android:layout_marginEnd="@dimen/margin_mid_large"
|
||||
android:text="@{song.name}"
|
||||
android:ellipsize="marquee"
|
||||
android:focusable="true"
|
||||
android:fontFamily="@font/inter_semibold"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:onClick="@{() -> playbackModel.navToItem(playbackModel.song)}"
|
||||
android:singleLine="true"
|
||||
android:text="@{song.name}"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Headline6"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_artist"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
@ -74,12 +74,12 @@
|
|||
android:id="@+id/playback_artist"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:layout_marginStart="@dimen/margin_mid_large"
|
||||
android:layout_marginEnd="@dimen/margin_mid_large"
|
||||
android:text="@{song.album.artist.name}"
|
||||
android:ellipsize="end"
|
||||
android:onClick="@{() -> playbackModel.navToItem(playbackModel.song.album.artist)}"
|
||||
android:singleLine="true"
|
||||
android:text="@{song.album.artist.name}"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_album"
|
||||
|
@ -95,9 +95,9 @@
|
|||
android:layout_marginEnd="@dimen/margin_mid_large"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:ellipsize="end"
|
||||
android:onClick="@{() -> playbackModel.navToItem(playbackModel.song.album)}"
|
||||
android:singleLine="true"
|
||||
android:text="@{song.album.name}"
|
||||
android:onClick="@{() -> playbackModel.navToItem(playbackModel.song.album)}"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_seek_bar"
|
||||
|
@ -109,14 +109,14 @@
|
|||
android:id="@+id/playback_seek_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="@dimen/margin_mid_large"
|
||||
android:paddingEnd="@dimen/margin_mid_large"
|
||||
android:thumbOffset="@dimen/offset_thumb"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:paddingStart="@dimen/margin_mid_large"
|
||||
android:paddingEnd="@dimen/margin_mid_large"
|
||||
android:progressBackgroundTint="?android:attr/colorControlNormal"
|
||||
android:progressTint="?attr/colorPrimary"
|
||||
android:splitTrack="false"
|
||||
android:thumbOffset="@dimen/offset_thumb"
|
||||
android:thumbTint="?attr/colorPrimary"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_duration_current"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
@ -166,10 +166,10 @@
|
|||
android:layout_width="@dimen/size_play_pause_compact"
|
||||
android:layout_height="@dimen/size_play_pause_compact"
|
||||
android:layout_marginStart="@dimen/margin_mid_large"
|
||||
android:contentDescription="@string/description_skip_next"
|
||||
android:background="@drawable/ui_unbounded_ripple"
|
||||
android:src="@drawable/ic_skip_next_large"
|
||||
android:contentDescription="@string/description_skip_next"
|
||||
android:onClick="@{() -> playbackModel.skipNext()}"
|
||||
android:src="@drawable/ic_skip_next_large"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_play_pause"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_play_pause"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_play_pause" />
|
||||
|
@ -179,11 +179,11 @@
|
|||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:layout_width="@dimen/size_play_pause_compact"
|
||||
android:layout_height="@dimen/size_play_pause_compact"
|
||||
android:src="@drawable/ic_skip_prev_large"
|
||||
android:contentDescription="@string/description_skip_prev"
|
||||
android:background="@drawable/ui_unbounded_ripple"
|
||||
android:layout_marginEnd="@dimen/margin_mid_large"
|
||||
android:background="@drawable/ui_unbounded_ripple"
|
||||
android:contentDescription="@string/description_skip_prev"
|
||||
android:onClick="@{() -> playbackModel.skipPrev()}"
|
||||
android:src="@drawable/ic_skip_prev_large"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_play_pause"
|
||||
app:layout_constraintEnd_toStartOf="@+id/playback_play_pause"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_play_pause" />
|
||||
|
@ -194,10 +194,10 @@
|
|||
android:layout_width="@dimen/size_play_pause_compact"
|
||||
android:layout_height="@dimen/size_play_pause_compact"
|
||||
android:layout_marginEnd="@dimen/margin_mid_large"
|
||||
android:src="@drawable/ic_shuffle_large"
|
||||
android:background="@drawable/ui_unbounded_ripple"
|
||||
android:onClick="@{() -> playbackModel.invertShuffleStatus()}"
|
||||
android:contentDescription="@{playbackModel.isShuffling() ? @string/description_shuffle_off : @string/description_shuffle_on"
|
||||
android:onClick="@{() -> playbackModel.invertShuffleStatus()}"
|
||||
android:src="@drawable/ic_shuffle_large"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_play_pause"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_play_pause" />
|
||||
|
@ -207,14 +207,14 @@
|
|||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:layout_width="@dimen/size_play_pause_compact"
|
||||
android:layout_height="@dimen/size_play_pause_compact"
|
||||
android:background="@drawable/ui_unbounded_ripple"
|
||||
android:src="@drawable/ic_loop_large"
|
||||
android:layout_marginStart="@dimen/margin_mid_large"
|
||||
android:background="@drawable/ui_unbounded_ripple"
|
||||
android:contentDescription="@string/description_change_loop"
|
||||
android:onClick="@{() -> playbackModel.incrementLoopStatus()}"
|
||||
android:src="@drawable/ic_loop_large"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_play_pause"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_play_pause"
|
||||
android:contentDescription="@string/description_change_loop" />
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_play_pause" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
|
@ -1,15 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".playback.queue.QueueFragment">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:animateLayoutChanges="true"
|
||||
android:background="@color/background"
|
||||
android:animateLayoutChanges="true">
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/queue_toolbar"
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:animateLayoutChanges="true">
|
||||
android:animateLayoutChanges="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/song_toolbar"
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
android:id="@+id/accent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/ui_circular_button"
|
||||
android:padding="@dimen/margin_medium"
|
||||
android:scaleType="fitCenter"
|
||||
android:background="@drawable/ui_circular_button"
|
||||
android:src="@drawable/ic_check"
|
||||
tools:backgroundTint="?attr/colorPrimary"
|
||||
tools:ignore="contentDescription" />
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/header_title"
|
||||
tools:src="@drawable/ic_clear"
|
||||
tools:ignore="ContentDescription" />
|
||||
tools:ignore="ContentDescription"
|
||||
tools:src="@drawable/ic_clear" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".recycler.viewholders.AlbumViewHolder">
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".detail.adapters.DetailSongAdapter.ViewHolder">
|
||||
|
||||
|
@ -17,14 +17,14 @@
|
|||
android:id="@+id/song_track"
|
||||
android:layout_width="@dimen/width_track_number"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@{@string/description_track_number(song.track)}"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:text="@{String.valueOf(song.track)}"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
android:textColor="?android:attr/textColorTertiary"
|
||||
android:textSize="@dimen/text_size_track_max"
|
||||
android:maxLines="1"
|
||||
android:contentDescription="@{@string/description_track_number(song.track)}"
|
||||
android:gravity="center"
|
||||
app:autoSizeMaxTextSize="@dimen/text_size_detail_header_max"
|
||||
app:autoSizeMinTextSize="@dimen/text_size_min"
|
||||
app:autoSizeStepGranularity="@dimen/text_size_increment"
|
||||
|
@ -48,8 +48,8 @@
|
|||
<TextView
|
||||
android:id="@+id/song_duration"
|
||||
style="@style/ItemText.Secondary"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:text="@{song.formattedDuration}"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/song_track"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".recycler.viewholders.ArtistViewHolder">
|
||||
|
||||
|
@ -18,10 +18,10 @@
|
|||
android:layout_width="@dimen/size_cover_normal"
|
||||
android:layout_height="@dimen/size_cover_normal"
|
||||
android:contentDescription="@{@string/description_artist_image(artist.name)}"
|
||||
app:artistImage="@{artist}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:artistImage="@{artist}"
|
||||
tools:src="@drawable/ic_artist" />
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".detail.adapters.DetailAlbumAdapter.AlbumViewHolder">
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".recycler.viewholders.SongViewHolder">
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".recycler.viewholders.GenreViewHolder">
|
||||
|
||||
|
@ -17,8 +17,8 @@
|
|||
android:id="@+id/genre_image"
|
||||
android:layout_width="@dimen/size_cover_normal"
|
||||
android:layout_height="@dimen/size_cover_normal"
|
||||
app:genreImage="@{genre}"
|
||||
android:contentDescription="@{@string/description_genre_image(genre.name)}"
|
||||
app:genreImage="@{genre}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".detail.adapters.DetailArtistAdapter.ViewHolder">
|
||||
|
||||
|
@ -18,10 +18,10 @@
|
|||
android:layout_width="@dimen/size_cover_large"
|
||||
android:layout_height="@dimen/size_cover_large"
|
||||
android:contentDescription="@{@string/description_artist_image(artist.name)}"
|
||||
app:artistImage="@{artist}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:artistImage="@{artist}"
|
||||
tools:src="@drawable/ic_artist" />
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".recycler.viewholders.SongViewHolder">
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".recycler.viewholders.SongViewHolder">
|
||||
|
||||
|
@ -50,10 +50,10 @@
|
|||
<TextView
|
||||
android:id="@+id/duration"
|
||||
style="@style/ItemText.Secondary"
|
||||
android:ellipsize="none"
|
||||
android:gravity="end"
|
||||
android:text="@{song.formattedDuration}"
|
||||
android:textAlignment="viewEnd"
|
||||
android:gravity="end"
|
||||
android:ellipsize="none"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<item
|
||||
android:id="@+id/action_play"
|
||||
android:title="@string/label_play"
|
||||
android:icon="@drawable/ic_play"
|
||||
android:title="@string/label_play"
|
||||
app:showAsAction="ifRoom" />
|
||||
<item
|
||||
android:id="@+id/action_shuffle"
|
||||
|
@ -14,6 +14,6 @@
|
|||
<item
|
||||
android:id="@+id/action_queue_add"
|
||||
android:icon="@drawable/ic_queue_add"
|
||||
app:showAsAction="never"
|
||||
android:title="@string/label_queue_add" />
|
||||
android:title="@string/label_queue_add"
|
||||
app:showAsAction="never" />
|
||||
</menu>
|
|
@ -2,14 +2,14 @@
|
|||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/action_queue_add"
|
||||
android:title="@string/label_queue_add"
|
||||
android:icon="@drawable/ic_queue_add" />
|
||||
android:icon="@drawable/ic_queue_add"
|
||||
android:title="@string/label_queue_add" />
|
||||
<item
|
||||
android:id="@+id/action_go_artist"
|
||||
android:title="@string/label_go_artist"
|
||||
android:icon="@drawable/ic_artist" />
|
||||
android:icon="@drawable/ic_artist"
|
||||
android:title="@string/label_go_artist" />
|
||||
<item
|
||||
android:id="@+id/action_play_artist"
|
||||
android:title="@string/label_play_artist"
|
||||
android:icon="@drawable/ic_artist" />
|
||||
android:icon="@drawable/ic_artist"
|
||||
android:title="@string/label_play_artist" />
|
||||
</menu>
|
|
@ -8,7 +8,7 @@
|
|||
app:showAsAction="ifRoom" />
|
||||
<item
|
||||
android:id="@+id/action_play"
|
||||
android:title="@string/label_play"
|
||||
android:icon="@drawable/ic_play"
|
||||
android:title="@string/label_play"
|
||||
app:showAsAction="never" />
|
||||
</menu>
|
|
@ -12,18 +12,18 @@
|
|||
<group android:id="@+id/group_sorting">
|
||||
<item
|
||||
android:id="@+id/option_sort_none"
|
||||
android:contentDescription="@string/description_sort_none"
|
||||
android:icon="@drawable/ic_sort_none"
|
||||
android:title="@string/label_sort_none"
|
||||
android:contentDescription="@string/description_sort_none" />
|
||||
android:title="@string/label_sort_none" />
|
||||
<item
|
||||
android:id="@+id/option_sort_alpha_down"
|
||||
android:contentDescription="@string/description_sort_alpha_down"
|
||||
android:icon="@drawable/ic_sort_alpha_down"
|
||||
android:title="@string/label_sort_alpha_down"
|
||||
android:contentDescription="@string/description_sort_alpha_down" />
|
||||
android:title="@string/label_sort_alpha_down" />
|
||||
<item
|
||||
android:id="@+id/option_sort_alpha_up"
|
||||
android:contentDescription="@string/description_sort_alpha_up"
|
||||
android:icon="@drawable/ic_sort_alpha_up"
|
||||
android:title="@string/label_sort_alpha_up"
|
||||
android:contentDescription="@string/description_sort_alpha_up" />
|
||||
android:title="@string/label_sort_alpha_up" />
|
||||
</group>
|
||||
</menu>
|
|
@ -2,14 +2,14 @@
|
|||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/library_fragment"
|
||||
android:title="@string/label_library"
|
||||
android:icon="@drawable/ic_library" />
|
||||
android:icon="@drawable/ic_library"
|
||||
android:title="@string/label_library" />
|
||||
<item
|
||||
android:id="@+id/songs_fragment"
|
||||
android:title="@string/label_songs"
|
||||
android:icon="@drawable/ic_song" />
|
||||
android:icon="@drawable/ic_song"
|
||||
android:title="@string/label_songs" />
|
||||
<item
|
||||
android:id="@+id/settings_fragment"
|
||||
android:title="@string/setting_title"
|
||||
android:icon="@drawable/ic_settings" />
|
||||
android:icon="@drawable/ic_settings"
|
||||
android:title="@string/setting_title" />
|
||||
</menu>
|
|
@ -2,18 +2,18 @@
|
|||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/action_queue_add"
|
||||
android:title="@string/label_queue_add"
|
||||
android:icon="@drawable/ic_queue_add" />
|
||||
android:icon="@drawable/ic_queue_add"
|
||||
android:title="@string/label_queue_add" />
|
||||
<item
|
||||
android:id="@+id/action_play_all_songs"
|
||||
android:title="@string/label_play_all_songs"
|
||||
android:icon="@drawable/ic_song" />
|
||||
android:icon="@drawable/ic_song"
|
||||
android:title="@string/label_play_all_songs" />
|
||||
<item
|
||||
android:id="@+id/action_play_artist"
|
||||
android:title="@string/label_play_artist"
|
||||
android:icon="@drawable/ic_artist" />
|
||||
android:icon="@drawable/ic_artist"
|
||||
android:title="@string/label_play_artist" />
|
||||
<item
|
||||
android:id="@+id/action_play_album"
|
||||
android:title="@string/label_play_album"
|
||||
android:icon="@drawable/ic_album" />
|
||||
android:icon="@drawable/ic_album"
|
||||
android:title="@string/label_play_album" />
|
||||
</menu>
|
|
@ -11,25 +11,25 @@
|
|||
tools:layout="@layout/fragment_library">
|
||||
<action
|
||||
android:id="@+id/action_show_genre"
|
||||
app:destination="@id/genre_detail_fragment"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim"
|
||||
app:destination="@id/genre_detail_fragment" />
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim" />
|
||||
<action
|
||||
android:id="@+id/action_show_artist"
|
||||
app:destination="@id/artist_detail_fragment"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim"
|
||||
app:destination="@id/artist_detail_fragment" />
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim" />
|
||||
<action
|
||||
android:id="@+id/action_show_album"
|
||||
app:destination="@id/album_detail_fragment"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim"
|
||||
app:destination="@id/album_detail_fragment" />
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim" />
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/artist_detail_fragment"
|
||||
|
@ -41,12 +41,12 @@
|
|||
app:argType="long" />
|
||||
<action
|
||||
android:id="@+id/action_show_album"
|
||||
app:destination="@id/album_detail_fragment"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:launchSingleTop="true"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim"
|
||||
app:destination="@id/album_detail_fragment"
|
||||
app:launchSingleTop="true" />
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim" />
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/album_detail_fragment"
|
||||
|
@ -61,11 +61,11 @@
|
|||
app:argType="boolean" />
|
||||
<action
|
||||
android:id="@+id/action_show_parent_artist"
|
||||
app:destination="@id/artist_detail_fragment"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim"
|
||||
app:destination="@id/artist_detail_fragment" />
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim" />
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/genre_detail_fragment"
|
||||
|
@ -74,11 +74,11 @@
|
|||
tools:layout="@layout/fragment_genre_detail">
|
||||
<action
|
||||
android:id="@+id/action_show_artist"
|
||||
app:destination="@id/artist_detail_fragment"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim"
|
||||
app:destination="@id/artist_detail_fragment" />
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim" />
|
||||
<argument
|
||||
android:name="genreId"
|
||||
app:argType="long" />
|
||||
|
|
|
@ -13,11 +13,11 @@
|
|||
app:destination="@id/main_fragment"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:launchSingleTop="true"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim"
|
||||
app:popUpTo="@id/loading_fragment"
|
||||
app:popUpToInclusive="true"
|
||||
app:launchSingleTop="true" />
|
||||
app:popUpToInclusive="true" />
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/main_fragment"
|
||||
|
|
|
@ -39,5 +39,7 @@
|
|||
|
||||
<!-- Misc -->
|
||||
<dimen name="elevation_normal">4dp</dimen>
|
||||
<dimen name="elevation_weird">4.2dp</dimen>
|
||||
<dimen name="elevation_high">8dp</dimen>
|
||||
<dimen name="offset_thumb">4dp</dimen>
|
||||
</resources>
|
|
@ -2,131 +2,131 @@
|
|||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<PreferenceCategory
|
||||
android:title="@string/setting_ui"
|
||||
android:layout="@layout/item_header">
|
||||
android:layout="@layout/item_header"
|
||||
android:title="@string/setting_ui">
|
||||
<ListPreference
|
||||
app:key="KEY_THEME"
|
||||
android:title="@string/setting_theme"
|
||||
android:icon="@drawable/ic_day"
|
||||
android:entries="@array/entires_theme"
|
||||
android:entryValues="@array/values_theme"
|
||||
android:icon="@drawable/ic_day"
|
||||
android:title="@string/setting_theme"
|
||||
app:defaultValue="AUTO"
|
||||
app:key="KEY_THEME"
|
||||
app:useSimpleSummaryProvider="true" />
|
||||
|
||||
<Preference
|
||||
app:key="KEY_ACCENT"
|
||||
android:title="@string/setting_accent"
|
||||
android:icon="@drawable/ic_accent"
|
||||
android:title="@string/setting_accent"
|
||||
app:key="KEY_ACCENT"
|
||||
app:summary="@string/setting_accent_unknown" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:key="KEY_EDGE"
|
||||
android:title="@string/setting_edge"
|
||||
app:summary="@string/setting_edge_desc"
|
||||
app:iconSpaceReserved="false"
|
||||
app:allowDividerBelow="false"
|
||||
app:defaultValue="false" />
|
||||
app:defaultValue="false"
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="KEY_EDGE"
|
||||
app:summary="@string/setting_edge_desc" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/setting_display"
|
||||
android:layout="@layout/item_header">
|
||||
android:layout="@layout/item_header"
|
||||
android:title="@string/setting_display">
|
||||
|
||||
<ListPreference
|
||||
app:key="KEY_LIBRARY_DISPLAY_MODE"
|
||||
android:title="@string/setting_lib_display"
|
||||
android:icon="@drawable/ic_artist"
|
||||
android:title="@string/setting_lib_display"
|
||||
app:defaultValue="SHOW_ARTISTS"
|
||||
app:entries="@array/entries_lib_display"
|
||||
app:entryValues="@array/values_lib_display"
|
||||
app:defaultValue="SHOW_ARTISTS"
|
||||
app:key="KEY_LIBRARY_DISPLAY_MODE"
|
||||
app:useSimpleSummaryProvider="true" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:key="KEY_COLOR_NOTIF"
|
||||
android:title="@string/setting_color_notif"
|
||||
app:summary="@string/setting_color_desc"
|
||||
app:defaultValue="true"
|
||||
app:iconSpaceReserved="false"
|
||||
app:defaultValue="true" />
|
||||
app:key="KEY_COLOR_NOTIF"
|
||||
app:summary="@string/setting_color_desc" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:key="KEY_ALT_NOTIF_ACTION"
|
||||
android:title="@string/setting_use_alt_action"
|
||||
app:iconSpaceReserved="false"
|
||||
app:summaryOn="@string/setting_use_alt_shuffle"
|
||||
app:summaryOff="@string/setting_use_alt_loop"
|
||||
app:allowDividerBelow="false"
|
||||
app:defaultValue="false" />
|
||||
app:defaultValue="false"
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="KEY_ALT_NOTIF_ACTION"
|
||||
app:summaryOff="@string/setting_use_alt_loop"
|
||||
app:summaryOn="@string/setting_use_alt_shuffle" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/setting_playback"
|
||||
android:layout="@layout/item_header">
|
||||
android:layout="@layout/item_header"
|
||||
android:title="@string/setting_playback">
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:key="KEY_AUDIO_FOCUS"
|
||||
android:title="@string/setting_playback_audio_focus"
|
||||
app:iconSpaceReserved="false"
|
||||
app:defaultValue="true"
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="KEY_AUDIO_FOCUS"
|
||||
app:summary="@string/setting_playback_focus_desc" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:key="KEY_PLUG_MGT"
|
||||
android:title="@string/setting_playback_plug_mgt"
|
||||
app:iconSpaceReserved="false"
|
||||
app:defaultValue="true"
|
||||
app:allowDividerBelow="false"
|
||||
app:defaultValue="true"
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="KEY_PLUG_MGT"
|
||||
app:summary="@string/setting_playback_plug_mgt_desc" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/setting_behavior"
|
||||
android:layout="@layout/item_header">
|
||||
android:layout="@layout/item_header"
|
||||
android:title="@string/setting_behavior">
|
||||
|
||||
<ListPreference
|
||||
app:key="KEY_SONG_PLAY_MODE"
|
||||
android:title="@string/setting_behavior_song_playback_mode"
|
||||
app:defaultValue="ALL_SONGS"
|
||||
app:entries="@array/entries_song_playback_mode"
|
||||
app:entryValues="@array/values_song_playback_mode"
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="KEY_SONG_PLAY_MODE"
|
||||
app:useSimpleSummaryProvider="true" />
|
||||
|
||||
<ListPreference
|
||||
app:key="KEY_AT_END"
|
||||
android:title="@string/setting_behavior_at_end"
|
||||
app:defaultValue="LOOP_PAUSE"
|
||||
app:entries="@array/entries_at_end"
|
||||
app:entryValues="@array/values_at_end"
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="KEY_AT_END"
|
||||
app:useSimpleSummaryProvider="true" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:key="KEY_KEEP_SHUFFLE"
|
||||
android:title="@string/setting_behavior_keep_shuffle"
|
||||
app:summary="@string/setting_behavior_keep_shuffle_desc"
|
||||
app:defaultValue="false"
|
||||
app:iconSpaceReserved="false" />
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="KEY_KEEP_SHUFFLE"
|
||||
app:summary="@string/setting_behavior_keep_shuffle_desc" />
|
||||
|
||||
<SwitchPreference
|
||||
app:key="KEY_PREV_REWIND"
|
||||
android:title="@string/setting_behavior_rewind_prev"
|
||||
app:summary="@string/setting_behavior_rewind_prev_desc"
|
||||
app:defaultValue="true"
|
||||
app:iconSpaceReserved="false"
|
||||
app:defaultValue="true" />
|
||||
app:key="KEY_PREV_REWIND"
|
||||
app:summary="@string/setting_behavior_rewind_prev_desc" />
|
||||
|
||||
<SeekBarPreference
|
||||
app:key="KEY_REWIND_THRESHOLD"
|
||||
android:title="@string/setting_behavior_rewind_threshold"
|
||||
android:defaultValue="@integer/rewind_threshold_default"
|
||||
android:max="@integer/rewind_threshold_max"
|
||||
app:min="@integer/rewind_threshold_min"
|
||||
app:summary="@string/setting_behavior_rewind_threshold_desc"
|
||||
app:showSeekBarValue="true"
|
||||
android:title="@string/setting_behavior_rewind_threshold"
|
||||
app:allowDividerBelow="false"
|
||||
app:dependency="KEY_PREV_REWIND"
|
||||
app:iconSpaceReserved="false"
|
||||
app:dependency="KEY_PREV_REWIND" />
|
||||
app:key="KEY_REWIND_THRESHOLD"
|
||||
app:min="@integer/rewind_threshold_min"
|
||||
app:showSeekBarValue="true"
|
||||
app:summary="@string/setting_behavior_rewind_threshold_desc" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
|
@ -136,10 +136,10 @@
|
|||
app:layout="@layout/item_header">
|
||||
|
||||
<Preference
|
||||
app:key="KEY_SAVE_STATE"
|
||||
android:title="@string/debug_state_save"
|
||||
app:summary="@string/debug_state_save_desc"
|
||||
app:iconSpaceReserved="false" />
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="KEY_SAVE_STATE"
|
||||
app:summary="@string/debug_state_save_desc" />
|
||||
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
|
@ -2,123 +2,123 @@
|
|||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<PreferenceCategory
|
||||
android:title="@string/setting_ui"
|
||||
android:layout="@layout/item_header">
|
||||
android:layout="@layout/item_header"
|
||||
android:title="@string/setting_ui">
|
||||
<ListPreference
|
||||
app:key="KEY_THEME"
|
||||
android:title="@string/setting_theme"
|
||||
android:icon="@drawable/ic_day"
|
||||
android:entries="@array/entires_theme"
|
||||
android:entryValues="@array/values_theme"
|
||||
android:icon="@drawable/ic_day"
|
||||
android:title="@string/setting_theme"
|
||||
app:defaultValue="AUTO"
|
||||
app:key="KEY_THEME"
|
||||
app:useSimpleSummaryProvider="true" />
|
||||
|
||||
<Preference
|
||||
app:key="KEY_ACCENT"
|
||||
android:title="@string/setting_accent"
|
||||
android:icon="@drawable/ic_accent"
|
||||
android:title="@string/setting_accent"
|
||||
app:key="KEY_ACCENT"
|
||||
app:summary="@string/setting_accent_unknown" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/setting_display"
|
||||
android:layout="@layout/item_header">
|
||||
android:layout="@layout/item_header"
|
||||
android:title="@string/setting_display">
|
||||
|
||||
<ListPreference
|
||||
app:key="KEY_LIBRARY_DISPLAY_MODE"
|
||||
android:title="@string/setting_lib_display"
|
||||
android:icon="@drawable/ic_artist"
|
||||
android:title="@string/setting_lib_display"
|
||||
app:defaultValue="SHOW_ARTISTS"
|
||||
app:entries="@array/entries_lib_display"
|
||||
app:entryValues="@array/values_lib_display"
|
||||
app:defaultValue="SHOW_ARTISTS"
|
||||
app:key="KEY_LIBRARY_DISPLAY_MODE"
|
||||
app:useSimpleSummaryProvider="true" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:key="KEY_COLOR_NOTIF"
|
||||
android:title="@string/setting_color_notif"
|
||||
app:summary="@string/setting_color_desc"
|
||||
app:defaultValue="true"
|
||||
app:iconSpaceReserved="false"
|
||||
app:defaultValue="true" />
|
||||
app:key="KEY_COLOR_NOTIF"
|
||||
app:summary="@string/setting_color_desc" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:key="KEY_ALT_NOTIF_ACTION"
|
||||
android:title="@string/setting_use_alt_action"
|
||||
app:iconSpaceReserved="false"
|
||||
app:summaryOn="@string/setting_use_alt_shuffle"
|
||||
app:summaryOff="@string/setting_use_alt_loop"
|
||||
app:allowDividerBelow="false"
|
||||
app:defaultValue="false" />
|
||||
app:defaultValue="false"
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="KEY_ALT_NOTIF_ACTION"
|
||||
app:summaryOff="@string/setting_use_alt_loop"
|
||||
app:summaryOn="@string/setting_use_alt_shuffle" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/setting_playback"
|
||||
android:layout="@layout/item_header">
|
||||
android:layout="@layout/item_header"
|
||||
android:title="@string/setting_playback">
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:key="KEY_AUDIO_FOCUS"
|
||||
android:title="@string/setting_playback_audio_focus"
|
||||
app:iconSpaceReserved="false"
|
||||
app:defaultValue="true"
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="KEY_AUDIO_FOCUS"
|
||||
app:summary="@string/setting_playback_focus_desc" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:key="KEY_PLUG_MGT"
|
||||
android:title="@string/setting_playback_plug_mgt"
|
||||
app:iconSpaceReserved="false"
|
||||
app:defaultValue="true"
|
||||
app:allowDividerBelow="false"
|
||||
app:defaultValue="true"
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="KEY_PLUG_MGT"
|
||||
app:summary="@string/setting_playback_plug_mgt_desc" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/setting_behavior"
|
||||
android:layout="@layout/item_header">
|
||||
android:layout="@layout/item_header"
|
||||
android:title="@string/setting_behavior">
|
||||
|
||||
<ListPreference
|
||||
app:key="KEY_SONG_PLAY_MODE"
|
||||
android:title="@string/setting_behavior_song_playback_mode"
|
||||
app:defaultValue="ALL_SONGS"
|
||||
app:entries="@array/entries_song_playback_mode"
|
||||
app:entryValues="@array/values_song_playback_mode"
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="KEY_SONG_PLAY_MODE"
|
||||
app:useSimpleSummaryProvider="true" />
|
||||
|
||||
<ListPreference
|
||||
app:key="KEY_AT_END"
|
||||
android:title="@string/setting_behavior_at_end"
|
||||
app:defaultValue="LOOP_PAUSE"
|
||||
app:entries="@array/entries_at_end"
|
||||
app:entryValues="@array/values_at_end"
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="KEY_AT_END"
|
||||
app:useSimpleSummaryProvider="true" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:key="KEY_KEEP_SHUFFLE"
|
||||
android:title="@string/setting_behavior_keep_shuffle"
|
||||
app:summary="@string/setting_behavior_keep_shuffle_desc"
|
||||
app:defaultValue="false"
|
||||
app:iconSpaceReserved="false" />
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="KEY_KEEP_SHUFFLE"
|
||||
app:summary="@string/setting_behavior_keep_shuffle_desc" />
|
||||
|
||||
<SwitchPreference
|
||||
app:key="KEY_PREV_REWIND"
|
||||
android:title="@string/setting_behavior_rewind_prev"
|
||||
app:summary="@string/setting_behavior_rewind_prev_desc"
|
||||
app:defaultValue="true"
|
||||
app:iconSpaceReserved="false"
|
||||
app:defaultValue="true" />
|
||||
app:key="KEY_PREV_REWIND"
|
||||
app:summary="@string/setting_behavior_rewind_prev_desc" />
|
||||
|
||||
<SeekBarPreference
|
||||
app:key="KEY_REWIND_THRESHOLD"
|
||||
android:title="@string/setting_behavior_rewind_threshold"
|
||||
android:defaultValue="@integer/rewind_threshold_default"
|
||||
android:max="@integer/rewind_threshold_max"
|
||||
app:min="@integer/rewind_threshold_min"
|
||||
app:summary="@string/setting_behavior_rewind_threshold_desc"
|
||||
app:showSeekBarValue="true"
|
||||
android:title="@string/setting_behavior_rewind_threshold"
|
||||
app:dependency="KEY_PREV_REWIND"
|
||||
app:iconSpaceReserved="false"
|
||||
app:dependency="KEY_PREV_REWIND" />
|
||||
app:key="KEY_REWIND_THRESHOLD"
|
||||
app:min="@integer/rewind_threshold_min"
|
||||
app:showSeekBarValue="true"
|
||||
app:summary="@string/setting_behavior_rewind_threshold_desc" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
|
@ -128,10 +128,10 @@
|
|||
app:layout="@layout/item_header">
|
||||
|
||||
<Preference
|
||||
app:key="KEY_SAVE_STATE"
|
||||
android:title="@string/debug_state_save"
|
||||
app:summary="@string/debug_state_save_desc"
|
||||
app:iconSpaceReserved="false" />
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="KEY_SAVE_STATE"
|
||||
app:summary="@string/debug_state_save_desc" />
|
||||
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
Loading…
Reference in a new issue