Search in sources :

Example 91 with MenuInflater

use of android.view.MenuInflater in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class SettingsActivity method onCreateOptionsMenu.

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    if (!mDisplaySearch) {
        return false;
    }
    MenuInflater inflater = getMenuInflater();
    inflater.inflate(R.menu.options_menu, menu);
    // Cache the search query (can be overriden by the OnQueryTextListener)
    final String query = mSearchQuery;
    mSearchMenuItem = menu.findItem(R.id.search);
    mSearchView = (SearchView) mSearchMenuItem.getActionView();
    if (mSearchMenuItem == null || mSearchView == null) {
        return false;
    }
    if (mSearchResultsFragment != null) {
        mSearchResultsFragment.setSearchView(mSearchView);
    }
    mSearchMenuItem.setOnActionExpandListener(this);
    mSearchView.setOnQueryTextListener(this);
    mSearchView.setOnCloseListener(this);
    if (mSearchMenuItemExpanded) {
        mSearchMenuItem.expandActionView();
    }
    mSearchView.setQuery(query, true);
    return true;
}
Also used : MenuInflater(android.view.MenuInflater)

Example 92 with MenuInflater

use of android.view.MenuInflater in project Bitocle by mthli.

the class WebViewActivity method onCreateOptionsMenu.

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

Example 93 with MenuInflater

use of android.view.MenuInflater in project android-player-samples by BrightcoveOS.

the class MainActivity method onCreateOptionsMenu.

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

Example 94 with MenuInflater

use of android.view.MenuInflater in project Aegis by Decad3nce.

the class RegisterActivity method onPrepareOptionsMenu.

@Override
public boolean onPrepareOptionsMenu(Menu menu) {
    super.onPrepareOptionsMenu(menu);
    menu.clear();
    MenuInflater inflater = getMenuInflater();
    inflater.inflate(R.menu.register_menu, menu);
    registerScreen = (Button) menu.findItem(R.id.confirm_password_settings).getActionView().findViewById(R.id.btnRegister);
    registerScreen.setTypeface(tf);
    registerScreen.setOnClickListener(confirmPasswordsListener);
    return true;
}
Also used : MenuInflater(android.view.MenuInflater)

Example 95 with MenuInflater

use of android.view.MenuInflater in project android_packages_apps_Torch by CyanogenMod.

the class WidgetOptionsActivity method onCreateOptionsMenu.

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