From 2912ee5f73c094cb0348846752de96a059fdb310 Mon Sep 17 00:00:00 2001
From: rebelonion <87634197+rebelonion@users.noreply.github.com>
Date: Tue, 6 Feb 2024 21:55:14 -0600
Subject: [PATCH] fix: popups backgrounds to black when in OLED mode
---
app/src/main/java/ani/dantotsu/Functions.kt | 2 +-
app/src/main/res/drawable/bottom_sheet_background.xml | 9 +++++++++
app/src/main/res/layout/bottom_sheet_book.xml | 1 +
.../bottom_sheet_current_novel_reader_settings.xml | 1 +
.../res/layout/bottom_sheet_current_reader_settings.xml | 1 +
app/src/main/res/layout/bottom_sheet_custom.xml | 1 +
app/src/main/res/layout/bottom_sheet_developers.xml | 1 +
app/src/main/res/layout/bottom_sheet_image.xml | 1 +
app/src/main/res/layout/bottom_sheet_media_list.xml | 1 +
.../main/res/layout/bottom_sheet_media_list_small.xml | 1 +
app/src/main/res/layout/bottom_sheet_search_filter.xml | 1 +
app/src/main/res/layout/bottom_sheet_selector.xml | 1 +
app/src/main/res/layout/bottom_sheet_settings.xml | 1 +
app/src/main/res/layout/bottom_sheet_source_search.xml | 1 +
app/src/main/res/layout/bottom_sheet_subtitles.xml | 1 +
app/src/main/res/layout/bottom_sheet_webview.xml | 1 +
16 files changed, 24 insertions(+), 1 deletion(-)
create mode 100644 app/src/main/res/drawable/bottom_sheet_background.xml
diff --git a/app/src/main/java/ani/dantotsu/Functions.kt b/app/src/main/java/ani/dantotsu/Functions.kt
index 29d683f1..623b8aa7 100644
--- a/app/src/main/java/ani/dantotsu/Functions.kt
+++ b/app/src/main/java/ani/dantotsu/Functions.kt
@@ -184,7 +184,7 @@ open class BottomSheetDialogFragment : BottomSheetDialogFragment() {
val typedValue = TypedValue()
val theme = requireContext().theme
theme.resolveAttribute(
- com.google.android.material.R.attr.colorOnSurfaceInverse,
+ com.google.android.material.R.attr.colorSurface,
typedValue,
true
)
diff --git a/app/src/main/res/drawable/bottom_sheet_background.xml b/app/src/main/res/drawable/bottom_sheet_background.xml
new file mode 100644
index 00000000..77a184e8
--- /dev/null
+++ b/app/src/main/res/drawable/bottom_sheet_background.xml
@@ -0,0 +1,9 @@
+
+
+
+
diff --git a/app/src/main/res/layout/bottom_sheet_book.xml b/app/src/main/res/layout/bottom_sheet_book.xml
index 389d14a4..a1030975 100644
--- a/app/src/main/res/layout/bottom_sheet_book.xml
+++ b/app/src/main/res/layout/bottom_sheet_book.xml
@@ -2,6 +2,7 @@
diff --git a/app/src/main/res/layout/bottom_sheet_current_novel_reader_settings.xml b/app/src/main/res/layout/bottom_sheet_current_novel_reader_settings.xml
index 993a70e1..55afb077 100644
--- a/app/src/main/res/layout/bottom_sheet_current_novel_reader_settings.xml
+++ b/app/src/main/res/layout/bottom_sheet_current_novel_reader_settings.xml
@@ -2,6 +2,7 @@
diff --git a/app/src/main/res/layout/bottom_sheet_current_reader_settings.xml b/app/src/main/res/layout/bottom_sheet_current_reader_settings.xml
index 236c195e..9fee4f93 100644
--- a/app/src/main/res/layout/bottom_sheet_current_reader_settings.xml
+++ b/app/src/main/res/layout/bottom_sheet_current_reader_settings.xml
@@ -2,6 +2,7 @@
diff --git a/app/src/main/res/layout/bottom_sheet_custom.xml b/app/src/main/res/layout/bottom_sheet_custom.xml
index 208a2f5d..3f0e7f8c 100644
--- a/app/src/main/res/layout/bottom_sheet_custom.xml
+++ b/app/src/main/res/layout/bottom_sheet_custom.xml
@@ -2,6 +2,7 @@
diff --git a/app/src/main/res/layout/bottom_sheet_developers.xml b/app/src/main/res/layout/bottom_sheet_developers.xml
index c4c3fd5e..d74421b6 100644
--- a/app/src/main/res/layout/bottom_sheet_developers.xml
+++ b/app/src/main/res/layout/bottom_sheet_developers.xml
@@ -2,6 +2,7 @@
diff --git a/app/src/main/res/layout/bottom_sheet_image.xml b/app/src/main/res/layout/bottom_sheet_image.xml
index 85f43f88..656b3592 100644
--- a/app/src/main/res/layout/bottom_sheet_image.xml
+++ b/app/src/main/res/layout/bottom_sheet_image.xml
@@ -2,6 +2,7 @@
diff --git a/app/src/main/res/layout/bottom_sheet_media_list.xml b/app/src/main/res/layout/bottom_sheet_media_list.xml
index 2b71c0ab..603335c9 100644
--- a/app/src/main/res/layout/bottom_sheet_media_list.xml
+++ b/app/src/main/res/layout/bottom_sheet_media_list.xml
@@ -2,6 +2,7 @@
diff --git a/app/src/main/res/layout/bottom_sheet_media_list_small.xml b/app/src/main/res/layout/bottom_sheet_media_list_small.xml
index 2c1210c3..ecab76ba 100644
--- a/app/src/main/res/layout/bottom_sheet_media_list_small.xml
+++ b/app/src/main/res/layout/bottom_sheet_media_list_small.xml
@@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/mediaListContainer"
+ android:background="@drawable/bottom_sheet_background"
android:layout_width="match_parent"
android:layout_height="wrap_content">
diff --git a/app/src/main/res/layout/bottom_sheet_search_filter.xml b/app/src/main/res/layout/bottom_sheet_search_filter.xml
index d2f32336..8ca02366 100644
--- a/app/src/main/res/layout/bottom_sheet_search_filter.xml
+++ b/app/src/main/res/layout/bottom_sheet_search_filter.xml
@@ -2,6 +2,7 @@
diff --git a/app/src/main/res/layout/bottom_sheet_selector.xml b/app/src/main/res/layout/bottom_sheet_selector.xml
index 638c9f34..203d10b8 100644
--- a/app/src/main/res/layout/bottom_sheet_selector.xml
+++ b/app/src/main/res/layout/bottom_sheet_selector.xml
@@ -5,6 +5,7 @@
android:id="@+id/selectorContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:background="@drawable/bottom_sheet_background"
android:backgroundTintMode="src_atop"
android:orientation="vertical">
diff --git a/app/src/main/res/layout/bottom_sheet_settings.xml b/app/src/main/res/layout/bottom_sheet_settings.xml
index c029ee09..00e5b35f 100644
--- a/app/src/main/res/layout/bottom_sheet_settings.xml
+++ b/app/src/main/res/layout/bottom_sheet_settings.xml
@@ -2,6 +2,7 @@
diff --git a/app/src/main/res/layout/bottom_sheet_subtitles.xml b/app/src/main/res/layout/bottom_sheet_subtitles.xml
index 6f39b9ab..a6bc6105 100644
--- a/app/src/main/res/layout/bottom_sheet_subtitles.xml
+++ b/app/src/main/res/layout/bottom_sheet_subtitles.xml
@@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ android:background="@drawable/bottom_sheet_background"
android:fillViewport="true">