(Android) How to disable scrolling of certain elements of nested recyclerview - android

With this link you can navigate to the image of my recyclerview.
Here I have vertical recyclerview inside horizontal recyclerview. The horizontal scrolling works fine because I have used LinearSnapHelper. So everytime I scroll horizontally, one of the displays of date and hours is positioned in the center. The problem is that I want to disable the vertical scrolling of 2 recyclerviews of the image which are on the edges, so the only central recyclerview can be scrolled vertically at that moment.
Looking forward to suggestions!
Thanks in advance!

I would like to help you with your problem
Could you please submit code snippets of your main activity, main XML file, and the activity that this layout is put in?

Related

How to achieve horizontal scroll of cardviews using recyclerview in android

I want to achieve this kind of horizontal scroll of CardViews using RecyclerView. I know how to make horizontal scroll in RecyclerView. But I want to make the current item big compared to the other side items.
Working video of the demo:
https://i.stack.imgur.com/3aB9q.gif
Static image of the behavior:
How can I achieve the above behaviour ?
Maybe this helps you. SnapHelper with center snapping https://rubensousa.github.io/2016/08/recyclerviewsnap

How to detect if an HorizontalScrollView is showing scroll bars or not

I have an HorizontalScrollView in my design, which I populate with a variable number of items. The problem I have is that sometimes I populate it with many items, so the ScrollView shows scroll bars. That's OK, but I would like to check this situation and show a Previous and Next buttons in this case.
How can I do this?
I don't think ScrollView has a scroll listener. Synchronise ScrollView scroll positions - android might help you for creating a custom one.

Make horizontalscrollview auto scrolling

I have multiple textviews inside a horizontalscrollview. Now I want to scroll all the textviews inside it so that all multiple textviews gets displayed. How can I achieve it ?
Thanks in advance.
Here is one git project. Its a scroller the scroll automatically and continously. It was made to show a credits screen by continously scrolling through a list of images.
This might help you or give you some idea.
https://github.com/blessenm/SlideshowDemo

Scrollview inside listview issue in android

I am adding a listview inside a scrollview in xml that xml(Screen) is loading from the middle screen. In my design I have a top part like a textview and a list view and middle part like editext and bottom part like button. Page is loading from the middle part. If it scrolls I can only see the above part. I want to load the page from above part. Can anybody tell me what the problem is and how to resolve it?
Thanks
Use android:fillViewport="true" as an attribute in your scrollview tag and it will fill up the screen.
Actually there is no need to use ScrollView with ListView. Use ListView only, you will be able to scroll the items in a ListView.
You should never use a ScrollView with a ListView, because ListView
takes care of its own vertical scrolling. Most importantly, doing this
defeats all of the important optimizations in ListView for dealing
with large lists, since it effectively forces the ListView to display
its entire list of items to fill up the infinite container supplied by
ScrollView.
found it here
using smoothScrollTO(0,0) to fix the issue

How to create lazy loading in Horizontal scrollview

My application loads 10 image-thumbnails from server and set them into horizontal scrollview. When I swipe it to the last image, I would like to add lazy-loading element in the back of my horizontal scrollview and download next 10 more image in the background process.
My problem is -----> How I know the last image in horizontal scrollview shows on the screen?
I think the horizontal scrollview is so different from listview, because the listview uses adapter to control inside elements.
Thanks you so much
Maybe you can use a ViewPager http://android-developers.blogspot.com/2011/08/horizontal-view-swiping-with-viewpager.html
This uses an adapter behind the scenes and you can do the trick where you set the count to a very large number.

Categories

Resources