some customizations (#59)
* quickfix * android locale tuning * toggle option to setting * some customizations --------- Co-authored-by: rebelonion <87634197+rebelonion@users.noreply.github.com>
This commit is contained in:
parent
ba351df331
commit
af326c8258
13 changed files with 40 additions and 33 deletions
|
@ -56,7 +56,7 @@ ThemeManager(this).applyTheme()
|
||||||
window.navigationBarColor = primaryColor
|
window.navigationBarColor = primaryColor
|
||||||
binding.listTabLayout.setBackgroundColor(primaryColor)
|
binding.listTabLayout.setBackgroundColor(primaryColor)
|
||||||
binding.listAppBar.setBackgroundColor(primaryColor)
|
binding.listAppBar.setBackgroundColor(primaryColor)
|
||||||
binding.listTitle.setTextColor(titleTextColor)
|
binding.listTitle.setTextColor(primaryTextColor)
|
||||||
binding.listTabLayout.setTabTextColors(secondaryTextColor, primaryTextColor)
|
binding.listTabLayout.setTabTextColors(secondaryTextColor, primaryTextColor)
|
||||||
binding.listTabLayout.setSelectedTabIndicatorColor(primaryTextColor)
|
binding.listTabLayout.setSelectedTabIndicatorColor(primaryTextColor)
|
||||||
val uiSettings = loadData<UserInterfaceSettings>("ui_settings") ?: UserInterfaceSettings()
|
val uiSettings = loadData<UserInterfaceSettings>("ui_settings") ?: UserInterfaceSettings()
|
||||||
|
|
|
@ -54,7 +54,7 @@ ThemeManager(this).applyTheme()
|
||||||
window.navigationBarColor = primaryColor
|
window.navigationBarColor = primaryColor
|
||||||
binding.listTabLayout.setBackgroundColor(primaryColor)
|
binding.listTabLayout.setBackgroundColor(primaryColor)
|
||||||
binding.listAppBar.setBackgroundColor(primaryColor)
|
binding.listAppBar.setBackgroundColor(primaryColor)
|
||||||
binding.listTitle.setTextColor(titleTextColor)
|
binding.listTitle.setTextColor(primaryTextColor)
|
||||||
binding.listTabLayout.setTabTextColors(secondaryTextColor, primaryTextColor)
|
binding.listTabLayout.setTabTextColors(secondaryTextColor, primaryTextColor)
|
||||||
binding.listTabLayout.setSelectedTabIndicatorColor(primaryTextColor)
|
binding.listTabLayout.setSelectedTabIndicatorColor(primaryTextColor)
|
||||||
val uiSettings = loadData<UserInterfaceSettings>("ui_settings") ?: UserInterfaceSettings()
|
val uiSettings = loadData<UserInterfaceSettings>("ui_settings") ?: UserInterfaceSettings()
|
||||||
|
|
|
@ -53,7 +53,7 @@ class InstalledAnimeExtensionsFragment : Fragment() {
|
||||||
if (allSettings.size > 1) {
|
if (allSettings.size > 1) {
|
||||||
val names = allSettings.map { it.lang }.toTypedArray()
|
val names = allSettings.map { it.lang }.toTypedArray()
|
||||||
var selectedIndex = 0
|
var selectedIndex = 0
|
||||||
AlertDialog.Builder(requireContext())
|
AlertDialog.Builder(requireContext(), R.style.MyPopup)
|
||||||
.setTitle("Select a Source")
|
.setTitle("Select a Source")
|
||||||
.setSingleChoiceItems(names, selectedIndex) { _, which ->
|
.setSingleChoiceItems(names, selectedIndex) { _, which ->
|
||||||
selectedIndex = which
|
selectedIndex = which
|
||||||
|
|
|
@ -60,7 +60,7 @@ class InstalledMangaExtensionsFragment : Fragment() {
|
||||||
if (allSettings.size > 1) {
|
if (allSettings.size > 1) {
|
||||||
val names = allSettings.map { it.lang }.toTypedArray()
|
val names = allSettings.map { it.lang }.toTypedArray()
|
||||||
var selectedIndex = 0
|
var selectedIndex = 0
|
||||||
AlertDialog.Builder(requireContext())
|
AlertDialog.Builder(requireContext(), R.style.MyPopup)
|
||||||
.setTitle("Select a Source")
|
.setTitle("Select a Source")
|
||||||
.setSingleChoiceItems(names, selectedIndex) { _, which ->
|
.setSingleChoiceItems(names, selectedIndex) { _, which ->
|
||||||
selectedIndex = which
|
selectedIndex = which
|
||||||
|
|
|
@ -182,17 +182,21 @@ OS Version: $CODENAME $RELEASE ($SDK_INT)
|
||||||
val dialogView = layoutInflater.inflate(R.layout.dialog_user_agent, null)
|
val dialogView = layoutInflater.inflate(R.layout.dialog_user_agent, null)
|
||||||
val editText = dialogView.findViewById<TextInputEditText>(R.id.userAgentTextBox)
|
val editText = dialogView.findViewById<TextInputEditText>(R.id.userAgentTextBox)
|
||||||
editText.setText(networkPreferences.defaultUserAgent().get())
|
editText.setText(networkPreferences.defaultUserAgent().get())
|
||||||
val alertDialog = AlertDialog.Builder(this)
|
val alertDialog = AlertDialog.Builder(this ,R.style.MyPopup)
|
||||||
|
.setTitle("User Agent")
|
||||||
.setView(dialogView)
|
.setView(dialogView)
|
||||||
.setPositiveButton("OK") { dialog, _ ->
|
.setPositiveButton("OK") { dialog, _ ->
|
||||||
networkPreferences.defaultUserAgent().set(editText.text.toString())
|
networkPreferences.defaultUserAgent().set(editText.text.toString())
|
||||||
dialog.dismiss()
|
dialog.dismiss()
|
||||||
}
|
}
|
||||||
.setNegativeButton("Reset") { dialog, _ ->
|
.setNeutralButton("Reset") { dialog, _ ->
|
||||||
networkPreferences.defaultUserAgent().set("Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:110.0) Gecko/20100101 Firefox/110.0") // Reset to default or empty
|
networkPreferences.defaultUserAgent().set("Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:110.0) Gecko/20100101 Firefox/110.0") // Reset to default or empty
|
||||||
editText.setText("")
|
editText.setText("")
|
||||||
dialog.dismiss()
|
dialog.dismiss()
|
||||||
}
|
}
|
||||||
|
.setNegativeButton("Cancel") { dialog, _ ->
|
||||||
|
dialog.dismiss()
|
||||||
|
}
|
||||||
.create()
|
.create()
|
||||||
|
|
||||||
alertDialog.show()
|
alertDialog.show()
|
||||||
|
|
|
@ -79,7 +79,7 @@ class AnimeExtensionPagingSource(
|
||||||
val installedExtensions = installedExtensionsFlow.first().map { it.pkgName }.toSet()
|
val installedExtensions = installedExtensionsFlow.first().map { it.pkgName }.toSet()
|
||||||
val availableExtensions = availableExtensionsFlow.first().filterNot { it.pkgName in installedExtensions }
|
val availableExtensions = availableExtensionsFlow.first().filterNot { it.pkgName in installedExtensions }
|
||||||
val query = searchQuery.first()
|
val query = searchQuery.first()
|
||||||
val isNsfwEnabled: Boolean = loadData("NFSWExtension") ?: false
|
val isNsfwEnabled: Boolean = loadData("NFSWExtension") ?: true
|
||||||
|
|
||||||
val filteredExtensions = if (query.isEmpty()) {
|
val filteredExtensions = if (query.isEmpty()) {
|
||||||
availableExtensions
|
availableExtensions
|
||||||
|
|
|
@ -81,7 +81,7 @@ class MangaExtensionPagingSource(
|
||||||
val installedExtensions = installedExtensionsFlow.first().map { it.pkgName }.toSet()
|
val installedExtensions = installedExtensionsFlow.first().map { it.pkgName }.toSet()
|
||||||
val availableExtensions = availableExtensionsFlow.first().filterNot { it.pkgName in installedExtensions }
|
val availableExtensions = availableExtensionsFlow.first().filterNot { it.pkgName in installedExtensions }
|
||||||
val query = searchQuery.first()
|
val query = searchQuery.first()
|
||||||
val isNsfwEnabled: Boolean = loadData("NFSWExtension") ?: false
|
val isNsfwEnabled: Boolean = loadData("NFSWExtension") ?: true
|
||||||
val filteredExtensions = if (query.isEmpty()) {
|
val filteredExtensions = if (query.isEmpty()) {
|
||||||
availableExtensions
|
availableExtensions
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/extensions"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
android:layout_marginStart="32dp"
|
android:layout_marginStart="32dp"
|
||||||
|
|
|
@ -6,22 +6,16 @@
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="16dp">
|
android:padding="16dp">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/userAgentTextBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp">
|
android:layout_marginTop="8dp"
|
||||||
|
android:hint="@string/user_agent"
|
||||||
|
app:boxCornerRadiusBottomEnd="8dp"
|
||||||
|
app:boxCornerRadiusBottomStart="8dp"
|
||||||
|
app:boxCornerRadiusTopEnd="8dp"
|
||||||
|
app:boxCornerRadiusTopStart="8dp"
|
||||||
|
app:hintAnimationEnabled="true" />
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/userAgentTextBox"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:hint="@string/user_agent"
|
|
||||||
app:boxCornerRadiusBottomEnd="8dp"
|
|
||||||
app:boxCornerRadiusBottomStart="8dp"
|
|
||||||
app:boxCornerRadiusTopEnd="8dp"
|
|
||||||
app:boxCornerRadiusTopStart="8dp"
|
|
||||||
app:hintAnimationEnabled="true" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -248,8 +248,8 @@
|
||||||
android:valueTo="10"
|
android:valueTo="10"
|
||||||
app:labelBehavior="gone"
|
app:labelBehavior="gone"
|
||||||
app:thumbElevation="0dp"
|
app:thumbElevation="0dp"
|
||||||
app:trackColorInactive="?attr/colorOnSecondary"
|
app:trackColorInactive="?attr/colorOnPrimary"
|
||||||
app:trackColorActive="?attr/colorSecondary"
|
app:trackColorActive="?attr/colorPrimary"
|
||||||
app:trackHeight="24dp" />
|
app:trackHeight="24dp" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
@ -291,8 +291,8 @@
|
||||||
android:valueTo="10"
|
android:valueTo="10"
|
||||||
app:labelBehavior="gone"
|
app:labelBehavior="gone"
|
||||||
app:thumbElevation="0dp"
|
app:thumbElevation="0dp"
|
||||||
app:trackColorInactive="?attr/colorOnSecondary"
|
app:trackColorInactive="?attr/colorOnPrimary"
|
||||||
app:trackColorActive="?attr/colorSecondary"
|
app:trackColorActive="?attr/colorPrimary"
|
||||||
app:trackHeight="24dp" />
|
app:trackHeight="24dp" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
android:fontFamily="@font/poppins_bold"
|
android:fontFamily="@font/poppins_bold"
|
||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:textAllCaps="true"
|
android:textAllCaps="true"
|
||||||
android:textColor="?attr/colorPrimary"
|
android:textColor="@color/fg"
|
||||||
tools:text="Episode 2 will be released in" />
|
tools:text="Episode 2 will be released in" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|
|
@ -305,7 +305,7 @@
|
||||||
<color name="md_theme_light_5_outlineVariant">#00FF00</color>
|
<color name="md_theme_light_5_outlineVariant">#00FF00</color>
|
||||||
<color name="md_theme_light_5_scrim">#00FF00</color>
|
<color name="md_theme_light_5_scrim">#00FF00</color>
|
||||||
<color name="md_theme_dark_5_primary">#FF5DAE</color> <!-- good -->
|
<color name="md_theme_dark_5_primary">#FF5DAE</color> <!-- good -->
|
||||||
<color name="md_theme_dark_5_onPrimary">#EEEEEE</color> <!-- good but shared with anime and manga list headers -->
|
<color name="md_theme_dark_5_onPrimary">#610046</color> <!-- good but shared with anime and manga list headers -->
|
||||||
<color name="md_theme_dark_5_primaryContainer">#EEEEEE</color> <!-- good-ish, it's shared with slider colors so I've had to set it to "#EEEEEE" instead of "#928F98" -->
|
<color name="md_theme_dark_5_primaryContainer">#EEEEEE</color> <!-- good-ish, it's shared with slider colors so I've had to set it to "#EEEEEE" instead of "#928F98" -->
|
||||||
<color name="md_theme_dark_5_onPrimaryContainer">#FF5DAE</color> <!-- good (login button text, "#000000" also works) -->
|
<color name="md_theme_dark_5_onPrimaryContainer">#FF5DAE</color> <!-- good (login button text, "#000000" also works) -->
|
||||||
<color name="md_theme_dark_5_secondary">#91A6FF</color> <!-- good -->
|
<color name="md_theme_dark_5_secondary">#91A6FF</color> <!-- good -->
|
||||||
|
@ -320,7 +320,7 @@
|
||||||
<color name="md_theme_dark_5_errorContainer">#00FF00</color>
|
<color name="md_theme_dark_5_errorContainer">#00FF00</color>
|
||||||
<color name="md_theme_dark_5_onError">#00FF00</color>
|
<color name="md_theme_dark_5_onError">#00FF00</color>
|
||||||
<color name="md_theme_dark_5_onErrorContainer">#00FF00</color>
|
<color name="md_theme_dark_5_onErrorContainer">#00FF00</color>
|
||||||
<color name="md_theme_dark_5_background">#000000</color> <!-- good -->
|
<color name="md_theme_dark_5_background">#191C1E</color> <!-- good -->
|
||||||
<color name="md_theme_dark_5_onBackground">#EEEEEE</color> <!-- good -->
|
<color name="md_theme_dark_5_onBackground">#EEEEEE</color> <!-- good -->
|
||||||
<color name="md_theme_dark_5_surface">#1C1B20</color> <!-- good -->
|
<color name="md_theme_dark_5_surface">#1C1B20</color> <!-- good -->
|
||||||
<color name="md_theme_dark_5_onSurface">#EEEEEE</color> <!-- good -->
|
<color name="md_theme_dark_5_onSurface">#EEEEEE</color> <!-- good -->
|
||||||
|
|
|
@ -49,9 +49,17 @@
|
||||||
<item name="shapeAppearance">@style/ShapeAppearance.MaterialComponents.Tooltip</item>
|
<item name="shapeAppearance">@style/ShapeAppearance.MaterialComponents.Tooltip</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="MyPopup" parent="@style/Widget.MaterialComponents.PopupMenu">
|
<style name="MyPopup" parent="">
|
||||||
<item name="android:popupBackground">?android:colorBackground</item>
|
<item name="android:fontFamily">@font/poppins</item>
|
||||||
</style>
|
<item name="android:textColor">?attr/colorOnBackground</item>
|
||||||
|
<item name="android:popupBackground">?attr/colorSurface</item>
|
||||||
|
<item name="android:layout_height">wrap_content</item>
|
||||||
|
<item name="android:layout_width">wrap_content</item>
|
||||||
|
<item name="android:windowBackground">@drawable/shape_corner_16dp</item>
|
||||||
|
<item name="android:windowIsFloating">true</item>
|
||||||
|
<item name="android:windowNoTitle">true</item>
|
||||||
|
<item name="windowActionBar">false</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="BottomNavBar" parent="">
|
<style name="BottomNavBar" parent="">
|
||||||
<!-- set background color to transparent -->
|
<!-- set background color to transparent -->
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue