M_K
M_K

Reputation: 227

QR scan in a half screen using zxing library xamarin android

In Xamarin android QR scan using zxing is much easy as it requires only 3 lines of codes. MobileBarcodeScanner.Initialize(Application); var scanner = new ZXing.Mobile.MobileBarcodeScanner(); var result = await scanner.Scan(); string qrCode = result.ToString();

But it always opens a default view with full screen even if I set it inside oncreate event or button click. What I really need is having qr scan in half screen instead of full screen. remaining othert half screen will be used to add few buttons.

If anyone knows how to do it please let me know I have spent more than 3-4 days to find the answer for this component. Also if there are any other useful library than zxing for qr scanning let me know.

Thanks, Muthu

Upvotes: 0

Views: 1370

Answers (1)

Trevor Balcom
Trevor Balcom

Reputation: 3888

As @SushiHangover mentioned, use the ZXingScannerFragment to achieve this. Take a look at the sample here.

Upvotes: 2

Related Questions