PhoneGap的Andr​​oid的吧$ C C扫描的用户界面修改$用户界面、PhoneGap、Andr、oid

2023-09-09 21:07:39 作者:守护あ娃娃

即时通讯目前使用的开放源码库Zxing律师code扫描仪在我的Andr​​oid项目。这个问题林面是关于扫描用户界面

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

当我启动扫描窗口,它占据了整个屏幕,林不知道如何定义它 - 我想补充一个HTML返回按钮,以防客户要扫描或更好的添加菜单栏要一致与我的应用程序的所有其他网页?

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 ?

我如何在扫描窗口中添加基本的HTML元素?

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

推荐答案

如果你是刚刚通过的意图,你无法控制的要求吧codeScanner。但是,如果你是嵌入在酒吧codeScanner应用了Java code。在你的应用程序,你拥有所有的Java code和XML的资源可用,并且可以对其进行编辑,你怎么样。这都将是Java和Android原生资源的东西虽然..而不是HTML。

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.

如果您在嵌入布局

的http://$c$c.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://$c$c.google.com/p/zxing/source/browse/trunk/android/src/com/google/zxing/client/android/CaptureActivity.java

如果您在布局中添加一个按钮,并呼吁完成在OnClickListener您设置的活动将是一回,你的愿望。

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..