I would like to have a barcode reader/generator in my app, preferably in one activity. For iOS i think this can be done using a segmented view controller. How would I do this in android? Or should i just put them on two different activities?
Asked
Active
Viewed 103 times
-1
-
To use barcode reader and generator you can use ZXing Lib and yes you can put both in same activity. – DJhon Jul 23 '14 at 03:54
1 Answers
1
Assuming from what I could understand from your question:
you could use a ViewPager, you can read more at http://developer.android.com/training/implementing-navigation/lateral.html
Or if you want the look and feel of IOS segmented control, probably you could create two buttons and change fragments based on which button has been clicked.
Take a look at this (assuming you understand fragments) How to replace a Fragment on button click of that fragment?
Fragments are close to UIViews in IOS. If you are not well versed with fragments, this might help http://www.tutorialspoint.com/android/android_fragments.htm