私は Android アプリを開発しています。垂直の NestedScrollView を取得しました。垂直の NestedScrollView は、すべての画面を取り、複数の水平の RecyclerView 内にあります。作業ですが、水平スクロールを実現するのは非常に困難です。
つまり、水平方向にスクロールすると、ジェスチャーが NestedScrollView によってキャッチされ、ビューが上下に移動します。RecyclerViewをスクロールするには、焦点を合わせて実際の水平方向の動きをする必要があります.UXを殺しています...
ここで私の NestedScrollView :
<android.support.v4.widget.NestedScrollView
android:id="@+id/scrollView"
android:scrollbars="none"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="5dp"
android:layout_marginEnd="5dp"
android:layout_marginRight="5dp"
android:layout_marginLeft="5dp"
android:layout_marginStart="5dp">
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:id="@+id/scrollLayout"
android:orientation="vertical" />
</android.support.v4.widget.NestedScrollView>
数はネットワークデータで定義されているため、プログラムで RecyclerView を膨張させています。ここでは膨張したレイアウトです。
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:textSize="@dimen/secondary_text_size"
android:textAllCaps="true"
android:layout_marginBottom="5dp"
android:layout_marginTop="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="@dimen/recycler_view_size" />
</LinearLayout>
そして、Java で RecyclerView を設定する方法:
LayoutInflater inflater = LayoutInflater.from(context);
LinearLayout layout = (LinearLayout) inflater.inflate(R.layout.recycler_view_layout, null, false);
RecyclerView recyclerView = (RecyclerView) layout.findViewById(R.id.recyclerView);
LinearLayoutManager layoutManager = new LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false);
recyclerView.setHasFixedSize(false);
recyclerView.setLayoutManager(layoutManager);
recyclerView.setAdapter(this);
recyclerView.setItemAnimator(new DefaultItemAnimator());
recyclerView.setNestedScrollingEnabled(false);
「速度」の NestedScrollView を変更しようとしましたが、適切なアドバイスや投稿が見つかりません。適切なアドバイスや投稿が見つからない可能性があります。誰かが助けることができますか?