Switch to colorBackground instead of windowBackground (#6674)

This commit is contained in:
ByteHamster 2023-10-01 18:07:47 +02:00 committed by GitHub
parent e466bba013
commit 7cb0ba8156
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 22 additions and 20 deletions

View File

@ -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);
}

View File

@ -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(

View File

@ -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" />

View File

@ -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"

View File

@ -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">

View File

@ -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"

View File

@ -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"

View File

@ -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>

View File

@ -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" />

View File

@ -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">

View File

@ -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>
</LinearLayout>

View File

@ -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>

View File

@ -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" />