Forum Discussion
tscholze
Feb 12, 2020Iron Contributor
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 ...
- 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
ShaneNeuville
Microsoft
Feb 12, 2020tscholze 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
- tscholzeFeb 13, 2020Iron Contributor
Great, thanks, it works now. I forgot two of the four Config values. 🙂