Skip to content

Dark mode on Android renders background black, making barcode unusable #1077

@Srki94

Description

@Srki94

Hi,

When using dark theme, some of the shorter barcodes use black color for background, resulting in barcode scanners not being able to read the barcode.

Take a look at this screenshot :
https://prnt.sc/Iq7D0bkRsOPB

Is there a way to force white background in the container ?

I've defined it in XAML like so :

<zxing:ZXingBarcodeImageView x:Name="BarcodeImgView" Aspect="AspectFill" BackgroundColor="White" BarcodeFormat="CODE_128" BarcodeValue="{Binding ArticleEAN}" HeightRequest="80" IsVisible="{Binding isVisible}" WidthRequest="200"> <zxing:ZXingBarcodeImageView.BarcodeOptions> <zxing1:EncodingOptions Width="200" Height="80" /> </zxing:ZXingBarcodeImageView.BarcodeOptions> </zxing:ZXingBarcodeImageView>

This is Xamarin Forms application .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions