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