Text input Edit text Set Error handling Device rotation

127 views Asked by At

am setting Error on an edit text for validation. However, if device is rotated then the existing style goes off and new style appears in edit text.

Is it something I need to do in OnSavedstate method or is there any work around for this..!

1

There are 1 answers

0
Tech Cruize On BEST ANSWER

I Solved it myself here is what i have done. Decorate Activity with

ConfigurationChanges = Android.Content.PM.ConfigChanges.Orientation | 
Android.Content.PM.ConfigChanges.ScreenSize

This can prevent an Activity from being restarted when the orientation changes by setting ConfigurationChanges in the ActivityAttribute