我已將回收站視圖滾動到工具欄的頂部,但工具欄項(例如,主頁按鈕)不可點擊。如何使查看下可查看點擊?
我的佈局:
<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