android-nestedscrollview

Programmatically scroll to the top of a NestedScrollView

女生的网名这么多〃 提交于 2019-11-29 22:46:19
Is there a way to programmatically scroll to the top of a NestedScrollView by also triggering the scroll events for the parent? smoothScrollTo(x, y) doesn't delegate the scroll events to the NestedScrollingParent . NestedScrollView.scrollTo(0, 0); I managed to do it (animated scrolling): CoordinatorLayout.LayoutParams params = (CoordinatorLayout.LayoutParams) appBarLayout.getLayoutParams(); AppBarLayout.Behavior behavior = (AppBarLayout.Behavior) params.getBehavior(); if (behavior != null) { behavior.onNestedFling(coordinatorLayout, appBarLayout, null, 0, 10000, true); } where 10000 is the

nested scrollview + recyclerview, strange autoscroll behaviour [duplicate]

删除回忆录丶 提交于 2019-11-29 20:18:38
This question already has an answer here: Android prevent nested recyclerview from automatically repositioning [duplicate] 3 answers In a view pager I have several fragments, one of them uses a nested scrollview with a header and a recyclerview : <android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/scrollview" android:layout_width="match_parent" android:layout_height="match_parent" android:fillViewport="true" app:layout_behavior="

Recyclerview with endless scrolling in nestedscrollview, triggers onScrolled

折月煮酒 提交于 2019-11-29 17:54:32
问题 I have recyclerview in the nestedscrollview: <android.support.v4.widget.NestedScrollView android:layout_width="match_parent" android:layout_height="wrap_content"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <org.apmem.tools.layouts.FlowLayout android:id="@+id/filter_view" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/green_main" android:paddingLeft="@dimen/small

How to determine if a NestedScrollView is scrolled to the end and is idle?

*爱你&永不变心* 提交于 2019-11-29 17:44:36
Tried that : NestedScrollView ns =(NestedScrollView) findViewById(R.id.nested_scroll); ns.setOnScrollChangeListener(new NestedScrollView.OnScrollChangeListener() { @Override public void onScrollChange(NestedScrollView v, int scrollX, int scrollY, int oldScrollX, int oldScrollY) { } }); But got stuck, does anyone have an idea? Just to clearify what i want - i want to be able to observe the scroll state (as in addOnScrollListener of RecyclerView) and check only once, when the scrolling has ended (idle), if the user scrolled to the end of the NestedScrollView. Unfortunately, NestedScrollView does

NestedScrollView + CoodinatorLayout scrollBy() scrollTo() methods do nothing

别说谁变了你拦得住时间么 提交于 2019-11-29 16:16:29
I have a NestedScrollView being used with CoordinatorLayout + AppBarLayout + CollapsingToolbarLayout with parallax effect similar to this tutorial I need to scroll the content programmatically (preferably a smooth scroll, i.e. animated), however calling the scroll methods (scrollBy(), scrollTo(), smoothScrollTo(), smoothScrollBy()) do nothing. Note that I am using app:layout_behavior="@string/appbar_scrolling_view_behavior" <-- Not sure if the issue is related to this. I'm calling nsv_form.smoothScrollBy(0, 300) in Kotlin when a button is clicked by the user, but nothing happens :( (Also tried

Fling smoothly AppBarLayout with NestedScrollView using AppBarLayout.Behavior

社会主义新天地 提交于 2019-11-29 07:23:28
问题 I have an AppBarLayout and NestedScrollView. I want the NestedScrollView whenever it scroll down, the AppBarLayout should also expand gracefully, without the NestedScrollView stop right before the AppBarLayout Expand; a second Flight/Scroll is required to get that done. I check stackoverflow and found this solution pretty related, and could be used. But instead if NestedScrollView, it is RecyclerView. It is in https://stackoverflow.com/a/32454407/3286489 I basically take the code and changed

RecyclerView ScrollListener inside NestedScrollView

▼魔方 西西 提交于 2019-11-28 22:32:21
问题 I have an EndlessRecyclerView at the end of a NestedScrollView . EndlessRecyclerView means: when user scrolls to the bottom of the recyclerView it loads more data. This is already implemented and working elsewhere but when I put the recyclerView inside the NestedScrollView the OnScrollListener events doesn't fire. XML design: <NestedScrollView> <Other views/> <EndlessRecyclerView/> </NestedScrollView > Code: recyclerView.setOnScrollListener(new RecyclerView.OnScrollListener() { @Override

nested scrollview + recyclerview, strange autoscroll behaviour [duplicate]

蹲街弑〆低调 提交于 2019-11-28 16:48:45
问题 This question already has answers here : Android prevent nested recyclerview from automatically repositioning [duplicate] (3 answers) Closed 10 months ago . In a view pager I have several fragments, one of them uses a nested scrollview with a header and a recyclerview : <android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id

How to determine if a NestedScrollView is scrolled to the end and is idle?

杀马特。学长 韩版系。学妹 提交于 2019-11-28 12:09:05
问题 Tried that : NestedScrollView ns =(NestedScrollView) findViewById(R.id.nested_scroll); ns.setOnScrollChangeListener(new NestedScrollView.OnScrollChangeListener() { @Override public void onScrollChange(NestedScrollView v, int scrollX, int scrollY, int oldScrollX, int oldScrollY) { } }); But got stuck, does anyone have an idea? Just to clearify what i want - i want to be able to observe the scroll state (as in addOnScrollListener of RecyclerView) and check only once, when the scrolling has

Error inflating class - NestedScrollView - class not found

痞子三分冷 提交于 2019-11-28 12:07:31
Running Android Studio 2.1.2, Windows 7. I replaced a ScrollView with a NestedScrollView and now I'm getting android.view.InflateException: Binary XML file line #2: Error inflating class NestedScrollView java.lang.ClassNotFoundException: Didn't find class "android.view.NestedScrollView" on path: /data/app/com.assemblyguide.remote-48.apk ... when I call SetContentView() on that XML file. I did not get it when I had just a ScrollView. I've tried cleaning, and invalidating the cache and rebuilding. The XML looks like this . . . <?xml version="1.0" encoding="utf-8"?> <NestedScrollView xmlns