0
私は水平RecyclerView
をListView
の内側に持っており、ListViewからイベントonItemClickListenerを捕捉する必要があります。私はAPI15をターゲットにしており、デバイスAndroidのバージョン4.4.2でもNougutとエミュレータでテストしました。Android - ListView内の水平RecyclerView
次のコードは、Listviewのカスタムレイアウトです。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:descendantFocusability="blocksDescendants"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
android:background="@drawable/ic_prueba"
android:gravity="center"
android:id="@+id/tv_column_1"/>
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/recycler_view_item"/>
</LinearLayout>
アプリケーションがデバイス上で実行されるとき、listviewのonItemClickListenerイベントは、textviewでのみ機能します。リサイクラーのビュー項目では、私はlistviewイベントを取得できません。
これは、リストビュー
個々のリスナーを水平リサイクラビューに設定した場合、どのような行が表示されているのでしょうか? –