summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorByteHamster <ByteHamster@users.noreply.github.com>2023-10-01 18:07:47 +0200
committerGitHub <noreply@github.com>2023-10-01 18:07:47 +0200
commit7cb0ba8156c291d34162e050045fe878f98531ee (patch)
tree0a3059b4ff73430d56d69b44d3568bd39a47132b
parente466bba01366ef5e96563d4acaea87e951a620c4 (diff)
downloadAntennaPod-7cb0ba8156c291d34162e050045fe878f98531ee.zip
Switch to colorBackground instead of windowBackground (#6674)
-rw-r--r--app/src/main/java/de/danoeh/antennapod/fragment/NavDrawerFragment.java2
-rw-r--r--app/src/main/java/de/danoeh/antennapod/fragment/swipeactions/SwipeActions.java2
-rw-r--r--app/src/main/res/layout-sw720dp/main.xml2
-rw-r--r--app/src/main/res/layout/audioplayer_fragment.xml2
-rw-r--r--app/src/main/res/layout/feedinfo.xml4
-rw-r--r--app/src/main/res/layout/feeditemlist_header.xml4
-rw-r--r--app/src/main/res/layout/fragment_itunes_search.xml2
-rw-r--r--app/src/main/res/layout/horizontal_feed_item.xml2
-rw-r--r--app/src/main/res/layout/main.xml2
-rw-r--r--app/src/main/res/layout/theme_preference.xml2
-rw-r--r--core/src/main/res/layout/more_content_list_footer.xml6
-rw-r--r--core/src/main/res/values/styles.xml10
-rw-r--r--ui/common/src/main/res/layout/pager_fragment.xml2
13 files changed, 22 insertions, 20 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/NavDrawerFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/NavDrawerFragment.java
index 0916b93ad..eeca181cf 100644
--- a/app/src/main/java/de/danoeh/antennapod/fragment/NavDrawerFragment.java
+++ b/app/src/main/java/de/danoeh/antennapod/fragment/NavDrawerFragment.java
@@ -148,7 +148,7 @@ public class NavDrawerFragment extends Fragment implements SharedPreferences.OnS
shapeBuilder.setTopRightCornerSize(cornerSize).setBottomRightCornerSize(cornerSize);
}
MaterialShapeDrawable drawable = new MaterialShapeDrawable(shapeBuilder.build());
- int themeColor = ThemeUtils.getColorFromAttr(root.getContext(), android.R.attr.windowBackground);
+ int themeColor = ThemeUtils.getColorFromAttr(root.getContext(), android.R.attr.colorBackground);
drawable.setFillColor(ColorStateList.valueOf(themeColor));
root.setBackground(drawable);
}
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/swipeactions/SwipeActions.java b/app/src/main/java/de/danoeh/antennapod/fragment/swipeactions/SwipeActions.java
index 4ad9df531..beafe2604 100644
--- a/app/src/main/java/de/danoeh/antennapod/fragment/swipeactions/SwipeActions.java
+++ b/app/src/main/java/de/danoeh/antennapod/fragment/swipeactions/SwipeActions.java
@@ -191,7 +191,7 @@ public class SwipeActions extends ItemTouchHelper.SimpleCallback implements Life
//add color and icon
Context context = fragment.requireContext();
- int themeColor = ThemeUtils.getColorFromAttr(context, android.R.attr.windowBackground);
+ int themeColor = ThemeUtils.getColorFromAttr(context, android.R.attr.colorBackground);
int actionColor = ThemeUtils.getColorFromAttr(context,
dx > 0 ? right.getActionColor() : left.getActionColor());
RecyclerViewSwipeDecorator.Builder builder = new RecyclerViewSwipeDecorator.Builder(
diff --git a/app/src/main/res/layout-sw720dp/main.xml b/app/src/main/res/layout-sw720dp/main.xml
index e00406464..d2b231992 100644
--- a/app/src/main/res/layout-sw720dp/main.xml
+++ b/app/src/main/res/layout-sw720dp/main.xml
@@ -37,7 +37,7 @@
android:id="@+id/audioplayerFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="?android:attr/windowBackground"
+ android:background="?android:attr/colorBackground"
android:elevation="8dp"
android:visibility="gone"
app:layout_behavior="de.danoeh.antennapod.view.LockableBottomSheetBehavior" />
diff --git a/app/src/main/res/layout/audioplayer_fragment.xml b/app/src/main/res/layout/audioplayer_fragment.xml
index 87225e783..1a6794db9 100644
--- a/app/src/main/res/layout/audioplayer_fragment.xml
+++ b/app/src/main/res/layout/audioplayer_fragment.xml
@@ -46,7 +46,7 @@
android:layout_alignBottom="@id/pager"
android:importantForAccessibility="no"
app:srcCompat="@drawable/bg_gradient"
- app:tint="?android:attr/windowBackground" />
+ app:tint="?android:attr/colorBackground" />
<androidx.cardview.widget.CardView
android:id="@+id/cardViewSeek"
diff --git a/app/src/main/res/layout/feedinfo.xml b/app/src/main/res/layout/feedinfo.xml
index 9771bd7fc..974823668 100644
--- a/app/src/main/res/layout/feedinfo.xml
+++ b/app/src/main/res/layout/feedinfo.xml
@@ -16,8 +16,8 @@
android:id="@+id/collapsing_toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="?android:attr/windowBackground"
- app:contentScrim="?android:attr/windowBackground"
+ android:background="?android:attr/colorBackground"
+ app:contentScrim="?android:attr/colorBackground"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
app:scrimAnimationDuration="200">
diff --git a/app/src/main/res/layout/feeditemlist_header.xml b/app/src/main/res/layout/feeditemlist_header.xml
index ba8b4fcd8..45f8e8ff8 100644
--- a/app/src/main/res/layout/feeditemlist_header.xml
+++ b/app/src/main/res/layout/feeditemlist_header.xml
@@ -158,7 +158,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="2dp"
- android:background="?android:attr/windowBackground"
+ android:background="?android:attr/colorBackground"
android:foreground="?android:attr/selectableItemBackground"
android:visibility="gone"
android:gravity="center"
@@ -171,7 +171,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="2dp"
- android:background="?android:attr/windowBackground"
+ android:background="?android:attr/colorBackground"
android:visibility="gone"
android:gravity="center"
android:textColor="?attr/colorAccent"
diff --git a/app/src/main/res/layout/fragment_itunes_search.xml b/app/src/main/res/layout/fragment_itunes_search.xml
index 36026ae1e..e4d2d7492 100644
--- a/app/src/main/res/layout/fragment_itunes_search.xml
+++ b/app/src/main/res/layout/fragment_itunes_search.xml
@@ -91,7 +91,7 @@
android:text="@string/discover_powered_by_itunes"
android:textSize="12sp"
android:padding="4dp"
- android:background="?android:attr/windowBackground"
+ android:background="?android:attr/colorBackground"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
diff --git a/app/src/main/res/layout/horizontal_feed_item.xml b/app/src/main/res/layout/horizontal_feed_item.xml
index 56a3b317d..faadd0766 100644
--- a/app/src/main/res/layout/horizontal_feed_item.xml
+++ b/app/src/main/res/layout/horizontal_feed_item.xml
@@ -25,7 +25,7 @@
android:elevation="4dp"
android:outlineProvider="bounds"
android:foreground="?android:attr/selectableItemBackground"
- android:background="?android:attr/windowBackground"
+ android:background="?android:attr/colorBackground"
squareImageView:direction="height" />
</androidx.cardview.widget.CardView>
diff --git a/app/src/main/res/layout/main.xml b/app/src/main/res/layout/main.xml
index c5cfb494e..3a368e90e 100644
--- a/app/src/main/res/layout/main.xml
+++ b/app/src/main/res/layout/main.xml
@@ -29,7 +29,7 @@
android:id="@+id/audioplayerFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="?android:attr/windowBackground"
+ android:background="?android:attr/colorBackground"
android:elevation="8dp"
android:visibility="gone"
app:layout_behavior="de.danoeh.antennapod.view.LockableBottomSheetBehavior" />
diff --git a/app/src/main/res/layout/theme_preference.xml b/app/src/main/res/layout/theme_preference.xml
index 32a7ed1e8..27335fbd3 100644
--- a/app/src/main/res/layout/theme_preference.xml
+++ b/app/src/main/res/layout/theme_preference.xml
@@ -5,7 +5,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
- android:background="?android:attr/windowBackground"
+ android:background="?android:attr/colorBackground"
android:gravity="top"
android:padding="8dp">
diff --git a/core/src/main/res/layout/more_content_list_footer.xml b/core/src/main/res/layout/more_content_list_footer.xml
index 2869ef7de..a3fcd5489 100644
--- a/core/src/main/res/layout/more_content_list_footer.xml
+++ b/core/src/main/res/layout/more_content_list_footer.xml
@@ -6,7 +6,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:foreground="?attr/selectableItemBackground"
- android:background="?android:attr/windowBackground"
+ android:background="?android:attr/colorBackground"
android:gravity="center"
android:padding="8dp">
@@ -31,6 +31,6 @@
android:text="@string/load_next_page_label"
android:textColor="?android:attr/textColorPrimary"
android:layout_marginLeft="8dp"
- android:layout_marginRight="8dp"/>
+ android:layout_marginRight="8dp" />
-</LinearLayout> \ No newline at end of file
+</LinearLayout>
diff --git a/core/src/main/res/values/styles.xml b/core/src/main/res/values/styles.xml
index c5cad7522..2b0d50267 100644
--- a/core/src/main/res/values/styles.xml
+++ b/core/src/main/res/values/styles.xml
@@ -31,6 +31,7 @@
</style>
<style name="Theme.AntennaPod.Light" parent="Theme.AntennaPod.Dynamic.Light">
+ <item name="isMaterial3DynamicColorApplied">false</item>
<item name="colorPrimary">@color/accent_light</item>
<item name="colorOnPrimary">@color/white</item>
<item name="colorAccent">@color/accent_light</item>
@@ -39,7 +40,7 @@
<item name="colorPrimaryDark">@color/accent_light</item>
<item name="colorPrimaryContainer">@color/accent_light</item>
<item name="colorOnPrimaryContainer">@color/white</item>
- <item name="android:windowBackground">@color/background_light</item>
+ <item name="android:colorBackground">@color/background_light</item>
<item name="colorSurface">@color/background_light</item>
<item name="colorSurfaceVariant">#D3DCE0</item>
</style>
@@ -73,6 +74,7 @@
</style>
<style name="Theme.AntennaPod.Dark" parent="Theme.AntennaPod.Dynamic.Dark">
+ <item name="isMaterial3DynamicColorApplied">false</item>
<item name="colorPrimary">@color/accent_dark</item>
<item name="colorOnPrimary">@color/black</item>
<item name="colorAccent">@color/accent_dark</item>
@@ -81,7 +83,7 @@
<item name="colorPrimaryDark">@color/accent_dark</item>
<item name="colorPrimaryContainer">@color/accent_dark</item>
<item name="colorOnPrimaryContainer">@color/black</item>
- <item name="android:windowBackground">@color/background_darktheme</item>
+ <item name="android:colorBackground">@color/background_darktheme</item>
<item name="colorSurface">@color/background_darktheme</item>
<item name="colorSurfaceVariant">#2F3B4F</item>
</style>
@@ -89,7 +91,7 @@
<style name="Theme.AntennaPod.Dynamic.TrueBlack" parent="Theme.AntennaPod.Dynamic.Dark">
<item name="android:textColorPrimary">@color/white</item>
<item name="android:color">@color/white</item>
- <item name="android:windowBackground">@color/black</item>
+ <item name="android:colorBackground">@color/black</item>
<item name="colorSurface">@color/black</item>
<item name="background_color">@color/black</item>
<item name="background_elevated">@color/black</item>
@@ -99,7 +101,7 @@
<style name="Theme.AntennaPod.TrueBlack" parent="Theme.AntennaPod.Dark">
<item name="android:textColorPrimary">@color/white</item>
<item name="android:color">@color/white</item>
- <item name="android:windowBackground">@color/black</item>
+ <item name="android:colorBackground">@color/black</item>
<item name="colorSurface">@color/black</item>
<item name="background_color">@color/black</item>
<item name="background_elevated">@color/black</item>
diff --git a/ui/common/src/main/res/layout/pager_fragment.xml b/ui/common/src/main/res/layout/pager_fragment.xml
index e479259d5..a5bf6c76e 100644
--- a/ui/common/src/main/res/layout/pager_fragment.xml
+++ b/ui/common/src/main/res/layout/pager_fragment.xml
@@ -24,7 +24,7 @@
android:id="@+id/sliding_tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="?android:attr/windowBackground"
+ android:background="?android:attr/colorBackground"
app:tabBackground="?attr/selectableItemBackground"
app:tabMode="auto"
app:tabGravity="fill" />