Search in sources :

Example 71 with MenuInflater

use of android.view.MenuInflater in project Carbon by ZieIony.

the class BottomBar method setMenu.

public void setMenu(int resId) {
    Menu menu = new MenuBuilder(new CarbonContextWrapper(getContext()));
    MenuInflater inflater = new MenuInflater(getContext());
    inflater.inflate(resId, menu);
    setMenu(menu);
}
Also used : MenuInflater(android.view.MenuInflater) CarbonContextWrapper(carbon.CarbonContextWrapper) Menu(android.view.Menu) MenuBuilder(android.support.v7.view.menu.MenuBuilder)

Example 72 with MenuInflater

use of android.view.MenuInflater in project remusic by aa112901.

the class SelectActivity method onCreateOptionsMenu.

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    final MenuInflater inflater = getMenuInflater();
    inflater.inflate(R.menu.down, menu);
    MenuItem down = menu.findItem(R.id.down);
    down.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {

        @Override
        public boolean onMenuItemClick(MenuItem item) {
            Intent intent = new Intent(SelectActivity.this, DownActivity.class);
            startActivity(intent);
            return false;
        }
    });
    return true;
}
Also used : MenuInflater(android.view.MenuInflater) MenuItem(android.view.MenuItem) Intent(android.content.Intent)

Example 73 with MenuInflater

use of android.view.MenuInflater in project remusic by aa112901.

the class RankPlaylistActivity method onCreateOptionsMenu.

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

Example 74 with MenuInflater

use of android.view.MenuInflater in project NewPipe by TeamNewPipe.

the class DownloadActivity method onCreateOptionsMenu.

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

Example 75 with MenuInflater

use of android.view.MenuInflater in project NewPipe by TeamNewPipe.

the class MainActivity method onCreateOptionsMenu.

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