0
私はrecyclerviewのページングをしたいのですが、私の場合、recyclerViewはScrollViewの内側にあります。したがって、onscrollListenerは期待どおりに動作しません。だから私はScrollViewのスクロールエンドを見つける予定で、次のページリクエストを発生させます。RecyclerViewがScrollView内でRecyclerViewを使用しているときに、Recyclerviewのonscrolllistenerが機能しない
これは良い解決策ですか、誰かがより良いアイデアを持っていますか?
<?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:orientation="vertical">
<ScrollView android:layout_width="match_parent"
android:layout_height="match_parent" android:fillViewport="false">
<LinearLayout android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="wrap_content">
<FrameLayout android:id="@+id/headerContainer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<android.support.v4.view.ViewPager
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</ScrollView>
</LinearLayout>
助けを願って。なぜあなたはscrollViewを望んでいますか? –
2つのスクロールビューを持つことは常に悪い考えです。なぜScrollViewが必要ですか? – X3Btel
実際には、コンテンツ全体がスクロールする必要があるため、スクロールビューが必要です。内容にはヘッダー領域が含まれ、その下にはタブ付きのViewPageがあります。 – Krish