I am trying to achieve an effect like the landing page of Google Play store. What I believe is, the hierarchy is as follows -
The Horizontal swipe on the "New+Updated Games" section is incredibly smooth, and does not interfere with vertical scrolling. In my implementation, during swipe, there is a movement up and down, and thus the effect is not smooth.
Ideally only for explicit UP or DOWN gestures, should the view go up or down.
Is my understanding correct? Is there any tutorial or guide that helps me achieve the same effect?
The problem can be solved by moving the SliverAppBar into the CustomScrollView and not use the NestedScrollView at all.
setnestedscrollingenabled set it to false. try this one add property in recyclerview android:descendantFocusability="blocksDescendants" .
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.
I would really appreciate if you could add some code snippets for a better understanding of your problem.. Albeit, here's an excerpt
{
recyclerView.setHasFixedSize(true);
linearLayoutManager = new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, true);
linearLayoutManager.setReverseLayout(false);
linearLayoutManager.setStackFromEnd(false);
adapter = new RecyclerAdapter(getContext(), arrayList);
recyclerView.setLayoutManager(linearLayoutManager);
recyclerView.setAdapter(adapter);
recyclerView.setNestedScrollingEnabled(false);
adapter.notifyDataSetChanged();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With