- // Get the current theme status.
- int currentThemeStatus = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
-
- // Set the delete icon according to the theme.
- if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
- DomainsActivity.deleteMenuItem.setIcon(R.drawable.delete_night);
- } else {
- DomainsActivity.deleteMenuItem.setIcon(R.drawable.delete_day);
- }