我已将回收站视图滚动到工具栏的顶部,但工具栏项(例如,主页按钮)不可点击。如何使查看下可查看点击?
我的布局:
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/primary">
<include
android:id="@id/toolbar_feed"
layout="@layout/toolbar_feed"/>
// Inside viewPager is recycler view which scroll over the toolbar
<android.support.v4.view.ViewPager
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<include
android:id="@+id/navigation_bottom_layout"
layout="@layout/bottom_navigation_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"/>
</RelativeLayout>
我唯一的问题是,工具栏主页按钮无法点击,因为它的背后viewPager层。它可以与播放转换Z一起工作,但它只支持API21 +。那么,你们有想法做这个工作?
你试过android:clickable =“true”吗? – Konrad
@okset是的,它没有工作。 – Hype
你可以发布整个XML布局吗? – kws