Skip to content

Commit

Permalink
Hide settings menu item in statistics fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinStyk committed Sep 22, 2017
1 parent 1db52c9 commit e7ccb02
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import android.support.v4.app.LoaderManager;
import android.support.v4.content.Loader;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.View;
import android.view.ViewGroup;

Expand Down Expand Up @@ -60,9 +62,16 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa

getLoaderManager().initLoader(StatisticsLoader.ID, args, this);

setHasOptionsMenu(true);

return binding.getRoot();
}

@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
menu.getItem(0).setVisible(false);
}

@Override
public void onDestroyView() {
super.onDestroyView();
Expand Down

0 comments on commit e7ccb02

Please sign in to comment.