android折叠tab,折叠式工具与tablayout

8a4e8c35498adefbc8add2c97eca928f.gif

,在这里我有什么

8f594060ebe8b8341358a7ea79d57e78.gif

。问题是当折叠工具栏被展开时,tablayout在recyclerView后面。而且我无法删除标题“Musico”或将它设置为顶部为粘性。

我的XML是

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">

android:id="@+id/appbar"

android:layout_width="match_parent"

android:layout_height="200dp"

android:fitsSystemWindows="true"

android:theme="@style/AppTheme.AppBarOverlay">

android:id="@+id/collapsing_toolbar"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:fitsSystemWindows="true"

app:contentScrim="?attr/colorPrimary"

app:layout_scrollFlags="scroll|exitUntilCollapsed"

>

android:id="@+id/backdrop"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:fitsSystemWindows="true"

android:scaleType="centerCrop"

android:src="@drawable/hp"

app:layout_collapseMode="parallax"

/>

android:id="@+id/toolbar"

app:layout_scrollFlags="scroll|enterAlways"

app:layout_collapseMode="pin"

android:layout_width="match_parent"

android:layout_height="90dp"

app:popupTheme="@style/AppTheme.PopupOverlay" >

android:id="@+id/tabs"

android:layout_width="match_parent"

android:layout_height="40dp"

app:tabGravity="center"

android:layout_gravity="bottom"

app:tabMode="scrollable" />

和content_main.xml

xmlns:android="http://schemas.android.com/apk/res/android"

xmlns:app="http://schemas.android.com/apk/res-auto"

xmlns:tools="http://schemas.android.com/tools"

android:layout_width="match_parent"

android:layout_height="match_parent"

app:layout_behavior="@string/appbar_scrolling_view_behavior"

tools:showIn="@layout/activity_main"

app:behavior_overlapTop="30dp"

>

android:layout_width="match_parent"

android:layout_height="match_parent"

android:id="@+id/view_pager"

android:layout_marginLeft="10dp"

android:layout_marginRight="10dp">

请帮助。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值