} else { // Form data is off.
// Turn the form data switch to off.
formDataSwitch.setChecked(false);
// Set the icon according to the theme. Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
} else { // Form data is off.
// Turn the form data switch to off.
formDataSwitch.setChecked(false);
// Set the icon according to the theme. Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {