From a794bea9e7c1b42d792dabadee66503de6d3f0d7 Mon Sep 17 00:00:00 2001 From: inorichi Date: Wed, 30 Dec 2015 19:29:25 +0100 Subject: [PATCH] Fix inconsistent tab layout --- .../java/eu/kanade/mangafeed/ui/library/LibraryFragment.java | 2 ++ app/src/main/res/layout/toolbar.xml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/mangafeed/ui/library/LibraryFragment.java b/app/src/main/java/eu/kanade/mangafeed/ui/library/LibraryFragment.java index 5c3f2067f..db15a64f9 100644 --- a/app/src/main/java/eu/kanade/mangafeed/ui/library/LibraryFragment.java +++ b/app/src/main/java/eu/kanade/mangafeed/ui/library/LibraryFragment.java @@ -129,6 +129,8 @@ public class LibraryFragment extends BaseRxFragment } // 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)); diff --git a/app/src/main/res/layout/toolbar.xml b/app/src/main/res/layout/toolbar.xml index abc900b71..91b529962 100644 --- a/app/src/main/res/layout/toolbar.xml +++ b/app/src/main/res/layout/toolbar.xml @@ -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" /> \ No newline at end of file