Questions tagged [android-nestedscrollview]

A NestedScrollView is just like a ScrollView, but it supports acting as both a nested scrolling parent as well as a child. It works this way on both new and old versions of Android. Nested scrolling is enabled by default.

NestedScrollView is just like ScrollView, but it supports acting as both a nested scrolling parent and child on both new and old versions of Android. Nested scrolling is enabled by default.

Useful reference

694 questions
4
votes
1 answer

CardView inside NestedScrollView shows extra space in bottom

I have some problem with a layout. I am putting a cardView inside a NestedScrollView and totally inside a CoordinatorLayout. And, it adds a lot of padding at the bottom. Can some body please explain as to why is this happening. I know that the…
3
votes
1 answer

BottomSheetBehavior - only allow dragging on part of view

I have a bottom sheet implemented using BottomSheetBehavior within a CoordinatorLayout. My BottomSheet has a top appbar sort of title bar, and then some scrollable content. Something like this.
Matt Robertson
  • 2,928
  • 5
  • 34
  • 62
3
votes
1 answer

auto pagination if using recyclerview inside NestedSrollView with Paging 3?

I'm using recyclerview inside nestedscrollview to scroll in the full page size but that ruined the pagination functionality because it auto loads all the pages without user scrolling. here is my xml layout
3
votes
0 answers

Jetpack Compose - MotionLayout with scrollableView

I have a Compose MotionLayout with : a title at the middle of the screen first a bellow content which can be a LazyColumn or a Column with verticalScroll() When I dragUp the content, the title must go to the top of the screen (it works) and the…
3
votes
0 answers

onstartNestedScroll and onNestedPreScroll is deprecated in android studio. What is the alternative method?

When I migrate my old android project from api-28 to api-30 onstartnestedscroll() method and onnestedprescroll() are deprecated in android api-30.So, Help me what is alternative method. public class BottomNavigationBehavior extends…
3
votes
2 answers

Align two views in opposites sides (one at the top and one at the bottom) and be able to push the bottom view when the top view grows?

I basically have an EditText aligned at the top of the view and there's a RecyclerView on the bottom of the view that can also grow (with the newest item on the bottom) That's easily doable with a constraint layout but my problem is that when the…
3
votes
2 answers

Viewpager2 inside Nestedscrollview consist two Fragment with Recyclerview having problem

I made a viewpager2 which has two Fragments, inside each Fragment there is a Recyclerview. The viewpager itself is inside a Nestedscrollview in order to hide the toolbar when scroll up. Here is my code:
3
votes
0 answers

MotionLayout with onSwipe handler on NestedScrollView

I tried to set an onSwipe handler on a NestedScrollView to drive the animation in a MotionLayout. However the first time the animation doesn't work. But if I start the animation d, then the onSwipe handler begins to work as expected. Here is the…
3
votes
1 answer

findFirstVisibleItemPosition() returns 0 inside nestedScrollView

I have a recyclerView inside nestedScrollView. I know it's a bad practice, but there are some cases, that I can handle only in this way.
3
votes
3 answers

ScrollView inside ViewPager inside NestedScrollView not scrolling

I have an activity which contains a Nested ScrollView in it. Inside this NestedScrollView there is a ViewPager. Each Page has a view which contains a ScrollView. This innermost scrollview is not scrolling at all. How can I enable the scrolling…
vs.thaakur
  • 619
  • 3
  • 13
3
votes
1 answer

Why MotionLayout collapsing animation not auto completed with NestedScrollView?

I have created custom collapsing view using MotionLayout instead of Coordinator everything is working except auto completion of animation or in coordinator we can call it snapping, like when we scroll and stop scroll in between then Collapsing view…
3
votes
0 answers

How to drag a "nested scrolling enabled bottom sheet" by dragging one of its children?

I have a persistent bottom sheet with a LinearLayout that acts like a header, and a SwipeRefreshLayout with a NestedScrollView in it. I want to be able to drag the bottom sheet by dragging that LinearLayout, but it does not work when nested…
3
votes
0 answers

EditText with NestedScrollView not working OnFocusLostListener

I have an extension of EditText that i call on my onCreate activities to hide keyboard when edittext looses the focus: fun EditText.hideSoftKeyboardOnFocusLostEnabled(enabled: Boolean) { val listener = if (enabled) OnFocusLostListener() else …
Miguel
  • 558
  • 6
  • 21
3
votes
0 answers

YouTubePlayerSupportFragment inside NestedScrollView with bottom-sheet behaviour scrolling on its own

YouTubePlayerSupportFragment inside NestedScrollView with bottom-sheet behaviour scrolling on its own after youtube onLoaded() is called. YouTubePlayerSupportFragment scrolling the bottom-sheet up and onLayoutChild() method is called in…
3
votes
1 answer

Check if NestedScrollView is Scrollable

I need a function which returns a boolean if my screen is scrollable inside a NestedScrollView. I currently have a RecyclerView inside a NestedScrollView and the content of the RecyclerView is dynamic (i can add or remove items). Everytime i swipe…