Shankar ARUL
Shankar ARUL

Reputation: 13710

PhoneGap Android Barcode Scan UI modification

Im currently using the Barcode Scanner from the open source library Zxing in my android project. The problem Im facing is concerning the scanning UI

When I launch the Scan window, it occupies the entire screen and Im not sure how to customize it - I would like to add a HTML back button in case the customer wants to scan or even better add the menu bar to be consistent with all other pages on my app ?

How do I add basic HTML elements in the scanning window ?

Upvotes: 3

Views: 3965

Answers (1)

Manfred Moser
Manfred Moser

Reputation: 29912

If you are just calling BarcodeScanner via an intent you have no control. However if you are embedding the Java code from the BarcodeScanner app in your app you have all the java code and xml resources available and can edit them how you like. It will all be Java and native Android resource stuff though.. not html.

If you are embedding the layout is

http://code.google.com/p/zxing/source/browse/trunk/android/res/layout/capture.xml

and the activity that does the scanning you want to edit is

http://code.google.com/p/zxing/source/browse/trunk/android/src/com/google/zxing/client/android/CaptureActivity.java

If you add a button in the layout and call finish in the OnClickListener you set up in the activity it would be a back as you desire..

Upvotes: 1

Related Questions