'Android app is brighten up after keyboard is closed

This might be an emulator only issue, no reproduction on physical devices so far

We have a Xamarin.Forms App for Android and iOS. The app supports dark and light theme and follows. Most of the colors are defined in styles using the AppThemeBinding of Xamarin.Forms.

We use Material Renderers and Xamarin.Forms 5.0.0.2337 (i.e. most current).

We use the Switch control for some settings. Cause there is a dark mode bug in Xamarin renderer for switch, the Android main style parent was changed from Theme.AppCompat.Light.DarkActionBar to Theme.AppCompat.DayNight.DarkActionBar as proposed as workaround.

Now I observe this issue in Android Emulators (cannot test on real device at the moment):

  • click an Entry or Editor, soft keyboard opens
  • make some keyboard input
  • close keyboard either by "finish" button or "back" button
  • the whole app (page, controls etc.) is rendered brighter now. example: page background was #121212 before keyboard was shown and is #2f2f2f after it was shown. sometimes it needs 2 or 3 tries to reproduce
  • by clicking in another entry, the app may be rendered correct again or may be not.

The issue leaves helpless cause I do not understand what is going on.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source