List of usage examples for android.view MenuInflater inflate
public void inflate(@MenuRes int menuRes, Menu menu)
From source file:ch.ethz.twimight.activities.TwimightBaseActivity.java
/** * Populate the Options menu with the "home" option. For the "main" activity * ShowTweetListActivity we don't add the home option. *///from w w w .j a va2 s.c o m @Override public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.main_menu, menu); return true; }
From source file:com.p2c.thelife.SettingsFragment.java
@Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { inflater.inflate(R.menu.settings, menu); }
From source file:com.simplechatclient.android.ProfileRegisterFragment.java
@Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { inflater.inflate(R.menu.profile_register, menu); super.onCreateOptionsMenu(menu, inflater); }
From source file:com.davila.sunshine.app.ForecastFragment.java
@Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { inflater.inflate(R.menu.forecastfragmentmenu, menu); }
From source file:com.zsrappdev.Resume.ResumeFragment.java
@Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { inflater.inflate(R.menu.forecast_fragment, menu); }
From source file:com.codebutler.farebot.fragment.CardsFragment.java
@Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { inflater.inflate(R.menu.cards_menu, menu); }
From source file:com.krayzk9s.imgurholo.activities.ImgurHoloActivity.java
@Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); if (getApiCall().settings.getString("theme", MainActivity.HOLO_LIGHT).equals(MainActivity.HOLO_LIGHT)) inflater.inflate(R.menu.main, menu); else//from w ww. j a va 2 s .com inflater.inflate(R.menu.main_dark, menu); menu.findItem(R.id.action_settings).setVisible(true); return super.onCreateOptionsMenu(menu); }
From source file:com.abid_mujtaba.fetchheaders.MainActivity.java
@Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater menuInflater = getMenuInflater(); menuInflater.inflate(R.menu.main_menu, menu); mMenu = menu; // Store a handle to the Menu item. if (fShowSeen) { mMenu.findItem(R.id.menu_show_seen).setTitle("Hide Seen"); } // Set Menu Item Title based on fShowSeen. else {//from w w w. jav a 2s .c om mMenu.findItem(R.id.menu_show_seen).setTitle("Show Seen"); } // Since this method is called every time the activity is recreated (including when the screen is rotated we check fShowSeen and then set the menu item title return true; }
From source file:com.georgeme.Act_Circle.java
@Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.menu_app, menu); return true;//from ww w. j ava2s .co m }
From source file:com.microsoft.onedrive.apiexplorer.DeltaFragment.java
@Override public void onCreateOptionsMenu(final Menu menu, final MenuInflater inflater) { super.onCreateOptionsMenu(menu, inflater); menu.clear();//from ww w . ja v a 2 s. c o m inflater.inflate(R.menu.menu_delta_fragment, menu); }