如何在Zxing Scanner Camera View中添加按钮

我目前的Zxing扫描仪屏幕看起来像这样, 在这里输入图像描述

我想添加一个textview和几个按钮,我已经尝试了很多程序,但没有任何工作可以任何人指导我,我会谦卑地期待你的帮助

inheritance守守则

Java文件:

private ZXingScannerView mScannerView; @Override public void onCreate(Bundle state) { super.onCreate(state); setContentView(R.layout.activity_qrresult); mScannerView = new ZXingScannerView(this); setContentView(mScannerView); } @Override public void onResume() { super.onResume(); mScannerView.setResultHandler(this); mScannerView.startCamera(); Toast.makeText(getApplicationContext(),"Scan QR code to Send Money",Toast.LENGTH_LONG).show(); } @Override public void onPause() { super.onPause(); mScannerView.stopCamera(); // Stop camera on pause } @Override public void handleResult(Result rawResult) { // Do something with the result here if(rawResult.getText().toString().equals("Test Ewallet Test")){ Toast.makeText(getApplicationContext(), rawResult.getText(), Toast.LENGTH_SHORT).show(); Intent go = new Intent(qrresult.this,sendmoney.class); startActivity(go); }else { Toast.makeText(getApplicationContext(), "Couldn't scan the QRcode, Please Try again ", Toast.LENGTH_SHORT).show(); mScannerView.resumeCameraPreview(this); } // mScannerView.resumeCameraPreview(this); // If you would like to resume scanning, call this method below: //mScannerView.resumeCameraPreview(this); } } 

inheritance人xml文件

     

像这样使用RelativeLayout

    

它看起来像:

zxing扫描仪