-1
I am getting text data from database. I am using Textview to show data
![Textview with scrollView]



I want two button at the bottom of activity (next) & (previous) which show data from    database in pages style.
--> user click on next button
    it shows scrolls data in that activity like pages  

Basically i want to remove Scrolling and add pages turn feature in activity ![buttons used][1]

Tarun Sharma
  • 824
  • 1
  • 11
  • 24

2 Answers2

0

You can use ViewPager for this purpose, sample tutorial for ViewPager. First create a list containing you database values and then pass the list as parameter to adapter. You can also add next and previous buttons and use setCurrentItem method to navigate to next and previous accordingly. Hope it helps!!!

Dinash
  • 3,027
  • 4
  • 32
  • 45
0

If i understood your question correctly you are trying to break incomming text into pages so that it fits your screen.

Firstly try to check Breaking large text into pages in android text switcher or view flipper

Instead of the viewflipper try using viewswitcher, which allows you to switch views after calling `getNextView() method. You only need to call this method with the "Next" button.

Hope this helps you ...

Community
  • 1
  • 1
  • Vladimír Gašpar :- you got it Correctly and almost Solve my problem. Thank you very much.Your advice about using Viewswitcher is very appreciated. Thanks again – Tarun Sharma Aug 26 '14 at 05:16