android:layout_with="",Android AppBarLayout with tabs and ViewPager

I have a really strange issue with my app. I have AppBarLayout with tabs and ViewPager. I've configured everything for the ViewPager, the pages are switching on clicking the tabs but the ripple effect on the tabs (tab buttons) is interrupted on click. The problem dissapears when i move the TabLayout out of AppBarLayout, also when I add layout:paddingTop to AppBarLayout the ripple shows sometimes, but otherwise, the ripple is not showing properly except on the currently selected tab.

AppBarLayout:

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

android:id="@+id/app_bar_layout"

style="@style/Theme.appBarLayout">

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

android:id="@+id/toolbar"

style="@style/Theme.toolbar"

app:layout_scrollFlags="scroll|snap"

app:popupTheme="@style/ThemeOverlay.AppCompat.Light"

app:title="@string/app_name_text" />

android:id="@+id/home_tabs_layout"

style="@style/Theme.tabs"

app:tabIndicatorAnimationDuration="@android:integer/config_shortAnimTime"

app:tabIndicatorColor="@color/primary_dark"

app:tabIndicatorHeight="?attr/actionBarSize"

app:tabMode="fixed"

app:tabUnboundedRipple="false" />

ParentLayout:

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

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

style="@style/Theme.home"

tools:context=".activities.HomeActivity">

layout="@layout/actionbar_tabbed"

app:layout_behavior="@string/appbar_scrolling_view_behavior" />

style="@style/Theme.home.container">

android:id="@+id/home_view_pager"

style="@style/Theme.pager"

android:layout_below="@id/home_tabs_layout" />

I also tried to reproduce the problem with the precreated activity given from android studio for tabs with ViewPager, and the behaviour was the same.

Thank you in advance.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值