Fix inconsistent tab layout

This commit is contained in:
inorichi 2015-12-30 19:29:25 +01:00
parent ef444b0b63
commit a794bea9e7
2 changed files with 3 additions and 1 deletions

View File

@ -129,6 +129,8 @@ public class LibraryFragment extends BaseRxFragment<LibraryPresenter>
}
// Restore active category
viewPager.setCurrentItem(activeCat, false);
TabLayout.Tab tab = tabs.getTabAt(viewPager.getCurrentItem());
if (tab != null) tab.select();
// Send the mangas to child fragments after the adapter is updated
EventBus.getDefault().postSticky(new LibraryMangasEvent(mangas));

View File

@ -7,5 +7,5 @@
android:background="@color/colorPrimary"
android:elevation="4dp"
android:theme="@style/ThemeOverlay.AppTheme.Dark"
app:layout_scrollFlags="scroll|enterAlways"
app:layout_scrollFlags="scroll|enterAlways|snap"
app:popupTheme="@style/AppTheme.Popup" />