Forum Discussion

tscholze's avatar
tscholze
Iron Contributor
Feb 12, 2020
Solved

DualScreenInfo.Current.PropertyChanged will not trigger and DualScreenInfo.Current will not updated

I'm currently trying to update me existing app to use the new awesome NuGet package Xamarin.Forms.DualScreen.   It worked in most of the places but the event DualScreenInfo.Current.PropertyChanged ...
  • ShaneNeuville's avatar
    Feb 12, 2020

    tscholze Can you try adding 

    | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize


    To your MainActivity on Android?

    So you'll basically have something like this

    [Activity(Label = "Control Gallery", Icon = "@drawable/icon", Theme = "@style/MyTheme",
    MainLauncher = true, HardwareAccelerated = true, 
    ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize)]]
    public partial class Activity1 : FormsAppCompatActivity

Resources