現在、作成中のアプリにフローティング アクション ボタンを設定しています。私の問題は、ボタンをクリックすると、ボタンの背後にあるリストビューもクリックイベントを受け取ることです。ボタンがクリックイベント全体を消費するようにする必要があります。
このライブラリを使用してボタンを作成しています: https://github.com/FaizMalkani/FloatingActionButton
これを達成する方法について誰かが私を正しい方向に向けることができれば、それは大歓迎です。以下に使用しているxmlレイアウトを含めました。
ありがとうコーリー:)
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:padding="4dip"
android:gravity="center_horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:padding="4dip"
android:gravity="center_horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.view.ViewPager
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="1">
</android.support.v4.view.ViewPager>
</LinearLayout>
<com.bacon.corey.audiotimeshift.FloatingActionButton
android:id="@+id/fabbutton"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_gravity="bottom|right"
android:layout_marginBottom="16dp"
android:layout_marginRight="16dp"
app:colour="@color/holo_red_light"
app:drawable="@drawable/ic_content_new"
/>
</FrameLayout>