styles: refactor style methodology

Refactor the styling again to make all styles start with the Auxio
prefix. Also try to phase out the usage of layout_width and
layout_height in most places, since those can cause a lot of
frustration if they aren't used in the layout they are expected in.
This commit is contained in:
OxygenCobalt
2021-09-14 20:16:55 -06:00
parent d16c1099bf
commit 443c26fe98
47 changed files with 568 additions and 428 deletions
@@ -33,47 +33,47 @@ import org.oxycblt.auxio.util.resolveStateList
* A list of all possible accents.
*/
val ACCENTS = arrayOf(
Accent(R.color.red, R.style.Theme_Red, R.style.Theme_Red_Black, R.string.clr_red),
Accent(R.color.pink, R.style.Theme_Pink, R.style.Theme_Pink_Black, R.string.clr_pink),
Accent(R.color.purple, R.style.Theme_Purple, R.style.Theme_Purple_Black, R.string.clr_purple),
Accent(R.color.red, R.style.Theme_Auxio_Red, R.style.Theme_Auxio_Black_Red, R.string.clr_red),
Accent(R.color.pink, R.style.Theme_Auxio_Pink, R.style.Theme_Auxio_Black_Pink, R.string.clr_pink),
Accent(R.color.purple, R.style.Theme_Auxio_Purple, R.style.Theme_Auxio_Black_Purple, R.string.clr_purple),
Accent(
R.color.deep_purple,
R.style.Theme_DeepPurple,
R.style.Theme_DeepPurple_Black,
R.style.Theme_Auxio_DeepPurple,
R.style.Theme_Auxio_Black_DeepPurple,
R.string.clr_deep_purple
),
Accent(R.color.indigo, R.style.Theme_Indigo, R.style.Theme_Indigo_Black, R.string.clr_indigo),
Accent(R.color.blue, R.style.Theme_Blue, R.style.Theme_Blue_Black, R.string.clr_blue),
Accent(R.color.indigo, R.style.Theme_Auxio_Indigo, R.style.Theme_Auxio_Black_Indigo, R.string.clr_indigo),
Accent(R.color.blue, R.style.Theme_Auxio_Blue, R.style.Theme_Auxio_Black_Blue, R.string.clr_blue),
Accent(
R.color.light_blue,
R.style.Theme_LightBlue,
R.style.Theme_LightBlue_Black,
R.style.Theme_Auxio_LightBlue,
R.style.Theme_Auxio_Black_LightBlue,
R.string.clr_light_blue
),
Accent(R.color.cyan, R.style.Theme_Cyan, R.style.Theme_Cyan_Black, R.string.clr_cyan),
Accent(R.color.teal, R.style.Theme_Teal, R.style.Theme_Teal_Black, R.string.clr_teal),
Accent(R.color.green, R.style.Theme_Green, R.style.Theme_Green_Black, R.string.clr_green),
Accent(R.color.cyan, R.style.Theme_Auxio_Cyan, R.style.Theme_Auxio_Black_Cyan, R.string.clr_cyan),
Accent(R.color.teal, R.style.Theme_Auxio_Teal, R.style.Theme_Auxio_Black_Teal, R.string.clr_teal),
Accent(R.color.green, R.style.Theme_Auxio_Green, R.style.Theme_Auxio_Black_Green, R.string.clr_green),
Accent(
R.color.light_green,
R.style.Theme_LightGreen,
R.style.Theme_LightGreen_Black,
R.style.Theme_Auxio_LightGreen,
R.style.Theme_Auxio_Black_LightGreen,
R.string.clr_light_green
),
Accent(R.color.lime, R.style.Theme_Lime, R.style.Theme_Lime_Black, R.string.clr_lime),
Accent(R.color.yellow, R.style.Theme_Yellow, R.style.Theme_Yellow_Black, R.string.clr_yellow),
Accent(R.color.orange, R.style.Theme_Orange, R.style.Theme_Orange_Black, R.string.clr_orange),
Accent(R.color.lime, R.style.Theme_Auxio_Lime, R.style.Theme_Auxio_Black_Lime, R.string.clr_lime),
Accent(R.color.yellow, R.style.Theme_Auxio_Yellow, R.style.Theme_Auxio_Black_Yellow, R.string.clr_yellow),
Accent(R.color.orange, R.style.Theme_Auxio_Orange, R.style.Theme_Auxio_Black_Orange, R.string.clr_orange),
Accent(
R.color.deep_orange,
R.style.Theme_DeepOrange,
R.style.Theme_DeepOrange_Black,
R.style.Theme_Auxio_DeepOrange,
R.style.Theme_Auxio_Black_DeepOrange,
R.string.clr_deep_orange
),
Accent(R.color.brown, R.style.Theme_Brown, R.style.Theme_Brown_Black, R.string.clr_label_brown),
Accent(R.color.grey, R.style.Theme_Grey, R.style.Theme_Grey_Black, R.string.clr_label_grey),
Accent(R.color.brown, R.style.Theme_Auxio_Brown, R.style.Theme_Auxio_Brown, R.string.clr_label_brown),
Accent(R.color.grey, R.style.Theme_Auxio_Grey, R.style.Theme_Auxio_Black_Grey, R.string.clr_label_grey),
Accent(
R.color.blue_grey,
R.style.Theme_BlueGrey,
R.style.Theme_BlueGrey_Black,
R.style.Theme_Auxio_BlueGrey,
R.style.Theme_Auxio_Black_BlueGrey,
R.string.clr_blue_grey
),
)
@@ -20,7 +20,6 @@ package org.oxycblt.auxio.playback.system
import android.content.Context
import android.content.Intent
import android.os.Build
import android.os.SystemClock
import android.support.v4.media.MediaMetadataCompat
import android.support.v4.media.session.MediaSessionCompat
@@ -30,8 +29,6 @@ import org.oxycblt.auxio.coil.loadBitmap
import org.oxycblt.auxio.music.Song
import org.oxycblt.auxio.playback.state.LoopMode
import org.oxycblt.auxio.playback.state.PlaybackStateManager
import org.oxycblt.auxio.settings.SettingsManager
import org.oxycblt.auxio.util.logD
/**
* Nightmarish class that coordinates communication between [MediaSessionCompat], [Player],
@@ -42,7 +42,7 @@ class IntListPrefDialog : LifecycleDialog() {
val titleView = AppCompatTextView(
ContextThemeWrapper(
requireContext(),
R.style.Widget_TextView_Dialog_Title
R.style.Widget_Auxio_Dialog_TextView
)
).apply {
text = pref.title
@@ -34,7 +34,7 @@ enum class DisplayMode {
private const val CONST_SHOW_ARTISTS = 0xA109
private const val CONST_SHOW_ALBUMS = 0xA10A
private const val CONST_SHOW_SONGS = 0xA10B
fun toFilterInt(value: DisplayMode?): Int {
return when (value) {
SHOW_SONGS -> CONST_SHOW_SONGS