i have a RecyclerView which single item is CardView type. I want to display that Cardviewes with match_parent width, and go next by finger swipe. I set an horizontal orientation in LinearLayout and everything is OK, but i can scroll it like a regular List but i want to make that finger swipe is scrolling that items and block on next one without scrolling through whole list. Is this possible in some way ?
Related
I am building an app for Android TV by using Nested RecyclerView. Root is vertical RecyclerView which has rows with Horizontal RecyclerView.
I want to change the focus on the single click and want to keep the scroll position static. But scrolling is always happening at the bottom of the view for horizontal and vertical both.
I am using the focus listener to scroll to top
verticalRLVLayout.scrollToPositionWithOffset(rowNumber,0);
horizantalRLVLayout.scrollToPositionWithOffset(columnNumber, 0);
This is not working always and i don't see this is the best option.
Is there any way by which if we have fixed height of each row the single click will change the focus always.
Going upward in the RecyclerView, causes new row to slide towards right and focus goes to last visible tile on the previous row. Why this is happening, any idea ?
Thanks
I want to scroll a specific item to the top in RecyclerView.
Here is the code I am using,
rvTweets.smoothScrollToPosition(position);
or
linearLayoutManager.scrollToPositionWithOffset(postion,0);
Both the code work when RecycelerView has enough items to cover the complete height of the screen. Otherwise, it does not scroll the desired position to the top.
I have a NestedScrollView with a RecyclerView inside.
Each item within the RecyclerView has an EditText.
If the user LongClicks an EditText I want the screen to scroll such that the position of the editetext within the recyclerview scrolls to the top of the screen....
tried a lot of methods but think the nestedscrollview combined with recycler might be hindering this...
The reason i want this behaviour is that suppose an item in the recyclerview is near the bottom of the screen, if i click this the keyboard enters and it will be hidden, hence i want it to shift to the top, that way the edittext is visible
There is a horizontal recyclerview in my app and I want the sideways swipe to just bring next item to the centre. So when user swipes on the screen, the list should not scroll on for several items but just scroll to next item regardless of the swipe distance. Would it be possible to achieve this effect?
I have a list of about 100 items. In each list item I need a framelayout with 2 relative layouts. When a button called "Flip" is clicked then one relative layout will flip out and the other relative layout will flip in. And each item has full width of the screen. So, I need to show the item in a horizontal scroll view. Now, I want to keep at most 3 items every moment. When user scrolls to the first item then we have to update the 3 items. The first item will be the 2nd item. And we have to add another item at the front. In this way we have to update the items when user scrolls to the last item. I have tried many ways. I have used Gallery for the horizontal scroll view. And used the onItemSelected method. But, if I scroll the Gallery fast then it crashes. So, please someone help me to implement the 3 items idea.
It sounds like you need a ListView. Is there a reason you are trying to reinvent it?
Also don't you mean a vertical scroll view? Why are using a horizontal?