Мой drawerLayout перехватывает все события касания. Мне нужна помощь в определении того, как нажимать на элементы ниже. Вот как мой drawerLayout настроенDrawerlayout перехватывает все события касания
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:id="@+id/frag_container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<RelativeLayout
.... some code ...
</RelativeLayout>
</android.support.v4.widget.DrawerLayout>
Я тогда ссылаться на этот макет в кириллице, как этот
<!-- elements inside of this relative layout
are unclickable because the drawer layout below
intercepts all clicks. If I place the drawer above
this view the drawer is beneath all the elements
in the relative layout, however, I am able to do
my clicks as expected. What I am doing incorrectly? -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- ... some code * the buttons here are what
I want to be clickable when drawer is closed.
I currently cannot reach them ... -->
</RelativeLayout>
<include layout="@layout/drawer" />
</FrameLayout>
я добавил android:clickable="false"
и android:focusable="false"
в XML на ящике. Программно я регистрировал клики, и это фактический ящик с id «drawer_layout», перехватывающий все клики. Сделать его незакрепленным не работает, он по-прежнему доступен для кликов. Я также попытался установить видимость INVISIBLE и GONE, и это тоже не жизнеспособные решения.
Как я могу сделать этот drawerLayout разрешить клики через него элементам под ним? Заранее спасибо!
это было, спасибо –