【发布时间】:2021-05-28 05:36:04
【问题描述】:
在一个非常简单的Xamarin android APP 中,我使用ZXing 扫描条形码,然后处理结果。处理结果需要几秒钟的时间,在我想显示ACR showLoading 期间,当扫描仪/相机关闭时,活动指示器几乎立即隐藏。
如何在处理结果时保持显示加载打开?
清理代码:
async void onAddByScan(object sender, EventArgs e)
{
var options = new ZXing.Mobile.MobileBarcodeScanningOptions();
var scanner = new MobileBarcodeScanner();
ZXing.Result result = await scanner.Scan(options);
using (UserDialogs.Instance.Loading())
{
await HandleResultAsync(result);
}
}
async Task HandleResultAsync(ZXing.Result result)
{
//do something with the results
}
【问题讨论】:
标签: c# android xamarin zxing acr