Search in sources :

Example 36 with MenuInflater

use of android.view.MenuInflater in project android by cSploit.

the class Console method onCreateOptionsMenu.

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

Example 37 with MenuInflater

use of android.view.MenuInflater in project cw-advandroid by commonsguy.

the class ActionModeDemo method onCreateOptionsMenu.

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    new MenuInflater(this).inflate(R.menu.option, menu);
    EditText add = null;
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
        View v = menu.findItem(R.id.add).getActionView();
        if (v != null) {
            add = (EditText) v.findViewById(R.id.title);
        }
    }
    if (add != null) {
        add.setOnEditorActionListener(onSearch);
    }
    return (super.onCreateOptionsMenu(menu));
}
Also used : EditText(android.widget.EditText) MenuInflater(android.view.MenuInflater) TextView(android.widget.TextView) View(android.view.View) ListView(android.widget.ListView)

Example 38 with MenuInflater

use of android.view.MenuInflater in project cw-advandroid by commonsguy.

the class HCMultiChoiceModeListener method onCreateActionMode.

@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
    MenuInflater inflater = host.getMenuInflater();
    inflater.inflate(R.menu.context, menu);
    mode.setTitle(R.string.context_title);
    mode.setSubtitle("(1)");
    activeMode = mode;
    return (true);
}
Also used : MenuInflater(android.view.MenuInflater)

Example 39 with MenuInflater

use of android.view.MenuInflater in project android by cSploit.

the class LoginCracker method onCreateOptionsMenu.

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

Example 40 with MenuInflater

use of android.view.MenuInflater in project Klyph by jonathangerbaud.

the class PostActivity method onCreateOptionsMenu.

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    MenuInflater inflater = getMenuInflater();
    inflater.inflate(R.menu.send, menu);
    return true;
}
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