Fixed pager tab background

This commit is contained in:
ByteHamster 2020-05-03 19:20:32 +02:00
parent c5dcad1722
commit daa9366592
2 changed files with 4 additions and 0 deletions

View File

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

View File

@ -13,6 +13,7 @@
<item name="progressBarTheme">@style/ProgressBarLight</item>
<item name="colorPrimaryDark">@color/accent_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="master_switch_background">@color/master_switch_background_light</item>
<item name="currently_playing_background">@color/highlight_light</item>
@ -84,6 +85,7 @@
<item name="colorPrimary">@color/accent_dark</item>
<item name="colorPrimaryDark">@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="colorControlNormal">@color/white</item>
<item name="progressBarTheme">@style/ProgressBarDark</item>
@ -157,6 +159,7 @@
<item name="android:textColorPrimary">@color/white</item>
<item name="android:color">@color/white</item>
<item name="android:colorBackground">@color/black</item>
<item name="tabBackground">@color/black</item>
<item name="android:windowBackground">@color/black</item>
<item name="android:actionBarStyle">@color/black</item>
</style>