Feb 12 2020 10:17 AM - edited Feb 12 2020 10:17 AM
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 will not be valled and the values of DualScreenInfo.Current will not be updated if the app changes from single pane to dual pane (wide) mode.
Instead, only the OnAppearing() method will be called if I drag and drop the app between the screens.
Does anyone know what I'm missing that this behavior happens?
Thanks!
Feb 12 2020 02:07 PM - edited Feb 12 2020 02:10 PM
Solution@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
Feb 13 2020 09:40 AM
Great, thanks, it works now. I forgot two of the four Config values. :)