Example usage for android.view MenuInflater inflate

List of usage examples for android.view MenuInflater inflate

Introduction

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

Prototype

public void inflate(@MenuRes int menuRes, Menu menu) 

Source Link

Document

Inflate a menu hierarchy from the specified XML resource.

Usage

From source file:org.traccar.manager.MainFragment.java

@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
    inflater.inflate(R.menu.main, menu);
}

From source file:com.glasshack.checkmymath.CheckMyMath.java

@Override
public boolean onCreateOptionsMenu(Menu menu) {

    MenuInflater inflater = getMenuInflater();
    inflater.inflate(R.menu.checkmymath, menu);
    return true;/*from w ww.  j a v a  2  s.  co  m*/
}

From source file:com.android.inputmethod.latin.settings.CustomInputStyleSettingsFragment.java

@Override
public void onCreateOptionsMenu(final Menu menu, final MenuInflater inflater) {
    inflater.inflate(R.menu.add_style, menu);
}

From source file:aleajactatest.appiumcalculator.CalculatorActivity.java

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    MenuInflater inflater = getMenuInflater();
    inflater.inflate(R.menu.dummy_menu, menu);
    return true;//from ww  w . j  a  v a  2s  .co  m
}

From source file:ca.ualberta.cmput301.t03.inventory.BrowseInventoryFragment.java

@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
    super.onCreateOptionsMenu(menu, inflater);
    inflater.inflate(R.menu.inventory_filter_menu_items, menu);
}

From source file:app.com.example.android.sunshine.ForecastFragment.java

@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
    inflater.inflate(R.menu.forecast_fragment, menu);

}

From source file:com.example.android.sunshine.app.ForecastFragment.java

@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
    inflater.inflate(R.menu.forecastfragment, menu);
}

From source file:app.hacked.ProjectListFragment.java

@Override
public void onCreateOptionsMenu(final Menu menu, final MenuInflater inflater) {
    inflater.inflate(R.menu.projects, menu);
    super.onCreateOptionsMenu(menu, inflater);
}

From source file:app.com.oz_heng.android.sunshine.DetailFragment.java

@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
    // Inflate the menu; this adds items to the action bar if it is present.
    inflater.inflate(R.menu.detail_fragment, menu);

    // Retrieve the share menu item
    MenuItem menuItem = menu.findItem(R.id.action_share);

    // Get the provider and hold onto it to set/change the share intent.
    mShareActionProvider = (ShareActionProvider) MenuItemCompat.getActionProvider(menuItem);

    // If onLoadFinished happens before this, we can go ahead and set the share intent now.
    if (mForecast != null) {
        mShareActionProvider.setShareIntent(createShareForecastIntent());
    }// ww  w . ja  v a  2  s . c  om
}

From source file:br.com.dgimenes.sunshine.DetailFragment.java

@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
    // Inflate the menu; this adds items to the action bar if it is present.
    inflater.inflate(R.menu.detailfragment, menu);

    // Retrieve the share menu item
    MenuItem menuItem = menu.findItem(R.id.action_share);

    // Get the provider and hold onto it to set/change the share intent.
    mShareActionProvider = (ShareActionProvider) MenuItemCompat.getActionProvider(menuItem);

    // If onLoadFinished happens before this, we can go ahead and set the share intent now.
    if (mForecast != null) {
        mShareActionProvider.setShareIntent(createShareForecastIntent());
    }/*from ww w . java2  s.  c o m*/
}