Example usage for android.view MenuInflater MenuInflater

List of usage examples for android.view MenuInflater MenuInflater

Introduction

In this page you can find the example usage for android.view MenuInflater MenuInflater.

Prototype

public MenuInflater(Context context, Object realOwner) 

Source Link

Document

Constructs a menu inflater.

Usage

From source file:android.app.Activity.java

/**
 * Returns a {@link MenuInflater} with this context.
 *//*www .java 2 s .co m*/
public MenuInflater getMenuInflater() {
    // Make sure that action views can get an appropriate theme.
    if (mMenuInflater == null) {
        initActionBar();
        if (mActionBar != null) {
            mMenuInflater = new MenuInflater(mActionBar.getThemedContext(), this);
        } else {
            mMenuInflater = new MenuInflater(this);
        }
    }
    return mMenuInflater;
}