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
Related
I have a RecyclerView with list of items displayed top to bottom.
I would like to have view of last item overlapping with the previous one.
I used RecyclerView.ItemDecoration with negative top margin and it almost does the trick. Item views indeed overlap, but when I'm at the bottom of the list and I start scrolling up then overlapping view disappears too early.
It looks like RecyclerView does not take into account the negative margin at all when deciding if item is visible or not.
Is there a way to fix that?
Thanks,
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 have a Recyclerview with a Cardview and inside there is another Recyclerview like Netflix. So I cann scroll vertical and horizontal. Insider the inner recyclerview there are some cardviews with buttons. My Problem is if I scroll down and up again, then there apears some Space inside the Carview.
How does this happen?
Start
After Scrolling
Any suggestion or idea is helpful.
Note: Without the Itemdecoration (Page Indikator) it works and no Space appears.
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 ?
I have a listview and button in a scrollview. When i scroll both list and button loses focus. When i tap on button it did not work but next time i tap it works i think button loses focus and focus is towards scrollview how to handle this please help
Never put ListView inside a ScrollView. ListView handles scrolling, and wrapping it in a ScrollView can cause problems with focus, touch-events etc. If you want other Views added to the top or bottom of you list, simply use ListView.addHeaderView() or ListView.addFooterView()
Scroll view can have only one child, put your button and listview in common layout and try out.