@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
+ /* When you are in LogFragmentInternal screen and you rotate the device
+ * you are directed to the first screen (PolicyFragment).
+ * Then you will notice that the trash menu icon still exists.
+ * This is a bug because LogFragmentInternal's menu is loaded.
+ * So, clear any previously loaded menu before load this one.
+ */
+ menu.clear();
+
super.onCreateOptionsMenu(menu, inflater);
MenuInflater mi = new MenuInflater(getActivity());
mi.inflate(R.menu.main, menu);