android-nestedscrollview

NestedScrollView's smoothScrollTo() behaves weird

拟墨画扇 提交于 2019-11-26 18:38:07
问题 What I am trying to achieve is to scroll to scroll_position_1 when tab1 (and so on) is clicked like this. I don't understand what's happening at all. Below is the structure of my layout. <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.v4.widget.NestedScrollView android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.constraint

Recyclerview inside Nested Scrollview scroll but does not fast scroll like normal Recyclerview or Nested Scrollview

妖精的绣舞 提交于 2019-11-26 15:14:45
问题 I am using RecyclerView inside NestedScrollView and it works. But when I use RecyclerView inside LinearLayout or something, it scroll in various speed depending on gesture. The scroll listen to gesture and if I slide up only a bit, then it scroll a little bit while if I slide up really fast, then it scroll really fast. Now my problem is that RecyclerView inside NestedScrollView certainly scroll but fast scroll does not work. However I slide up fast or slow, RecyclerView or NestedScrollView

Pagination not work for the RecyclerView within NestedScrollView

有些话、适合烂在心里 提交于 2019-11-26 08:24:56
问题 How to implement pagination of recyclerview that is within NestedScrollView ? 回答1: Follow this steps : 1. Set nested scrolling enabled false of recycler view. recyclerView.setNestedScrollingEnabled(false); 2. Add scroll listner to nested scrollview. mScrollView.getViewTreeObserver().addOnScrollChangedListener(new ViewTreeObserver.OnScrollChangedListener() { @Override public void onScrollChanged() { View view = (View)mScrollView.getChildAt(mScrollView.getChildCount() - 1); int diff = (view