android-nestedscrollview

RecyclerView and ViewPager with collapsing toolbar

房东的猫 提交于 2019-12-22 13:39:31
问题 I am trying to create this kind of a layout where - A CollapsingToolbarLayout that has a ViewPager like google play app. Below that there is a Grid RecyclerView . And at the end, there is another ViewPager . The RecylerView scrolls normally until the end when CollapsingToolbarLayout expands. <?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@

RecyclerView scroll dosen't work with NestedScrollView

天大地大妈咪最大 提交于 2019-12-21 04:42:09
问题 I have a layout where I have a NestedScrollView containing an Image, multiple buttons and a RecycleView. When I say recycleView.smoothScrollToPosition or recycleView.scrollToPosition() it doesn't do anything at the moment. Refuse to scroll even a pixel. If I remove the NestedScrollView it works fine, but in case I lose the scrolling effect on the surrounding areas. Does any of you met with this problem before? <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget

RecyclerView inside NestedScrollView does not give correct visible item position

孤街浪徒 提交于 2019-12-19 10:17:37
问题 I have a RecyclerView inside a NestedScrollView and I'm trying to get the position of the last visible list item during scroll events using. The following code allows me to reliably detect scroll events: val recyclerView = nestedScrollView.getChildAt(0) as RecyclerView nestedScrollView.setOnScrollChangeListener { v: NestedScrollView?, scrollX: Int, scrollY: Int, oldScrollX: Int, oldScrollY: Int -> val layoutManager = recyclerView?.layoutManager as? LinearLayoutManager val lastVisiblePosition

Smooth scroll and Fling with NestedScrollView,AppBarLayout and CoordinatorLayout

我只是一个虾纸丫 提交于 2019-12-18 12:53:12
问题 I am working on an application where I'm using AppBarLayout with CollapsingToolbarLayout and NestedScrollView. I have successfully implemented this and it is working fine. Now what i am trying to do is, that on fling(fast swipe up) on the Nestedscrollview it should scroll completely to top. Similarly, on fling(fast swipe down) towards the bottom of the screen, it must scroll all the way to the bottom smoothly. However now, it only gets stuck in between which makes it look ugly. I have tried

Espresso, scrolling not working when NestedScrollView or RecyclerView is in CoordinatorLayout

老子叫甜甜 提交于 2019-12-18 11:52:44
问题 It looks like CoordinatorLayout breaks the behaviour of Espresso actions such as scrollTo() or RecyclerViewActions.scrollToPosition() . Issue with NestedScrollView For a layout like this one: <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="wrap_content" app:layout_behavior="@string/appbar_scrolling_view_behavior"> ...

Staggered Gridview (Recycleview) with load more functionality inside the NestedScrollView

半城伤御伤魂 提交于 2019-12-17 19:56:46
问题 I want to implement the load more functionality inside my Staggered gridview. I have tried some lines of code for it like using addOnScrollListener but did not call when i come to the bottom the list. Please find my code which i have tried to implement the load more functionality but not getting the expected result. MY_STRAGGED_RECYCLIVIEW.addOnScrollListener(new RecyclerView.OnScrollListener() { @Override public void onScrolled(RecyclerView recyclerView, int dx, int dy) { super.onScrolled

how to detect the position of the scroll nestedscrollview android at the bottom?

送分小仙女□ 提交于 2019-12-17 15:36:28
问题 i just want to detect the position of the scroll nestedscrollview android at the bottom, and the to call function. my code is : scroll.getViewTreeObserver() .addOnScrollChangedListener(new ViewTreeObserver.OnScrollChangedListener() { @Override public void onScrollChanged() { int totalHeight = scroll.getChildAt(0).getHeight(); int scrollY = scroll.getScrollY(); Log.v("position", "totalHeight=" + totalHeight + "scrollY=" + scrollY); if (scrollY==totalHeight) { getPlaylistFromServer("more"); } }

Android NestedScrollView doesn't work in layout with viewpager

耗尽温柔 提交于 2019-12-14 03:04:57
问题 This is my layout: I want to be able to scroll upper parth of the layout (with name, image, textviews for followers/following...) when I scroll recyclerView in viewPager, so I read that I can use NestedScrollView to implement that, so I put NestedScrollView as my root layout: NestedScrollView: -----------------ConstraintLayout: ---------------------------------rest of the views as in picture above I also added android:fillViewport="true" in NEstedScrollView because that solves a broblem of

How can i have a ListView inside a NestedScrollView

北战南征 提交于 2019-12-14 00:23:50
问题 I have created an app with a page that need to load content dynamically from web service. I want to have listview that can scroll together with a linear layout inside NestedScrollView. But when the contents is loaded to the listview, it doesn't stretch to its full height. Here is my code. <?xml version="1.0" encoding="utf-8"?> <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=

Can't scroll ListView in its parent NestedScrollView - Android

时光总嘲笑我的痴心妄想 提交于 2019-12-12 06:29:44
问题 I am using ListView within NestedScrollView , but can't see more than 1 item in ListView . I can scroll upto the end of TextView ( textContact ) but can't scroll within the ListView ( listContact ). Here's the code for .xml File : <?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.DrawerLayout ... > <android.support.design.widget.CoordinatorLayout ... > <LinearLayout ... android:orientation="vertical"> <android.support.v7.widget.Toolbar ... /> <android.support.v4.widget