第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

ZXing Xamarin 在 IOS 上形成白色背景

ZXing Xamarin 在 IOS 上形成白色背景

C#
慕標(biāo)5832272 2023-06-25 13:44:07
我們?cè)谑褂?Xamarin.Forms 的 ZXing Barcodescanner 時(shí)遇到問題。掃描儀在 Android 上完美運(yùn)行,但在 IOS 上我看不到相機(jī)圖像(預(yù)覽)。如果我將條碼放在相機(jī)前,掃描儀確實(shí)可以掃描 IOS 上的條碼,但相機(jī)預(yù)覽只是白色背景。我嘗試使用這些選項(xiàng),但沒有運(yùn)氣。我們使用 Prism.Forms 進(jìn)行 MVVM。正如我提到的,我的代碼在 Android 上運(yùn)行良好。以下是一些細(xì)節(jié):兩個(gè)平臺(tái)上的權(quán)限均已正確設(shè)置。NuGets ZXing.Net.Mobile 和 ZXing.Net.Mobile.Forms 也添加到所有三個(gè)項(xiàng)目(Android、IOS 和便攜式)我們正在使用 .NET Standard 2.0Xamarin.Forms 版本為 3.4.0ScannerView.xaml<forms:ZXingScannerPage xmlns="http://xamarin.com/schemas/2014/forms"? ? ? ? ? ? ? ? ? ? xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"? ? ? ? ? ? ? ? ? ? xmlns:forms="clr-namespace:ZXing.Net.Mobile.Forms;assembly=ZXing.Net.Mobile.Forms"? ? ? ? ? ? ? ? ? ? x:Class="App.Portable.View.ScannerView"><ContentPage.Content>? ? <Grid>? ? ? ? <Grid.RowDefinitions>? ? ? ? ? ? <RowDefinition Height="*"/>? ? ? ? </Grid.RowDefinitions>? ? ? ? <forms:ZXingScannerView x:Name="scanner" Grid.Column="0" Grid.Row="0" HorizontalOptions="EndAndExpand" VerticalOptions="FillAndExpand"? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? IsScanning="{Binding IsScanning}"? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? IsAnalyzing="{Binding IsAnalyzing}"? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Result="{Binding Result, Mode=TwoWay}"? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ScanResultCommand="{Binding CmdScanResult}"? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Options="{Binding ScannerOptions}"? ? ? ? />? ? ? ? <forms:ZXingDefaultOverlay Grid.Column="0" Grid.Row="0"? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?TopText="Some title"? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?ShowFlashButton="False"? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?BottomText="Some bottom text"? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Opacity="0.9"/>? ? </Grid></ContentPage.Content>有人在我的代碼中發(fā)現(xiàn)問題,或者對(duì)如何做得更好或至少讓它工作有一些建議嗎?
查看完整描述

1 回答

?
慕尼黑5688855

TA貢獻(xiàn)1848條經(jīng)驗(yàn) 獲得超2個(gè)贊

原因:您將ZXingScannerViewZXingDefaultOverlay放在網(wǎng)格的同一單元格中。然后將ZXingScannerView設(shè)置HorizontalOptions為 。EndAndExpand

解決方案:

HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"


查看完整回答
反對(duì) 回復(fù) 2023-06-25
  • 1 回答
  • 0 關(guān)注
  • 122 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)