Search in sources :

Example 56 with MenuInflater

use of android.view.MenuInflater in project jmonkeyengine by jMonkeyEngine.

the class MainActivity method onCreateOptionsMenu.

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    MenuInflater inflater = getMenuInflater();
    inflater.inflate(R.menu.menu_items, menu);
    return true;
}
Also used : MenuInflater(android.view.MenuInflater)

Example 57 with MenuInflater

use of android.view.MenuInflater in project jmonkeyengine by jMonkeyEngine.

the class TestActivity method onCreateOptionsMenu.

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    MenuInflater inflater = getMenuInflater();
    inflater.inflate(R.menu.test_menu_items, menu);
    return true;
}
Also used : MenuInflater(android.view.MenuInflater)

Example 58 with MenuInflater

use of android.view.MenuInflater in project Talon-for-Twitter by klinker24.

the class ListsActivity method onCreateOptionsMenu.

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    MenuInflater inflater = getMenuInflater();
    inflater.inflate(R.menu.list_activity, menu);
    return super.onCreateOptionsMenu(menu);
}
Also used : MenuInflater(android.view.MenuInflater)

Example 59 with MenuInflater

use of android.view.MenuInflater in project Talon-for-Twitter by klinker24.

the class SearchPager method onCreateOptionsMenu.

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    MenuInflater inflater = getMenuInflater();
    inflater.inflate(R.menu.search_activity, menu);
    // Get the SearchView and set the searchable configuration
    SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);
    searchView = (SearchView) menu.findItem(R.id.menu_search).getActionView();
    // Assumes current activity is the searchable activity
    searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName()));
    searchView.setIconifiedByDefault(true);
    int searchImgId = getResources().getIdentifier("android:id/search_button", null, null);
    ImageView view = (ImageView) searchView.findViewById(searchImgId);
    view.setImageResource(settings.theme == AppSettings.THEME_LIGHT ? R.drawable.ic_action_search_light : R.drawable.ic_action_search_dark);
    return true;
}
Also used : MenuInflater(android.view.MenuInflater) SearchManager(android.app.SearchManager) ImageView(android.widget.ImageView)

Example 60 with MenuInflater

use of android.view.MenuInflater in project Talon-for-Twitter by klinker24.

the class PhotoViewerActivity method onCreateOptionsMenu.

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    MenuInflater inflater = getMenuInflater();
    inflater.inflate(R.menu.photo_viewer, menu);
    return super.onCreateOptionsMenu(menu);
}
Also used : MenuInflater(android.view.MenuInflater)

Aggregations

MenuInflater (android.view.MenuInflater)304 MenuItem (android.view.MenuItem)32 View (android.view.View)16 Intent (android.content.Intent)12 AdapterView (android.widget.AdapterView)12 SearchView (android.support.v7.widget.SearchView)11 PopupMenu (android.widget.PopupMenu)10 TextView (android.widget.TextView)10 Menu (android.view.Menu)9 IconicsDrawable (com.mikepenz.iconics.IconicsDrawable)9 ListView (android.widget.ListView)8 SearchManager (android.app.SearchManager)6 Point (android.graphics.Point)5 AdapterContextMenuInfo (android.widget.AdapterView.AdapterContextMenuInfo)5 ImageView (android.widget.ImageView)5 MenuBuilder (com.android.internal.view.menu.MenuBuilder)5 ActionBar (android.app.ActionBar)4 Cursor (android.database.Cursor)4 MenuBuilder (android.support.v7.view.menu.MenuBuilder)4 SpannableString (android.text.SpannableString)4