Refactor edge-to-edge
Change edge-to-edge to auto-enable on 27+, along with relying on styles to make the systemui changes instead of code directly.
This commit is contained in:
parent
0d32ab0f7e
commit
4413cb1499
20 changed files with 275 additions and 418 deletions
|
@ -1,7 +1,6 @@
|
||||||
package org.oxycblt.auxio
|
package org.oxycblt.auxio
|
||||||
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.graphics.Color
|
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
@ -13,13 +12,11 @@ import org.oxycblt.auxio.databinding.ActivityMainBinding
|
||||||
import org.oxycblt.auxio.playback.PlaybackService
|
import org.oxycblt.auxio.playback.PlaybackService
|
||||||
import org.oxycblt.auxio.settings.SettingsManager
|
import org.oxycblt.auxio.settings.SettingsManager
|
||||||
import org.oxycblt.auxio.ui.accent
|
import org.oxycblt.auxio.ui.accent
|
||||||
import org.oxycblt.auxio.ui.handleTransparentSystemBars
|
import org.oxycblt.auxio.ui.isEdgeOn
|
||||||
import org.oxycblt.auxio.ui.toColor
|
|
||||||
|
|
||||||
// FIXME: Fix bug where fast navigation will break the animations and
|
// FIXME: Fix bug where fast navigation will break the animations and
|
||||||
// lead to nothing being displayed [Possibly Un-fixable]
|
// lead to nothing being displayed [Possibly Un-fixable]
|
||||||
// FIXME: Compat issue with Versions 5 that leads to progress bar looking off
|
// FIXME: Compat issue with Versions 5 that leads to progress bar looking off
|
||||||
// TODO: Try to heavily refactor edge-to-edge
|
|
||||||
class MainActivity : AppCompatActivity() {
|
class MainActivity : AppCompatActivity() {
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
@ -39,7 +36,7 @@ class MainActivity : AppCompatActivity() {
|
||||||
// Apply the theme
|
// Apply the theme
|
||||||
setTheme(accent.second)
|
setTheme(accent.second)
|
||||||
|
|
||||||
if (settingsManager.edgeEnabled && Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1) {
|
if (isEdgeOn()) {
|
||||||
doEdgeToEdgeSetup(binding)
|
doEdgeToEdgeSetup(binding)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -55,11 +52,6 @@ class MainActivity : AppCompatActivity() {
|
||||||
@Suppress("DEPRECATION")
|
@Suppress("DEPRECATION")
|
||||||
private fun doEdgeToEdgeSetup(binding: ActivityMainBinding) {
|
private fun doEdgeToEdgeSetup(binding: ActivityMainBinding) {
|
||||||
window?.apply {
|
window?.apply {
|
||||||
statusBarColor = Color.TRANSPARENT
|
|
||||||
|
|
||||||
// Use a heavily transparent scrim on the nav bar as full transparency is borked
|
|
||||||
navigationBarColor = R.color.nav_color.toColor(this@MainActivity)
|
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||||
// Do modern edge to edge [Which is really a shot in the dark tbh]
|
// Do modern edge to edge [Which is really a shot in the dark tbh]
|
||||||
this@MainActivity.logD("Doing R+ edge-to-edge.")
|
this@MainActivity.logD("Doing R+ edge-to-edge.")
|
||||||
|
@ -81,8 +73,6 @@ class MainActivity : AppCompatActivity() {
|
||||||
binding.root.systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION or
|
binding.root.systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION or
|
||||||
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
|
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
|
||||||
}
|
}
|
||||||
|
|
||||||
handleTransparentSystemBars(resources.configuration)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,8 +14,8 @@ import org.oxycblt.auxio.R
|
||||||
import org.oxycblt.auxio.databinding.FragmentCompactPlaybackBinding
|
import org.oxycblt.auxio.databinding.FragmentCompactPlaybackBinding
|
||||||
import org.oxycblt.auxio.logD
|
import org.oxycblt.auxio.logD
|
||||||
import org.oxycblt.auxio.music.MusicStore
|
import org.oxycblt.auxio.music.MusicStore
|
||||||
import org.oxycblt.auxio.ui.memberBinding
|
|
||||||
import org.oxycblt.auxio.ui.isLandscape
|
import org.oxycblt.auxio.ui.isLandscape
|
||||||
|
import org.oxycblt.auxio.ui.memberBinding
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A [Fragment] that displays the currently played song at a glance, with some basic controls.
|
* A [Fragment] that displays the currently played song at a glance, with some basic controls.
|
||||||
|
|
|
@ -17,7 +17,7 @@ import org.oxycblt.auxio.music.BaseModel
|
||||||
import org.oxycblt.auxio.music.Header
|
import org.oxycblt.auxio.music.Header
|
||||||
import org.oxycblt.auxio.playback.PlaybackViewModel
|
import org.oxycblt.auxio.playback.PlaybackViewModel
|
||||||
import org.oxycblt.auxio.playback.state.PlaybackMode
|
import org.oxycblt.auxio.playback.state.PlaybackMode
|
||||||
import org.oxycblt.auxio.settings.SettingsManager
|
import org.oxycblt.auxio.ui.isEdgeOn
|
||||||
import org.oxycblt.auxio.ui.isIrregularLandscape
|
import org.oxycblt.auxio.ui.isIrregularLandscape
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -50,8 +50,7 @@ class QueueFragment : Fragment() {
|
||||||
findNavController().navigateUp()
|
findNavController().navigateUp()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!requireActivity().isIrregularLandscape() &&
|
if (!requireActivity().isIrregularLandscape() && isEdgeOn()) {
|
||||||
SettingsManager.getInstance().edgeEnabled) {
|
|
||||||
setOnApplyWindowInsetsListener @Suppress("DEPRECATION") { _, insets ->
|
setOnApplyWindowInsetsListener @Suppress("DEPRECATION") { _, insets ->
|
||||||
val top = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
val top = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||||
insets.getInsets(WindowInsets.Type.systemBars()).top
|
insets.getInsets(WindowInsets.Type.systemBars()).top
|
||||||
|
|
|
@ -42,9 +42,6 @@ class SettingsManager private constructor(context: Context) :
|
||||||
.apply()
|
.apply()
|
||||||
}
|
}
|
||||||
|
|
||||||
val edgeEnabled: Boolean
|
|
||||||
get() = sharedPrefs.getBoolean(Keys.KEY_EDGE_TO_EDGE, false)
|
|
||||||
|
|
||||||
val colorizeNotif: Boolean
|
val colorizeNotif: Boolean
|
||||||
get() = sharedPrefs.getBoolean(Keys.KEY_COLORIZE_NOTIFICATION, true)
|
get() = sharedPrefs.getBoolean(Keys.KEY_COLORIZE_NOTIFICATION, true)
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
package org.oxycblt.auxio.settings.ui
|
package org.oxycblt.auxio.settings.ui
|
||||||
|
|
||||||
import android.app.Dialog
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.content.pm.PackageManager
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.view.WindowManager
|
|
||||||
import androidx.browser.customtabs.CustomTabsIntent
|
import androidx.browser.customtabs.CustomTabsIntent
|
||||||
|
import androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
import androidx.core.net.toUri
|
import androidx.core.net.toUri
|
||||||
import androidx.fragment.app.DialogFragment
|
import com.google.android.material.bottomsheet.BottomSheetBehavior
|
||||||
|
import com.google.android.material.bottomsheet.BottomSheetDialog
|
||||||
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
|
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
|
||||||
import org.oxycblt.auxio.BuildConfig
|
import org.oxycblt.auxio.BuildConfig
|
||||||
import org.oxycblt.auxio.R
|
import org.oxycblt.auxio.R
|
||||||
|
@ -20,8 +19,7 @@ import org.oxycblt.auxio.logE
|
||||||
import org.oxycblt.auxio.music.MusicStore
|
import org.oxycblt.auxio.music.MusicStore
|
||||||
import org.oxycblt.auxio.settings.SettingsManager
|
import org.oxycblt.auxio.settings.SettingsManager
|
||||||
import org.oxycblt.auxio.ui.createToast
|
import org.oxycblt.auxio.ui.createToast
|
||||||
import org.oxycblt.auxio.ui.handleTransparentSystemBars
|
import org.oxycblt.auxio.ui.isEdgeOn
|
||||||
import org.oxycblt.auxio.ui.handleTransparentSystemNavBar
|
|
||||||
import org.oxycblt.auxio.ui.isIrregularLandscape
|
import org.oxycblt.auxio.ui.isIrregularLandscape
|
||||||
import org.oxycblt.auxio.ui.isLandscape
|
import org.oxycblt.auxio.ui.isLandscape
|
||||||
import org.oxycblt.auxio.ui.toColor
|
import org.oxycblt.auxio.ui.toColor
|
||||||
|
@ -40,12 +38,10 @@ class AboutDialog : BottomSheetDialogFragment() {
|
||||||
val settingsManager = SettingsManager.getInstance()
|
val settingsManager = SettingsManager.getInstance()
|
||||||
|
|
||||||
// --- UI SETUP ---
|
// --- UI SETUP ---
|
||||||
|
if (isEdgeOn() && !requireActivity().isIrregularLandscape()) {
|
||||||
// Apply edge-to-edge to the dialog if supported/enabled.
|
|
||||||
if (settingsManager.edgeEnabled && !requireActivity().isIrregularLandscape()) {
|
|
||||||
requireDialog().window?.apply {
|
requireDialog().window?.apply {
|
||||||
navigationBarColor = R.color.background.toColor(requireContext())
|
navigationBarColor = R.color.background.toColor(requireContext())
|
||||||
handleTransparentSystemNavBar(resources.configuration)
|
// handleTransparentSystemNavBar(resources.configuration)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,6 +58,15 @@ class AboutDialog : BottomSheetDialogFragment() {
|
||||||
R.string.format_author, getString(R.string.author_oxycblt)
|
R.string.format_author, getString(R.string.author_oxycblt)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (isLandscape(resources)) {
|
||||||
|
val dialog = requireDialog() as BottomSheetDialog
|
||||||
|
dialog.findViewById<CoordinatorLayout>(
|
||||||
|
com.google.android.material.R.id.design_bottom_sheet
|
||||||
|
)?.let {
|
||||||
|
BottomSheetBehavior.from(it).state = BottomSheetBehavior.STATE_EXPANDED
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
logD("Dialog created.")
|
logD("Dialog created.")
|
||||||
|
|
||||||
return binding.root
|
return binding.root
|
||||||
|
@ -111,11 +116,10 @@ class AboutDialog : BottomSheetDialogFragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
// TODO: Change dev to master
|
|
||||||
private const val LINK_CODEBASE = "https://github.com/oxygencobalt/Auxio"
|
private const val LINK_CODEBASE = "https://github.com/oxygencobalt/Auxio"
|
||||||
private const val LINK_FAQ = "$LINK_CODEBASE/blob/master/FAQ.md"
|
private const val LINK_FAQ = "$LINK_CODEBASE/blob/master/FAQ.md"
|
||||||
private const val LINK_LICENSES = "$LINK_CODEBASE/blob/master/LICENSES.md"
|
private const val LINK_LICENSES = "$LINK_CODEBASE/blob/master/LICENSES.md"
|
||||||
|
|
||||||
val LINKS = arrayOf(LINK_CODEBASE, LINK_FAQ, LINK_LICENSES)
|
val LINKS = arrayOf(LINK_CODEBASE, LINK_FAQ, LINK_LICENSES)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,15 +6,10 @@ package org.oxycblt.auxio.ui
|
||||||
import android.annotation.TargetApi
|
import android.annotation.TargetApi
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.res.Configuration
|
|
||||||
import android.graphics.Point
|
import android.graphics.Point
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.util.DisplayMetrics
|
import android.util.DisplayMetrics
|
||||||
import android.view.View
|
|
||||||
import android.view.Window
|
|
||||||
import android.view.WindowInsetsController
|
|
||||||
import android.view.WindowManager
|
import android.view.WindowManager
|
||||||
import org.oxycblt.auxio.settings.SettingsManager
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if we are in the "Irregular" landscape mode [e.g landscape, but nav bar is on the sides]
|
* Check if we are in the "Irregular" landscape mode [e.g landscape, but nav bar is on the sides]
|
||||||
|
@ -27,6 +22,10 @@ fun Activity.isIrregularLandscape(): Boolean {
|
||||||
!isSystemBarOnBottom(this)
|
!isSystemBarOnBottom(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun isEdgeOn(): Boolean {
|
||||||
|
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the system bars are on the bottom.
|
* Check if the system bars are on the bottom.
|
||||||
* @return If the system bars are on the bottom, false if no.
|
* @return If the system bars are on the bottom, false if no.
|
||||||
|
@ -62,61 +61,3 @@ private fun isSystemBarOnBottom(activity: Activity): Boolean {
|
||||||
|
|
||||||
return (!canMove || width < height)
|
return (!canMove || width < height)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Handle transparent system bars. Adapted from Music Player GO
|
|
||||||
* (https://github.com/enricocid/Music-Player-GO)
|
|
||||||
*/
|
|
||||||
fun Window.handleTransparentSystemBars(config: Configuration) {
|
|
||||||
fun isNight() = config.uiMode and Configuration.UI_MODE_NIGHT_MASK == Configuration.UI_MODE_NIGHT_YES
|
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
|
||||||
insetsController?.let { controller ->
|
|
||||||
val appearance = WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS or
|
|
||||||
WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS
|
|
||||||
|
|
||||||
val mask = if (isNight()) 0 else appearance
|
|
||||||
|
|
||||||
controller.setSystemBarsAppearance(appearance, mask)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
val flags = decorView.systemUiVisibility
|
|
||||||
|
|
||||||
decorView.systemUiVisibility =
|
|
||||||
if (isNight()) {
|
|
||||||
flags and View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR.inv() and
|
|
||||||
View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR.inv()
|
|
||||||
} else {
|
|
||||||
flags or View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR or
|
|
||||||
View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handle only the transparent navigation bar.
|
|
||||||
*/
|
|
||||||
fun Window.handleTransparentSystemNavBar(config: Configuration) {
|
|
||||||
fun isNight() = config.uiMode and Configuration.UI_MODE_NIGHT_MASK == Configuration.UI_MODE_NIGHT_YES
|
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
|
||||||
insetsController?.let { controller ->
|
|
||||||
val appearance = WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS
|
|
||||||
|
|
||||||
val mask = if (isNight()) 0 else appearance
|
|
||||||
|
|
||||||
controller.setSystemBarsAppearance(appearance, mask)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
val flags = decorView.systemUiVisibility
|
|
||||||
|
|
||||||
decorView.systemUiVisibility =
|
|
||||||
if (isNight()) {
|
|
||||||
flags and View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR.inv() and
|
|
||||||
View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR.inv()
|
|
||||||
} else {
|
|
||||||
flags or View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR or
|
|
||||||
View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -20,7 +20,8 @@ import kotlin.reflect.KProperty
|
||||||
* @param onDestroy Any code that should be run when the binding is destroyed.
|
* @param onDestroy Any code that should be run when the binding is destroyed.
|
||||||
*/
|
*/
|
||||||
fun <T : ViewBinding> Fragment.memberBinding(
|
fun <T : ViewBinding> Fragment.memberBinding(
|
||||||
bindingFactory: (LayoutInflater) -> T, onDestroy: T.() -> Unit = {}
|
bindingFactory: (LayoutInflater) -> T,
|
||||||
|
onDestroy: T.() -> Unit = {}
|
||||||
) = FragmentBinderDelegate(this, bindingFactory, onDestroy)
|
) = FragmentBinderDelegate(this, bindingFactory, onDestroy)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="24dp"
|
android:width="24dp"
|
||||||
android:height="24dp"
|
android:height="24dp"
|
||||||
|
android:tint="?attr/colorControlNormal"
|
||||||
android:viewportWidth="24"
|
android:viewportWidth="24"
|
||||||
android:viewportHeight="24"
|
android:viewportHeight="24">
|
||||||
android:tint="?attr/colorControlNormal">
|
<path
|
||||||
<path
|
android:fillColor="@android:color/white"
|
||||||
android:fillColor="@android:color/white"
|
android:pathData="M11,18h2v-2h-2v2zM12,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,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8zM12,6c-2.21,0 -4,1.79 -4,4h2c0,-1.1 0.9,-2 2,-2s2,0.9 2,2c0,2 -3,1.75 -3,5h2c0,-2.25 3,-2.5 3,-5 0,-2.21 -1.79,-4 -4,-4z" />
|
||||||
android:pathData="M11,18h2v-2h-2v2zM12,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,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8zM12,6c-2.21,0 -4,1.79 -4,4h2c0,-1.1 0.9,-2 2,-2s2,0.9 2,2c0,2 -3,1.75 -3,5h2c0,-2.25 3,-2.5 3,-5 0,-2.21 -1.79,-4 -4,-4z"/>
|
|
||||||
</vector>
|
</vector>
|
|
@ -2,10 +2,10 @@
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="24dp"
|
android:width="24dp"
|
||||||
android:height="24dp"
|
android:height="24dp"
|
||||||
|
android:tint="?attr/colorControlNormal"
|
||||||
android:viewportWidth="24"
|
android:viewportWidth="24"
|
||||||
android:viewportHeight="24"
|
android:viewportHeight="24">
|
||||||
android:tint="?attr/colorControlNormal">
|
<path
|
||||||
<path
|
android:fillColor="@android:color/white"
|
||||||
android:fillColor="@android:color/white"
|
android:pathData="M3,17.25V21h3.75L17.81,9.94l-3.75,-3.75L3,17.25zM21.41,6.34l-3.75,-3.75 -2.53,2.54 3.75,3.75 2.53,-2.54z" />
|
||||||
android:pathData="M3,17.25V21h3.75L17.81,9.94l-3.75,-3.75L3,17.25zM21.41,6.34l-3.75,-3.75 -2.53,2.54 3.75,3.75 2.53,-2.54z"/>
|
|
||||||
</vector>
|
</vector>
|
|
@ -2,10 +2,10 @@
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="24dp"
|
android:width="24dp"
|
||||||
android:height="24dp"
|
android:height="24dp"
|
||||||
|
android:tint="?attr/colorControlNormal"
|
||||||
android:viewportWidth="24"
|
android:viewportWidth="24"
|
||||||
android:viewportHeight="24"
|
android:viewportHeight="24">
|
||||||
android:tint="?attr/colorControlNormal">
|
<path
|
||||||
<path
|
android:fillColor="@android:color/white"
|
||||||
android:fillColor="@android:color/white"
|
android:pathData="M9.4,16.6L4.8,12l4.6,-4.6L8,6l-6,6 6,6 1.4,-1.4zM14.6,16.6l4.6,-4.6 -4.6,-4.6L16,6l6,6 -6,6 -1.4,-1.4z" />
|
||||||
android:pathData="M9.4,16.6L4.8,12l4.6,-4.6L8,6l-6,6 6,6 1.4,-1.4zM14.6,16.6l4.6,-4.6 -4.6,-4.6L16,6l6,6 -6,6 -1.4,-1.4z"/>
|
|
||||||
</vector>
|
</vector>
|
|
@ -2,10 +2,10 @@
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="24dp"
|
android:width="24dp"
|
||||||
android:height="24dp"
|
android:height="24dp"
|
||||||
|
android:tint="?attr/colorControlNormal"
|
||||||
android:viewportWidth="24"
|
android:viewportWidth="24"
|
||||||
android:viewportHeight="24"
|
android:viewportHeight="24">
|
||||||
android:tint="?attr/colorControlNormal">
|
<path
|
||||||
<path
|
android:fillColor="@android:color/white"
|
||||||
android:fillColor="@android:color/white"
|
android:pathData="M4,6L2,6v16h16v-2L4,20L4,6zM22,2L6,2v16h16L22,2zM19,11L9,11L9,9h10v2zM15,15L9,15v-2h6v2zM19,7L9,7L9,5h10v2z" />
|
||||||
android:pathData="M4,6L2,6v16h16v-2L4,20L4,6zM22,2L6,2v16h16L22,2zM19,11L9,11L9,9h10v2zM15,15L9,15v-2h6v2zM19,7L9,7L9,5h10v2z"/>
|
|
||||||
</vector>
|
</vector>
|
|
@ -2,10 +2,10 @@
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="24dp"
|
android:width="24dp"
|
||||||
android:height="24dp"
|
android:height="24dp"
|
||||||
|
android:tint="?attr/colorControlNormal"
|
||||||
android:viewportWidth="24"
|
android:viewportWidth="24"
|
||||||
android:viewportHeight="24"
|
android:viewportHeight="24">
|
||||||
android:tint="?attr/colorControlNormal">
|
<path
|
||||||
<path
|
android:fillColor="@android:color/white"
|
||||||
android:fillColor="@android:color/white"
|
android:pathData="M4.01,2L4,22h16V8l-6,-6H4.01zM13,9V3.5L18.5,9H13z" />
|
||||||
android:pathData="M4.01,2L4,22h16V8l-6,-6H4.01zM13,9V3.5L18.5,9H13z"/>
|
|
||||||
</vector>
|
</vector>
|
|
@ -2,10 +2,10 @@
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="24dp"
|
android:width="24dp"
|
||||||
android:height="24dp"
|
android:height="24dp"
|
||||||
|
android:tint="?attr/colorControlNormal"
|
||||||
android:viewportWidth="24"
|
android:viewportWidth="24"
|
||||||
android:viewportHeight="24"
|
android:viewportHeight="24">
|
||||||
android:tint="?attr/colorControlNormal">
|
<path
|
||||||
<path
|
android:fillColor="@android:color/white"
|
||||||
android:fillColor="@android:color/white"
|
android:pathData="M11,7h2v2h-2zM11,11h2v6h-2zM12,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,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8z" />
|
||||||
android:pathData="M11,7h2v2h-2zM11,11h2v6h-2zM12,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,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8z"/>
|
|
||||||
</vector>
|
</vector>
|
|
@ -1,168 +1,174 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?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:android="http://schemas.android.com/apk/res/android"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.core.widget.NestedScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/background"
|
android:overScrollMode="never">
|
||||||
android:theme="@style/Theme.Neutral">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/about_auxio_icon"
|
|
||||||
android:layout_width="@dimen/size_app_icon"
|
|
||||||
android:layout_height="@dimen/size_app_icon"
|
|
||||||
android:layout_marginTop="@dimen/margin_medium"
|
|
||||||
android:contentDescription="@string/description_auxio_icon"
|
|
||||||
android:src="@mipmap/ic_launcher"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/about_app_name"
|
|
||||||
app:layout_constraintHorizontal_bias="0.5"
|
|
||||||
app:layout_constraintHorizontal_chainStyle="packed"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/about_app_name"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/margin_medium"
|
|
||||||
android:fontFamily="@font/inter_semibold"
|
|
||||||
android:text="@string/app_name"
|
|
||||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Headline5"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/about_auxio_icon"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintHorizontal_bias="0.5"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/about_auxio_icon"
|
|
||||||
app:layout_constraintTop_toTopOf="@+id/about_auxio_icon" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/about_desc"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/margin_small"
|
|
||||||
android:text="@string/app_desc"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/about_auxio_icon" />
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/version_container"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="0dp"
|
android:layout_height="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:background="@color/background"
|
||||||
android:padding="@dimen/padding_medium"
|
android:theme="@style/Theme.Neutral">
|
||||||
app:layout_constraintBottom_toTopOf="@+id/about_code"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/about_desc"
|
|
||||||
app:layout_constraintVertical_bias="0"
|
|
||||||
app:layout_constraintVertical_chainStyle="packed">
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/about_version_icon"
|
android:id="@+id/about_auxio_icon"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="@dimen/size_app_icon"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/size_app_icon"
|
||||||
android:contentDescription="@string/label_version"
|
android:layout_marginTop="@dimen/margin_medium"
|
||||||
android:src="@drawable/ic_version"
|
android:contentDescription="@string/description_auxio_icon"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
android:src="@mipmap/ic_launcher"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/about_app_name"
|
||||||
|
app:layout_constraintHorizontal_bias="0.5"
|
||||||
|
app:layout_constraintHorizontal_chainStyle="packed"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/about_version_title"
|
android:id="@+id/about_app_name"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/margin_medium"
|
android:layout_marginStart="@dimen/margin_medium"
|
||||||
android:text="@string/label_version"
|
android:fontFamily="@font/inter_semibold"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
android:text="@string/app_name"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/about_version"
|
android:textAppearance="@style/TextAppearance.MaterialComponents.Headline5"
|
||||||
app:layout_constraintStart_toEndOf="@+id/about_version_icon"
|
app:layout_constraintBottom_toBottomOf="@+id/about_auxio_icon"
|
||||||
app:layout_constraintTop_toTopOf="@+id/about_version_icon" />
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.5"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/about_auxio_icon"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/about_auxio_icon" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/about_version"
|
android:id="@+id/about_desc"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginTop="@dimen/margin_small"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
|
android:text="@string/app_desc"
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/about_version_icon"
|
android:textAlignment="center"
|
||||||
app:layout_constraintStart_toEndOf="@+id/about_version_icon"
|
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/about_version_title"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
tools:text="0.0.0" />
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/about_auxio_icon" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/version_container"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="@dimen/padding_medium"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/about_code"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/about_desc"
|
||||||
|
app:layout_constraintVertical_bias="0"
|
||||||
|
app:layout_constraintVertical_chainStyle="packed">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/about_version_icon"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:contentDescription="@string/label_version"
|
||||||
|
android:src="@drawable/ic_version"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/about_version_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/margin_medium"
|
||||||
|
android:text="@string/label_version"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/about_version"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/about_version_icon"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/about_version_icon" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/about_version"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/about_version_icon"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/about_version_icon"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/about_version_title"
|
||||||
|
tools:text="0.0.0" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/about_code"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/ui_ripple"
|
||||||
|
android:clickable="true"
|
||||||
|
android:drawablePadding="@dimen/padding_medium"
|
||||||
|
android:focusable="true"
|
||||||
|
android:padding="@dimen/padding_medium"
|
||||||
|
android:text="@string/label_code"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
||||||
|
app:drawableLeftCompat="@drawable/ic_code"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/about_faq"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/version_container" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/about_licenses"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/ui_ripple"
|
||||||
|
android:clickable="true"
|
||||||
|
android:drawablePadding="@dimen/padding_medium"
|
||||||
|
android:focusable="true"
|
||||||
|
android:padding="@dimen/padding_medium"
|
||||||
|
android:text="@string/label_licenses"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
||||||
|
app:drawableLeftCompat="@drawable/ic_license"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/about_song_count"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/about_faq" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/about_faq"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/ui_ripple"
|
||||||
|
android:clickable="true"
|
||||||
|
android:drawablePadding="@dimen/padding_medium"
|
||||||
|
android:focusable="true"
|
||||||
|
android:padding="@dimen/padding_medium"
|
||||||
|
android:text="@string/label_faq"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
||||||
|
app:drawableLeftCompat="@drawable/ic_about"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/about_licenses"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/about_code"
|
||||||
|
tools:layout_editor_absoluteX="0dp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/about_song_count"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:drawablePadding="@dimen/padding_medium"
|
||||||
|
android:padding="@dimen/padding_medium"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
||||||
|
app:drawableLeftCompat="@drawable/ic_song"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/about_author"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/about_licenses"
|
||||||
|
tools:text="Songs Loaded: 1616" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/about_author"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:drawablePadding="@dimen/padding_medium"
|
||||||
|
android:padding="@dimen/padding_medium"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
||||||
|
app:drawableLeftCompat="@drawable/ic_author"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/about_song_count"
|
||||||
|
tools:text="Created by OxygenCobalt" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</androidx.core.widget.NestedScrollView>
|
||||||
<TextView
|
|
||||||
android:id="@+id/about_code"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@drawable/ui_ripple"
|
|
||||||
android:clickable="true"
|
|
||||||
android:drawablePadding="@dimen/padding_medium"
|
|
||||||
android:focusable="true"
|
|
||||||
android:padding="@dimen/padding_medium"
|
|
||||||
android:text="@string/label_code"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
|
||||||
app:drawableLeftCompat="@drawable/ic_code"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/about_faq"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/version_container" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/about_licenses"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@drawable/ui_ripple"
|
|
||||||
android:clickable="true"
|
|
||||||
android:drawablePadding="@dimen/padding_medium"
|
|
||||||
android:focusable="true"
|
|
||||||
android:padding="@dimen/padding_medium"
|
|
||||||
android:text="@string/label_licenses"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
|
||||||
app:drawableLeftCompat="@drawable/ic_license"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/about_song_count"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/about_faq" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/about_faq"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@drawable/ui_ripple"
|
|
||||||
android:clickable="true"
|
|
||||||
android:drawablePadding="@dimen/padding_medium"
|
|
||||||
android:focusable="true"
|
|
||||||
android:padding="@dimen/padding_medium"
|
|
||||||
android:text="@string/label_faq"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
|
||||||
app:drawableLeftCompat="@drawable/ic_about"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/about_licenses"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/about_code"
|
|
||||||
tools:layout_editor_absoluteX="0dp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/about_song_count"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:drawablePadding="@dimen/padding_medium"
|
|
||||||
android:padding="@dimen/padding_medium"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
|
||||||
app:drawableLeftCompat="@drawable/ic_song"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/about_author"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/about_licenses"
|
|
||||||
tools:text="Songs Loaded: 1616" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/about_author"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:drawablePadding="@dimen/padding_medium"
|
|
||||||
android:padding="@dimen/padding_medium"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
|
||||||
app:drawableLeftCompat="@drawable/ic_author"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/about_song_count"
|
|
||||||
tools:text="Created by OxygenCobalt" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
</layout>
|
</layout>
|
|
@ -3,7 +3,7 @@
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_open_about"
|
android:id="@+id/action_open_about"
|
||||||
android:title="@string/label_about"
|
|
||||||
android:icon="@drawable/ic_about"
|
android:icon="@drawable/ic_about"
|
||||||
|
android:title="@string/label_about"
|
||||||
app:showAsAction="always" />
|
app:showAsAction="always" />
|
||||||
</menu>
|
</menu>
|
29
app/src/main/res/values-night-v27/styles.xml
Normal file
29
app/src/main/res/values-night-v27/styles.xml
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<!-- Base theme -->
|
||||||
|
<style name="Theme.Base" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||||
|
<item name="android:windowBackground">@color/background</item>
|
||||||
|
<item name="android:fontFamily">@font/inter</item>
|
||||||
|
<item name="android:textCursorDrawable">@drawable/ui_cursor</item>
|
||||||
|
<item name="android:scrollbars">none</item>
|
||||||
|
<item name="android:windowIsFloating">false</item>
|
||||||
|
|
||||||
|
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||||
|
<item name="android:navigationBarColor">@color/nav_color</item>
|
||||||
|
<item name="android:windowLightStatusBar">false</item>
|
||||||
|
<item name="android:windowLightNavigationBar">false</item>
|
||||||
|
|
||||||
|
<item name="popupMenuStyle">@style/Widget.CustomPopup</item>
|
||||||
|
<item name="colorControlNormal">@color/control_color</item>
|
||||||
|
<item name="alertDialogTheme">@style/Theme.CustomDialog</item>
|
||||||
|
<item name="indicatorFastScrollerStyle">@style/FastScrollTheme</item>
|
||||||
|
<item name="colorControlHighlight">@color/selection_color</item>
|
||||||
|
<item name="colorControlActivated">?attr/colorPrimary</item>
|
||||||
|
<item name="cornerRadius">0dp</item>
|
||||||
|
|
||||||
|
<item name="md_background_color">@color/background</item>
|
||||||
|
<item name="md_corner_radius">0dp</item>
|
||||||
|
<item name="md_color_button_text">@color/control_color</item>
|
||||||
|
<item name="md_font_title">@font/inter_black</item>
|
||||||
|
</style>
|
||||||
|
</resources>
|
29
app/src/main/res/values-v27/styles.xml
Normal file
29
app/src/main/res/values-v27/styles.xml
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<!-- Base theme -->
|
||||||
|
<style name="Theme.Base" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||||
|
<item name="android:windowBackground">@color/background</item>
|
||||||
|
<item name="android:fontFamily">@font/inter</item>
|
||||||
|
<item name="android:textCursorDrawable">@drawable/ui_cursor</item>
|
||||||
|
<item name="android:scrollbars">none</item>
|
||||||
|
<item name="android:windowIsFloating">false</item>
|
||||||
|
|
||||||
|
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||||
|
<item name="android:navigationBarColor">@color/nav_color</item>
|
||||||
|
<item name="android:windowLightStatusBar">true</item>
|
||||||
|
<item name="android:windowLightNavigationBar">true</item>
|
||||||
|
|
||||||
|
<item name="popupMenuStyle">@style/Widget.CustomPopup</item>
|
||||||
|
<item name="colorControlNormal">@color/control_color</item>
|
||||||
|
<item name="alertDialogTheme">@style/Theme.CustomDialog</item>
|
||||||
|
<item name="indicatorFastScrollerStyle">@style/FastScrollTheme</item>
|
||||||
|
<item name="colorControlHighlight">@color/selection_color</item>
|
||||||
|
<item name="colorControlActivated">?attr/colorPrimary</item>
|
||||||
|
<item name="cornerRadius">0dp</item>
|
||||||
|
|
||||||
|
<item name="md_background_color">@color/background</item>
|
||||||
|
<item name="md_corner_radius">0dp</item>
|
||||||
|
<item name="md_color_button_text">@color/control_color</item>
|
||||||
|
<item name="md_font_title">@font/inter_black</item>
|
||||||
|
</style>
|
||||||
|
</resources>
|
|
@ -172,5 +172,10 @@
|
||||||
<style name="Theme.BottomSheetFix" parent="@style/Theme.Design.BottomSheetDialog">
|
<style name="Theme.BottomSheetFix" parent="@style/Theme.Design.BottomSheetDialog">
|
||||||
<item name="android:windowIsFloating">false</item>
|
<item name="android:windowIsFloating">false</item>
|
||||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||||
|
<item name="bottomSheetStyle">@style/bottomSheetStyleWrapper</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="bottomSheetStyleWrapper" parent="Widget.Design.BottomSheet.Modal">
|
||||||
|
<item name="behavior_peekHeight">500dp</item>
|
||||||
</style>
|
</style>
|
||||||
</resources>
|
</resources>
|
|
@ -1,145 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
|
||||||
<PreferenceCategory
|
|
||||||
android:layout="@layout/item_header"
|
|
||||||
android:title="@string/setting_ui">
|
|
||||||
<ListPreference
|
|
||||||
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
|
|
||||||
android:icon="@drawable/ic_accent"
|
|
||||||
android:title="@string/setting_accent"
|
|
||||||
app:key="KEY_ACCENT"
|
|
||||||
app:summary="@string/setting_accent_unknown" />
|
|
||||||
|
|
||||||
<SwitchPreferenceCompat
|
|
||||||
android:title="@string/setting_edge"
|
|
||||||
app:allowDividerBelow="false"
|
|
||||||
app:defaultValue="false"
|
|
||||||
app:iconSpaceReserved="false"
|
|
||||||
app:key="KEY_EDGE"
|
|
||||||
app:summary="@string/setting_edge_desc" />
|
|
||||||
</PreferenceCategory>
|
|
||||||
|
|
||||||
<PreferenceCategory
|
|
||||||
android:layout="@layout/item_header"
|
|
||||||
android:title="@string/setting_display">
|
|
||||||
|
|
||||||
<ListPreference
|
|
||||||
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:key="KEY_LIBRARY_DISPLAY_MODE"
|
|
||||||
app:useSimpleSummaryProvider="true" />
|
|
||||||
|
|
||||||
<SwitchPreferenceCompat
|
|
||||||
android:title="@string/setting_color_notif"
|
|
||||||
app:defaultValue="true"
|
|
||||||
app:iconSpaceReserved="false"
|
|
||||||
app:key="KEY_COLOR_NOTIF"
|
|
||||||
app:summary="@string/setting_color_desc" />
|
|
||||||
|
|
||||||
<SwitchPreferenceCompat
|
|
||||||
android:title="@string/setting_use_alt_action"
|
|
||||||
app:allowDividerBelow="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:layout="@layout/item_header"
|
|
||||||
android:title="@string/setting_playback">
|
|
||||||
|
|
||||||
<SwitchPreferenceCompat
|
|
||||||
android:title="@string/setting_playback_audio_focus"
|
|
||||||
app:defaultValue="true"
|
|
||||||
app:iconSpaceReserved="false"
|
|
||||||
app:key="KEY_AUDIO_FOCUS"
|
|
||||||
app:summary="@string/setting_playback_focus_desc" />
|
|
||||||
|
|
||||||
<SwitchPreferenceCompat
|
|
||||||
android:title="@string/setting_playback_plug_mgt"
|
|
||||||
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:layout="@layout/item_header"
|
|
||||||
android:title="@string/setting_behavior">
|
|
||||||
|
|
||||||
<ListPreference
|
|
||||||
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
|
|
||||||
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
|
|
||||||
android:title="@string/setting_behavior_keep_shuffle"
|
|
||||||
app:defaultValue="false"
|
|
||||||
app:iconSpaceReserved="false"
|
|
||||||
app:key="KEY_KEEP_SHUFFLE"
|
|
||||||
app:summary="@string/setting_behavior_keep_shuffle_desc" />
|
|
||||||
|
|
||||||
<SwitchPreference
|
|
||||||
android:title="@string/setting_behavior_rewind_prev"
|
|
||||||
app:defaultValue="true"
|
|
||||||
app:iconSpaceReserved="false"
|
|
||||||
app:key="KEY_PREV_REWIND"
|
|
||||||
app:summary="@string/setting_behavior_rewind_prev_desc" />
|
|
||||||
|
|
||||||
<SeekBarPreference
|
|
||||||
android:defaultValue="@integer/rewind_threshold_default"
|
|
||||||
android:max="@integer/rewind_threshold_max"
|
|
||||||
android:title="@string/setting_behavior_rewind_threshold"
|
|
||||||
app:allowDividerBelow="false"
|
|
||||||
app:dependency="KEY_PREV_REWIND"
|
|
||||||
app:iconSpaceReserved="false"
|
|
||||||
app:key="KEY_REWIND_THRESHOLD"
|
|
||||||
app:min="@integer/rewind_threshold_min"
|
|
||||||
app:showSeekBarValue="true"
|
|
||||||
app:summary="@string/setting_behavior_rewind_threshold_desc" />
|
|
||||||
|
|
||||||
</PreferenceCategory>
|
|
||||||
|
|
||||||
<PreferenceCategory
|
|
||||||
android:title="@string/debug_title"
|
|
||||||
app:isPreferenceVisible="false"
|
|
||||||
app:layout="@layout/item_header">
|
|
||||||
|
|
||||||
<Preference
|
|
||||||
android:title="@string/debug_state_save"
|
|
||||||
app:iconSpaceReserved="false"
|
|
||||||
app:key="KEY_SAVE_STATE"
|
|
||||||
app:summary="@string/debug_state_save_desc" />
|
|
||||||
|
|
||||||
</PreferenceCategory>
|
|
||||||
</PreferenceScreen>
|
|
|
@ -16,9 +16,9 @@
|
||||||
<Preference
|
<Preference
|
||||||
android:icon="@drawable/ic_accent"
|
android:icon="@drawable/ic_accent"
|
||||||
android:title="@string/setting_accent"
|
android:title="@string/setting_accent"
|
||||||
|
app:allowDividerBelow="false"
|
||||||
app:key="KEY_ACCENT"
|
app:key="KEY_ACCENT"
|
||||||
app:summary="@string/setting_accent_unknown" />
|
app:summary="@string/setting_accent_unknown" />
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
|
@ -113,6 +113,7 @@
|
||||||
android:defaultValue="@integer/rewind_threshold_default"
|
android:defaultValue="@integer/rewind_threshold_default"
|
||||||
android:max="@integer/rewind_threshold_max"
|
android:max="@integer/rewind_threshold_max"
|
||||||
android:title="@string/setting_behavior_rewind_threshold"
|
android:title="@string/setting_behavior_rewind_threshold"
|
||||||
|
app:allowDividerBelow="false"
|
||||||
app:dependency="KEY_PREV_REWIND"
|
app:dependency="KEY_PREV_REWIND"
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false"
|
||||||
app:key="KEY_REWIND_THRESHOLD"
|
app:key="KEY_REWIND_THRESHOLD"
|
||||||
|
|
Loading…
Reference in a new issue