Added Saikou theme (#40)

* Update colors.xml

* Update themes.xml

* Update themes.xml

* Update ThemeManager.kt

* Update ThemeManager.kt

* Update ThemeManager.kt

* Update ThemeManager.kt

* Update DevelopersDialogFragment.kt

* Update activity_main.xml

* Update item_anime_page.xml

* Update item_manga_page.xml

* Update fragment_login.xml

* Update activity_media.xml

* Update activity_media.xml

* Update item_anime_page.xml

* Update item_manga_page.xml

* Update themes.xml

* Update themes.xml

* Update exo_player_control_view.xml

* Update activity_author.xml

* Update activity_studio.xml

* Update activity_manga_reader.xml

* Update activity_novel_reader.xml

* Update activity_media.xml

Fix

* Update tab_layout_icon.xml

* Update activity_media.xml

* Update activity_media.xml

* Update tab_layout_icon.xml

Changed selected layout icon from primary to secondary

* Update activity_list.xml

* Update ListActivity.kt

Unbound listTabLayout, listAppBar and listTitle because it stopped color reallocation

* Update CalendarActivity.kt

Unbound listTabLayout, listAppBar and listTitle because it stopped color reallocation

* Update button_switch_track.xml

* Update CalendarActivity.kt

Undo

* Update ListActivity.kt

Undo

* Update CalendarActivity.kt

* Update ListActivity.kt

* Update ListActivity.kt

* Update CalendarActivity.kt (Saikou theme complete!)

I'll just need to check for bugs and request to merge

* Update ThemeManager.kt

Took Sakiou theme out of beta

* Update tab_layout_icon.xml

Changes to media tabs (less accurate to Saikou but selected menu is more vibrant and supports other themes better)

* Update activity_media.xml

Changes to media tabs (less accurate to Saikou but selected menu is more vibrant and supports other themes better)

* Update activity_media.xml

Changes to media tabs (less accurate to Saikou but selected menu is more vibrant and supports other themes better)

* Update control_background_40dp.xml

* Update build.gradle

Changed version number
This commit is contained in:
Wai What 2023-11-12 10:55:16 -08:00 committed by GitHub
parent a58e9a523a
commit eee1242964
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 201 additions and 67 deletions

View file

@ -38,21 +38,24 @@ class CalendarActivity : AppCompatActivity() {
val typedValue = TypedValue()
theme.resolveAttribute(com.google.android.material.R.attr.colorOnPrimary, typedValue, true)
theme.resolveAttribute(com.google.android.material.R.attr.colorSurface, typedValue, true)
val primaryColor = typedValue.data
val typedValue2 = TypedValue()
theme.resolveAttribute(com.google.android.material.R.attr.colorPrimary, typedValue2, true)
val primaryTextColor = typedValue2.data
theme.resolveAttribute(com.google.android.material.R.attr.colorOnBackground, typedValue2, true)
val titleTextColor = typedValue2.data
val typedValue3 = TypedValue()
theme.resolveAttribute(com.google.android.material.R.attr.colorSecondary, typedValue3, true)
val secondaryColor = typedValue3.data
theme.resolveAttribute(com.google.android.material.R.attr.colorPrimary, typedValue3, true)
val primaryTextColor = typedValue3.data
val typedValue4 = TypedValue()
theme.resolveAttribute(com.google.android.material.R.attr.colorOutline, typedValue4, true)
val secondaryTextColor = typedValue4.data
window.statusBarColor = primaryColor
window.navigationBarColor = primaryColor
binding.listTabLayout.setBackgroundColor(primaryColor)
binding.listAppBar.setBackgroundColor(primaryColor)
binding.listTitle.setTextColor(primaryTextColor)
binding.listTabLayout.setTabTextColors(primaryTextColor, primaryTextColor)
binding.listTitle.setTextColor(titleTextColor)
binding.listTabLayout.setTabTextColors(secondaryTextColor, primaryTextColor)
binding.listTabLayout.setSelectedTabIndicatorColor(primaryTextColor)
val uiSettings = loadData<UserInterfaceSettings>("ui_settings") ?: UserInterfaceSettings()
if (!uiSettings.immersiveMode) {
@ -103,4 +106,4 @@ class CalendarActivity : AppCompatActivity() {
}
}
}
}

View file

@ -36,21 +36,24 @@ class ListActivity : AppCompatActivity() {
binding = ActivityListBinding.inflate(layoutInflater)
val typedValue = TypedValue()
theme.resolveAttribute(com.google.android.material.R.attr.colorOnPrimary, typedValue, true)
theme.resolveAttribute(com.google.android.material.R.attr.colorSurface, typedValue, true)
val primaryColor = typedValue.data
val typedValue2 = TypedValue()
theme.resolveAttribute(com.google.android.material.R.attr.colorPrimary, typedValue2, true)
val primaryTextColor = typedValue2.data
theme.resolveAttribute(com.google.android.material.R.attr.colorOnBackground, typedValue2, true)
val titleTextColor = typedValue2.data
val typedValue3 = TypedValue()
theme.resolveAttribute(com.google.android.material.R.attr.colorSecondary, typedValue3, true)
val secondaryColor = typedValue3.data
theme.resolveAttribute(com.google.android.material.R.attr.colorPrimary, typedValue3, true)
val primaryTextColor = typedValue3.data
val typedValue4 = TypedValue()
theme.resolveAttribute(com.google.android.material.R.attr.colorOutline, typedValue4, true)
val secondaryTextColor = typedValue4.data
window.statusBarColor = primaryColor
window.navigationBarColor = primaryColor
binding.listTabLayout.setBackgroundColor(primaryColor)
binding.listAppBar.setBackgroundColor(primaryColor)
binding.listTitle.setTextColor(primaryTextColor)
binding.listTabLayout.setTabTextColors(primaryTextColor, primaryTextColor)
binding.listTitle.setTextColor(titleTextColor)
binding.listTabLayout.setTabTextColors(secondaryTextColor, primaryTextColor)
binding.listTabLayout.setSelectedTabIndicatorColor(primaryTextColor)
val uiSettings = loadData<UserInterfaceSettings>("ui_settings") ?: UserInterfaceSettings()
if (!uiSettings.immersiveMode) {
@ -126,4 +129,4 @@ class ListActivity : AppCompatActivity() {
popup.show()
}
}
}
}

View file

@ -14,7 +14,7 @@ class DevelopersDialogFragment : BottomSheetDialogFragment() {
private val developers = arrayOf(
Developer("rebelonion","https://avatars.githubusercontent.com/u/87634197?v=4","Owner and Maintainer","https://github.com/rebelonion"),
Developer("Wai What", "https://cdn.discordapp.com/avatars/928202695611908126/aeac4c867acbb8c3783356497055a426.webp?size=80", "Icon Designer", ""),
Developer("Wai What", "https://avatars.githubusercontent.com/u/149729762?v=4", "Icon Designer", "https://github.com/WaiWhat"),
)
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {

View file

@ -20,6 +20,7 @@ class ThemeManager(private val context: Context) {
"RED" -> if (useOLED) R.style.Theme_Dantotsu_RedOLED else R.style.Theme_Dantotsu_Red
"LAVENDER" -> if (useOLED) R.style.Theme_Dantotsu_LavenderOLED else R.style.Theme_Dantotsu_Lavender
"MONOCHROME (BETA)" -> if (useOLED) R.style.Theme_Dantotsu_MonochromeOLED else R.style.Theme_Dantotsu_Monochrome
"SAIKOU" -> if (useOLED) R.style.Theme_Dantotsu_SaikouOLED else R.style.Theme_Dantotsu_Saikou
else -> if (useOLED) R.style.Theme_Dantotsu_PurpleOLED else R.style.Theme_Dantotsu_Purple
}
@ -44,7 +45,8 @@ class ThemeManager(private val context: Context) {
PINK("PINK"),
RED("RED"),
LAVENDER("LAVENDER"),
MONOCHROME("MONOCHROME (BETA)");
MONOCHROME("MONOCHROME (BETA)"),
SAIKOU("SAIKOU");
companion object {
fun fromString(value: String): Theme {
@ -53,4 +55,4 @@ class ThemeManager(private val context: Context) {
}
}
}
}
}