I developed a Xamarin Forms application with a Portable Class Library. The orientation of my app is landscape. So whenever my screen goes black and I return to my app, the screen is 'reseted'. In my application, buttons change color by pressing them. Is there a possibility to save the state of the buttons, such as with the OnSaveInstanceState in Android?
Asked
Active
Viewed 732 times
1 Answers
1
Just follow this guide. It is pretty simple, just add
[Activity (Label = "ActivityName", ConfigurationChanges=Android.Content.PM.ConfigChanges.Orientation | Android.Content.PM.ConfigChanges.ScreenSize)]
above your activity :)

jdstaerk
- 882
- 1
- 13
- 30
-
The property ConfigurationChanges indeed solved my problem. Thx @DDerTyp – NiAu Mar 10 '17 at 12:45