I have the same problem, I decided to scroll, but placed the toolbar and tabs inside the application panel and wrapped it, and the viewpager with the coordinator. Also in the layout of my processing view (for pumping) I add layout_behavior. It works, but the problem is that everything is on top of each other.
This is my main page.
<android.support.design.widget.CoordinatorLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_above="@+id/music_foot" > <android.support.v4.view.ViewPager android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/view_pager" /> <view android:layout_width="match_parent" android:layout_height="wrap_content" class="android.support.design.widget.AppBarLayout" android:id="@+id/appBar" > <android.support.v7.widget.Toolbar android:layout_width="match_parent" android:layout_height="56dp" android:background="#1e88e5" android:id="@+id/toolbar" app:layout_scrollFlags="scroll|enterAlways" ></android.support.v7.widget.Toolbar> <view android:layout_width="match_parent" android:layout_height="56dp" class="com.astuetz.PagerSlidingTabStrip" android:id="@+id/pager_tabs" android:layout_below="@+id/appBar" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" /> </view>
and this is my adapter layout
<android.support.v7.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior" android:id="@+id/recycleView" />
If I make it work better, tell me.
Tarek Srour May 30 '15 at 12:41 a.m. 2015-05-30 00:41
source share