AlertDialog in scanning mode (ZXing.Mobile bar code scanner)

IvanProstoySoftIvanProstoySoft ✭✭Member ✭✭

Please, help!
AlertDialog is displayed in MainActivity.
How to draw a conclusion in barCodeLayout?

My code:
public void TestLV_ItemClick(object sender, ItemClickEventArgs e)
{
var scanner = new MobileBarcodeScanner();
var opt = new MobileBarcodeScanningOptions
{
DelayBetweenContinuousScans = 3000
};
scanner.UseCustomOverlay = true;
var barCodeLayout = LayoutInflater.FromContext(this).Inflate(Resource.Layout.BarCodeLayout, null);
scanner.CustomOverlay = barCodeLayout;
Button enter = scanner.CustomOverlay.FindViewById<Button>(Resource.Id.btnIn);
enter.SetBackgroundColor(Color.SeaGreen);
enter.Click += delegate (Object o, EventArgs ex) {
AlertDialog.Builder alert = new AlertDialog.Builder(this);
alert.SetTitle("Scanning Mode");
alert.SetMessage("Go to INPUT scan mode?");
alert.SetPositiveButton("Yes", (senderAlert, args) => {
Toast.MakeText(this, "Scanning of INPUTS", ToastLength.Short).Show();
InOut = "Input";
(o as Button).SetBackgroundColor(Color.SeaGreen);
});
Dialog dialog = alert.Create();
dialog.Show();
};
scanner.ScanContinuously(opt, HandleScanResult);
}

P.S.
Sorry for my English.

Sign In or Register to comment.