-1

I have a cursor that contains several items and I need to place each item on a page and I want to be able to scroll between pages by scrolling left and right... I think it's a horizontal list view but couldn't figure out how to do it... thnaks.

edit: how can I add the content of the cursor to the viewpager?

User
  • 509
  • 2
  • 8
  • 23
  • 1
    What you need is a ViewPager or HorizontalListView? Please explain better what you want to achieve – Stefano Munarini Sep 09 '13 at 14:13
  • hi thanks for your reply I need to add the content of my cursor in a way that each item comes on a page... it's the viewpager as you mentioned I think but is there a way to use it with a cursor and please how? – User Sep 09 '13 at 16:24

2 Answers2

2

ViewPager is what you need. Take a look on this tutorial

amukhachov
  • 5,822
  • 1
  • 41
  • 60
  • is there a way to use the viewpager with a cursor I am searching but can't find what I need I need to get the data of the viewpager from a cursor... – User Sep 09 '13 at 16:12
  • You can use CursorLoader for this purposes. This question seems to be similar with your one : http://stackoverflow.com/questions/12760647/viewpager-pageradapter-with-cursor-cursorloader-onloadfinished-doesnt-get-call – amukhachov Sep 10 '13 at 07:57
1

for such purpose i use Gallery you can find a simple example here EDIT since you have your adapter ready you can apply it toHorizontal ListView

Community
  • 1
  • 1
Ahmad Dwaik 'Warlock'
  • 5,953
  • 5
  • 34
  • 56
  • no that's not what I want I saw how the horizontal list view shows on the app but I don't want that I think what I need is the viewpager but thanks. – User Sep 09 '13 at 17:06