Activity onCreateOptionsMenu - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Activity onCreateOptionsMenu method.

This code example shows how to use the following methods:onCreateOptionsMenu, equals
		return mAttachedActivity;
	} 
 
	@Override 
	public void onCreateOptionsMenu(final Menu menu, final MenuInflater inflater) {
		if (mAttachedActivity == null || mAttachedActivity.equals(getActivity())) return;
		mAttachedActivity.onCreateOptionsMenu(menu);
	} 
 
	@SuppressWarnings({ "deprecation", "unchecked" }) 
	@Override 
	public View onCreateView(final LayoutInflater inflater, final ViewGroup container, final Bundle savedInstanceState) {
		final Intent intent = new Intent(getActivity(), getActivityClass());
		final Bundle args = getArguments();
		if (args != null) {
			intent.putExtras(args);
		} 
 
		final Window w = getLocalActivityManager().startActivity(ACTIVITY_TAG, intent);
		mAttachedActivity = null;
7
CodeRank

Related Activity onCreateOptionsMenu Questions & Answers:

onCreateOptionsMenu Method Overview
Initialize the contents of the Activity's standard options menu.
See Code Examples for other Android Activity Methods: