Code example for ListFragment

Methods: onActivityCreated, setHasOptionsMenu

0
 
public abstract class PagerListFragment extends ListFragment implements PagerItem {
 
	@Override 
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);
		setHasOptionsMenu(true);
	} 
 
	@Override 
	public ActionList getActions() { 
		return null; 
	} 
 
	@Override 
	public void pageIsActive(CpuTunerViewpagerActivity cpuTunerViewpagerActivity) {
		if (!SettingsStorage.getInstance(getActivity()).hasHoloTheme()) {
			ActionList actions = getActions();
			if (actions != null) {
				ActionBarWrapper actionBarWrapper = cpuTunerViewpagerActivity.getActionBarWrapper();
				actionBarWrapper.removeAllActions();