vertical and horizontal scrolling like Pulse application - android

My application requires both horizontal scroll and vertical scroll together. The number of view items in both the direction are dynamic and will be fetched from database 10 at a time (horizontal direction). How can I implement this ?
I tried using listview + horizontal listview (http://www.dev-smart.com/archives/34). But the problem coming is..when I click a button to append next 10 items in a row in horizontal direction. Next stories appended are not being displayed. When i scroll vertically and that particular row is not visible then again when i scroll it back..the next appended stories are visible.
Any solution to my implementation ? or any other suggestion/idea to implement vertical+horizontal scroll which will fulfill my purpose ??

Related

Change focus in RecyclerView in single vertical click

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

RecyclerView items shown horizontaly with blocking on Item

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 ?

Android two way scrolling Listview

Let's say I have 100 rows of data to show in a ListView. So far no problem. I have a custom adapter for each row, that has a TextView for a date, a TextView for a sequence number and NOW 60 more TextViews, mostly having a two digit number.
How can I get a horizontal scroll to show all these 60 numbers, BUT, the vertical scroll for the Listview should still work, to scroll down from 1 to 100 row, and also, all rows shown on the screen shall scroll horizontal at the same time, not that only one row will scroll horizontal.
Had tried TwoWayView, but only allows to define one direction of scroll.
You need to have a horizontal scrolling list as each ListItem. Although, there are several horizontal scrolling view options, I would recommend using a Recyclerview with a LinearLayoutManager and orientation set to HORIZONTAL.
The general idea is you need a horizontal list as a list item.

verticalHorizontal scroll Listview for android TV app

I had a requirement of implementing a Header List view with horizontal scroll items as rows (similar to UI shown by using Browse fragment of leanback library) for android TV app . I browsed on net and used verticalHorizontalscroll view using Two way View example and added a header text.As the app is for android TV , both Horizontal and Vertical scrolling should happen on keys Navigation and should show a selector to the focused item.
The vertical Scrolling and Horizontal scrolling is not happening properly.
VericalScrolling:
while scrolling up and down using Keys the entire row is not scrolling it is showing only half of the row on screen. When i set setItemsCanFocus is true it taking two key presses to scroll entire row. One for scrolling row and one for scrolling the header text.
HorizontalScrolling: Horizontal scrolling is not happening until we set setItemsCanFocus is true only after this it is showing selector on focused item . It is taking multiple Right key presses to scroll one item to right.
Please anyone tell me how can i get smooth scrolling both horizontal and vertical along with selector for TV. Is there any other way i can implement this.
Thanks,

how to display listview's scroll item by item

i want to display the listview's scroll item by item, means single item height is equal to listview height, so on listview there is only one item will display at a time, and after scrolling the listview, remaining item will display. But problem is that if i scroll listview, it scroll many items, but i need to scroll only by one item.
in-short listview scroll by many row at a time but i want only one row scroll at a time
please suggest me some tips or method :)
thank you
So if I understand you correctly, you want a 'pager', sort of like, you scroll page per page instead of inbetween every item, right?
I'm using a Horizontal Pager at the moment, it uses a GroupView and measures the scroll amount to snap to the next view in the pager. Perhaps you could write your own GroupView as well calculating the scroll Y values to snap to the next page..
It's not going to be easy, but it's the only way I can think of.
You could look up Horizontal Pager on google and look at the code, and implement it for vertical paging :)

Categories

Resources