0

My app is running recording. If i wanna make 2 page views;

1) record running, when swipe to right it show

2nd page which is map (map also work accompany with recording activity) in addition, when we are at map view, recording activity still work in background.

Which method or function i should look at? now, I have study some about PageAdapter, but, i still have no idea how to make 2 different page which works together.. Do i have to use Fragment? Any suggestion?

April Smith
  • 1,810
  • 2
  • 28
  • 52

1 Answers1

1

You don't have to use fragments if you don't want to. You use ViewPager, which is a widget that by itself contains other views.

The general idea is: add a ViewPager to your activity's layout (jsut like any other View). From code you assign an adapter that defines the content in the pages of your ViewPager.

For a full code example, see https://stackoverflow.com/a/8685189/243165 Note that the XML of the pages that you inflate, although the example only uses a single ListView, can be full layouts.

Community
  • 1
  • 1
Eric Kok
  • 2,042
  • 3
  • 22
  • 32