Skip to content

Commit

Permalink
fix(ios,android): set background to transparent rather than white
Browse files Browse the repository at this point in the history
Fixes #135
  • Loading branch information
cgodley authored and bitjson committed May 17, 2018
1 parent 53555f4 commit c9531b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/android/QRScanner.java
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ private void makeOpaque() {
this.cordova.getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
webView.getView().setBackgroundColor(Color.WHITE);
webView.getView().setBackgroundColor(Color.TRANSPARENT);
}
});
showing = false;
Expand Down
6 changes: 3 additions & 3 deletions src/ios/QRScanner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class QRScanner : CDVPlugin, AVCaptureMetadataOutputObjectsDelegate {
}
do {
if (captureSession?.isRunning != true){
cameraView.backgroundColor = UIColor.white
cameraView.backgroundColor = UIColor.clear
self.webView!.superview!.insertSubview(cameraView, belowSubview: self.webView!)
let availableVideoDevices = AVCaptureDevice.devices(withMediaType: AVMediaTypeVideo)
for device in availableVideoDevices as! [AVCaptureDevice] {
Expand Down Expand Up @@ -195,8 +195,8 @@ class QRScanner : CDVPlugin, AVCaptureMetadataOutputObjectsDelegate {
}

func makeOpaque(){
self.webView?.isOpaque = true
self.webView?.backgroundColor = UIColor.white
self.webView?.isOpaque = false
self.webView?.backgroundColor = UIColor.clear
}

func boolToNumberString(bool: Bool) -> String{
Expand Down

0 comments on commit c9531b8

Please sign in to comment.