Search in sources :

Example 11 with MenuInflater

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

the class Hijacker method onCreateOptionsMenu.

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

Example 12 with MenuInflater

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

the class HijackerWebView method onCreateOptionsMenu.

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

Example 13 with MenuInflater

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

the class AbstractDragDropDemoActivity method onCreateOptionsMenu.

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    new MenuInflater(this).inflate(R.menu.actions, menu);
    MenuItem item = menu.findItem(getOwnMenuId());
    if (item != null) {
        item.setVisible(false);
    }
    return (super.onCreateOptionsMenu(menu));
}
Also used : MenuInflater(android.view.MenuInflater) MenuItem(android.view.MenuItem)

Example 14 with MenuInflater

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

the class InflationDemo method onCreateOptionsMenu.

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    new MenuInflater(this).inflate(R.menu.option, menu);
    EditText add = (EditText) menu.findItem(R.id.add).getActionView().findViewById(R.id.title);
    add.setOnEditorActionListener(onSearch);
    return (super.onCreateOptionsMenu(menu));
}
Also used : EditText(android.widget.EditText) MenuInflater(android.view.MenuInflater)

Example 15 with MenuInflater

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

the class InflationDemo 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 = HoneycombHelper.getAddActionView(menu);
        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) AdapterView(android.widget.AdapterView)

Aggregations

MenuInflater (android.view.MenuInflater)283 MenuItem (android.view.MenuItem)26 Intent (android.content.Intent)11 View (android.view.View)11 SearchView (android.support.v7.widget.SearchView)10 IconicsDrawable (com.mikepenz.iconics.IconicsDrawable)9 Menu (android.view.Menu)8 AdapterView (android.widget.AdapterView)8 SearchManager (android.app.SearchManager)5 Point (android.graphics.Point)5 TextView (android.widget.TextView)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 AdapterContextMenuInfo (android.widget.AdapterView.AdapterContextMenuInfo)4 EditText (android.widget.EditText)4 ImageView (android.widget.ImageView)4 ListView (android.widget.ListView)4