Merge pull request #4108 from ByteHamster/fix-background

Fixed pager tab background
This commit is contained in:
H. Lehmann 2020-05-03 19:34:36 +02:00 committed by GitHub
commit f5d289d776
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -86,6 +86,7 @@ public class ItemPagerFragment extends Fragment {
pager.setId(newId); pager.setId(newId);
pager.setAdapter(new ItemPagerAdapter(this)); pager.setAdapter(new ItemPagerAdapter(this));
pager.setCurrentItem(feedItemPos, false); pager.setCurrentItem(feedItemPos, false);
pager.setOffscreenPageLimit(1);
loadItem(feedItems[feedItemPos]); loadItem(feedItems[feedItemPos]);
pager.registerOnPageChangeCallback(new ViewPager2.OnPageChangeCallback() { pager.registerOnPageChangeCallback(new ViewPager2.OnPageChangeCallback() {
@Override @Override

View File

@ -13,6 +13,7 @@
<item name="progressBarTheme">@style/ProgressBarLight</item> <item name="progressBarTheme">@style/ProgressBarLight</item>
<item name="colorPrimaryDark">@color/accent_light</item> <item name="colorPrimaryDark">@color/accent_light</item>
<item name="android:windowBackground">@color/background_light</item> <item name="android:windowBackground">@color/background_light</item>
<item name="tabBackground">@color/background_light</item>
<item name="actionBarStyle">@style/Widget.AntennaPod.ActionBar.Light</item> <item name="actionBarStyle">@style/Widget.AntennaPod.ActionBar.Light</item>
<item name="master_switch_background">@color/master_switch_background_light</item> <item name="master_switch_background">@color/master_switch_background_light</item>
<item name="currently_playing_background">@color/highlight_light</item> <item name="currently_playing_background">@color/highlight_light</item>
@ -84,6 +85,7 @@
<item name="colorPrimary">@color/accent_dark</item> <item name="colorPrimary">@color/accent_dark</item>
<item name="colorPrimaryDark">@color/background_darktheme</item> <item name="colorPrimaryDark">@color/background_darktheme</item>
<item name="android:windowBackground">@color/background_darktheme</item> <item name="android:windowBackground">@color/background_darktheme</item>
<item name="tabBackground">@color/background_darktheme</item>
<item name="actionBarStyle">@style/Widget.AntennaPod.ActionBar.Dark</item> <item name="actionBarStyle">@style/Widget.AntennaPod.ActionBar.Dark</item>
<item name="colorControlNormal">@color/white</item> <item name="colorControlNormal">@color/white</item>
<item name="progressBarTheme">@style/ProgressBarDark</item> <item name="progressBarTheme">@style/ProgressBarDark</item>
@ -157,6 +159,7 @@
<item name="android:textColorPrimary">@color/white</item> <item name="android:textColorPrimary">@color/white</item>
<item name="android:color">@color/white</item> <item name="android:color">@color/white</item>
<item name="android:colorBackground">@color/black</item> <item name="android:colorBackground">@color/black</item>
<item name="tabBackground">@color/black</item>
<item name="android:windowBackground">@color/black</item> <item name="android:windowBackground">@color/black</item>
<item name="android:actionBarStyle">@color/black</item> <item name="android:actionBarStyle">@color/black</item>
</style> </style>