Question

I'd like to create a kind of virtual book where I can scroll through the pages by left or right swipe gesture (or first by just using "next" and "previous" - buttons). The content of a book page is loaded from a sqlite-database (for each page I'll use a separate database entry).

My Questions:

  • Is there any special list activity I can use for that?

  • Can someone post an example code snippet?

Was it helpful?

Solution 2

A ViewPager is the right solution ... a FragmentPagerAdapter has to serve it the sqlite content.

Here is a link to the developer training site

OTHER TIPS

I would first look at the android SDK sample MultiRes, this will give you an idea of how to do at least a next. I would then look at Android Listview Example

Then you'll have to figure out the logic on putting them together. That's the fun of android development. If your still stuck you can start looking for code samples i.e github or code.google.com, etc.

Hope this helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top