Can anyone see why my help icon isn't showing in the action bar? I have pasted the relevant parts of my code below
Thank you
menu topline.xml:
`
<item
android:id="#+id/gohome_id"
android:title="Home"
trial10:showAsAction="ifRoom"
/>
<item
android:id="#+id/helpme_id"
android:title="help"
android:icon="#drawable/ic_questionmark"
android:orderInCategory="200"
trial10:showAsAction="always"
/>
`
styles.xml:
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
</style>
<style name="CustomActionBarTheme"
parent="#android:style/Theme.Holo.Light.DarkActionBar">
<item name="android:actionBarStyle">#style/MyActionBar</item>
</style>
<style name="MyActionBar"
parent="#android:style/Widget.Holo.Light.ActionBar.Solid.Inverse">
<item name="android:background">#drawable/logo3</item>
<item name="android:icon">#drawable/leaflogo</item>
</style>
<style name="orangestyle" parent="#android:style/Theme.NoTitleBar">
<item name="android:windowBackground">#color/orange</item>
</style>'
This is in my activity java:
#Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.topline, menu);
return true;
}
#Override
public boolean onOptionsItemSelected(MenuItem item) {
super.onOptionsItemSelected(item);
switch(item.getItemId()){
case R.id.gohome_id:
gohome();
break;
}
return true;
}
finally, my Manifest:
<activity
android:name=".test1"
android:label="Test"
android:theme="#style/CustomActionBarTheme" >
</activity>
try this
<item
android:id="#+id/gohome_id"
android:title="Home"
android:showAsAction="ifRoom"
/>
<item
android:id="#+id/helpme_id"
android:title="help"
android:icon="#drawable/ic_questionmark"
android:showAsAction="always"
/>
Did you put your item in a menu tag?
<menu ....>
<item.../>
<item.../>
</menu>
If yes, change trial10:showAsAction with app:showAsAction. Just alt enter if there's an error on app.
Also delete that order line from home item
Related
I want to make my Contextual Action Bar show a close icon other than the back arrow, but I'm not succeeding.
To do this, I have changed the actionModeCloseDrawable property in my styles.xml file: <item name="actionModeCloseDrawable">#drawable/ic_baseline_close_24</item>, but it is not working, as you can see in the image below:
This is my code at styles.xml:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.Material3.Dark.NoActionBar">
<!-- Customize your theme here. -->
<item name="fontFamily">#font/roboto_regular</item>
<item name="actionBarTheme">#style/ThemeOverlay.Material3.Dark.ActionBar</item>
<item name="colorPrimary">#color/colorPrimary</item>
<item name="colorPrimaryDark">#color/colorPrimaryDark</item>
<item name="colorAccent">#color/colorAccent</item>
<item name="windowActionModeOverlay">true</item>
<item name="actionModeStyle">#style/Widget.App.ActionMode</item>
<item name="actionModeCloseDrawable">#drawable/ic_baseline_close_24</item>
<item name="colorSurface">#color/design_default_color_surface</item>
<item name="materialCalendarStyle">#style/Widget.MaterialComponents.MaterialCalendar</item>
<item name="materialCalendarFullscreenTheme">#style/ThemeOverlay.MaterialComponents.MaterialCalendar.Fullscreen</item>
<item name="materialCalendarTheme">#style/ThemeOverlay.MaterialComponents.MaterialCalendar</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.MaterialComponents.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.Material3.Light" />
<style name="CustomTextAppearance" parent="TextAppearance.Material3.BodyMedium">
<item name="android:textColor">#color/colorBreviario</item>
</style>
<style name="Widget.App.ActionMode" parent="Widget.AppCompat.ActionMode">
<item name="titleTextStyle">?attr/textAppearanceHeadline6</item>
<item name="subtitleTextStyle">?attr/textAppearanceSubtitle1</item>
<item name="background">#color/material_grey_900</item>
<item name="actionModeCloseDrawable">#drawable/ic_baseline_close_24</item>
<item name="colorPrimary">#color/colorPrimary</item>
<item name="colorPrimaryDark">#color/colorPrimaryDark</item>
<item name="toolbarStyle">#style/Widget.MaterialComponents.Toolbar.PrimarySurface</item>
<item name="materialCalendarStyle">#style/Widget.MaterialComponents.MaterialCalendar</item>
<item name="materialCalendarFullscreenTheme">#style/ThemeOverlay.MaterialComponents.MaterialCalendar.Fullscreen</item>
<item name="materialCalendarTheme">#style/ThemeOverlay.MaterialComponents.MaterialCalendar</item>
</style>
</resources>
How it's not working?
If I try this:
#Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == R.id.item_voz) {
if (mActionMode == null) {
//mActionMode = getActivity().startActionMode(mActionModeCallback);
mActionMode = ((AppCompatActivity)getActivity()).startSupportActionMode((androidx.appcompat.view.ActionMode.Callback) mActionModeCallback);
}
getActivity().invalidateOptionsMenu();
return true;
}
I'm having this error:
java.lang.ClassCastException:
org.mi.app.ui.fragments.HomiliasFragment$1 cannot be cast to
androidx.appcompat.view.ActionMode$Callback
at org.mi.app.ui.fragments.HomiliasFragment.onOptionsItemSelected(HomiliasFragment.java:127)
at androidx.fragment.app.Fragment.performOptionsItemSelected(Fragment.java:3154)
at androidx.fragment.app.FragmentManager.dispatchOptionsItemSelected(FragmentManager.java:2937)
at androidx.fragment.app.Fragment.performOptionsItemSelected(Fragment.java:3158)
at androidx.fragment.app.FragmentManager.dispatchOptionsItemSelected(FragmentManager.java:2937)
at androidx.fragment.app.FragmentController.dispatchOptionsItemSelected(FragmentController.java:427)
at androidx.fragment.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:334)
at androidx.appcompat.app.AppCompatActivity.onMenuItemSelected(AppCompatActivity.java:264)
at androidx.appcompat.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:109)
at androidx.appcompat.app.ToolbarActionBar$2.onMenuItemClick(ToolbarActionBar.java:66)
at androidx.appcompat.widget.Toolbar$1.onMenuItemClick(Toolbar.java:221)
at androidx.appcompat.widget.ActionMenuView$MenuBuilderCallback.onMenuItemSelected(ActionMenuView.java:781)
at androidx.appcompat.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:834)
at androidx.appcompat.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:158)
This is my callback:
private final ActionMode.Callback mActionModeCallback = new ActionMode.Callback() {
#Override
public boolean onActionItemClicked(ActionMode mode, MenuItem item) {
// ...
}
// ...
}
How about using a Toolbar? androidx.appcompat.widget.Toolbar has this method:
public void setNavigationIcon(#DrawableRes int resId)
Maybe activity.actionBar.setHomeAsUpIndicator(R.id.back)
I am using the appcompat-v7 toolbar and added some menu with icons.
My menu_items.xml
<item
android:id="#+id/quit"
android:title="Quit"
android:icon="#drawable/ic_power"
android:orderInCategory="700"
app:showAsAction="never"/>
<item
android:id="#+id/app_settings"
android:orderInCategory="600"
android:icon="#drawable/ic_cog"
app:showAsAction="never"
android:title="Settings"/>
<item
android:id="#+id/help"
android:orderInCategory="500"
android:title="Help"
android:icon="#drawable/ic_help"
app:showAsAction="always" />
<item
android:id="#+id/logout"
android:orderInCategory="400"
android:title="Logout"
android:icon="#drawable/ic_logout"
app:showAsAction="ifRoom" />
<item
android:id="#+id/tip"
android:orderInCategory="300"
android:title="Give Tip"
android:icon="#drawable/ic_coffee"
app:showAsAction="ifRoom" />
<item
android:id="#+id/withdraw"
android:orderInCategory="200"
android:title="Withdraw"
android:icon="#drawable/ic_bank"
app:showAsAction="ifRoom" />
<item
android:id="#+id/deposit"
android:orderInCategory="100"
android:title="Deposit"
android:icon="#drawable/ic_cash_multiple"
app:showAsAction="ifRoom" />
The icons are originally black but i was expecting it to appear as white on the toolbar if I use the
app:theme="#style/ThemeOverlay.AppCompat.Dark.ActionBar"
Instead it shows black icons.
My toolbar.xml
<android.support.v7.widget.Toolbar
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="#+id/toolbar"
android:layout_height="?attr/actionBarSize"
android:layout_width="match_parent"
app:theme="#style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="#style/ThemeOverlay.AppCompat.Light"
android:background="?attr/colorPrimary"/>
How can I make the icons appear white?
Edit:
The icons shown on the toolbar are the only icons i want to change color.. Not all the icons, including the overflowed item's icon...
you can set manually like this
#Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_main, menu);
for(int i = 0; i < menu.size(); i++){
Drawable drawable = menu.getItem(i).getIcon();
if(drawable != null) {
drawable.mutate();
drawable.setColorFilter(getResources().getColor(R.color.whiteColor), PorterDuff.Mode.SRC_ATOP);
}
}
return true;
}
for particular icon:
MenuItem favoriteItem = menu.findItem(R.id.action_favorite);
Drawable newIcon = (Drawable)favoriteItem.getIcon();
newIcon.mutate().setColorFilter(Color.argb(255, 200, 200, 200), PorterDuff.Mode.SRC_IN);
favoriteItem.setIcon(newIcon);
if your orientation changing runtime then you can check orientation using condition and set menu color in this condition.
like this:
#Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
// Checks the orientation of the screen
if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {
Toast.makeText(this, "landscape", Toast.LENGTH_SHORT).show();
// here you can set menu item color if it landScape
} else if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT){
Toast.makeText(this, "portrait", Toast.LENGTH_SHORT).show();
}
}
or if you dont want to rotate your screen, you can simply set in manifest file like this:
<activity android:name=".activities.MainActivity"
android:screenOrientation="portrait">
or you can use itemIconTint for particular items:
<item
android:id="#+id/quit"
android:title="Quit"
android:icon="#drawable/ic_power"
android:orderInCategory="700"
**app:itemIconTint="#color/black"**
app:showAsAction="never"/>
<item
android:id="#+id/app_settings"
android:orderInCategory="600"
android:icon="#drawable/ic_cog"
app:showAsAction="never"
**app:itemIconTint="#color/black"**
android:title="Settings"/>
Your Main theme
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">#color/colorPrimary</item>
<item name="colorPrimaryDark">#color/colorPrimaryDark</item>
<item name="colorAccent">#color/colorAccent</item>
<item name="android:popupMenuStyle">#style/PopupMenu</item>
</style>
PopUp or menu item theme also if you want some more like background of popup ,size and popupmenu you can add if you want otherwise remove
<style name="PopupMenu" parent="android:Theme.Holo.Light">
<item name="android:popupBackground">#android:color/white</item>
<item name="android:textColor">#color/white</item>
<item name="android:textSize">9sp</item>
<item name="textAppearanceLargePopupMenu">#style/TextAppearance.AppCompat.Light.Widget.PopupMenu.Large</item>
<item name="textAppearanceSmallPopupMenu">#style/TextAppearance.AppCompat.Light.Widget.PopupMenu.Small</item>
</style>
Color
<color name="white">#ffffffff</color>
I want to show icon in Option Menus. I tried many methods but I can't find success.In my toolbar some icon already put but i want icon in my Option menu.
I want same as below image:-
My menu.xml:-
<menu
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".MainActivity">
<item
android:id="#+id/action_search"
android:title="#string/action_search"
android:orderInCategory="1"
android:icon="#drawable/search"
app:showAsAction="ifRoom" />
<item
android:id="#+id/action_cart"
android:title="#string/action_search"
android:orderInCategory="2"
android:icon="#drawable/shoppingcart"
android:actionLayout="#layout/feed_update_count"
app:showAsAction="ifRoom" />
<item
android:id="#+id/menu_overflow"
android:title="#string/my_cart"
android:icon="#drawable/ic"
android:orderInCategory="11111"
app:showAsAction="always">
<menu>
<item
android:id="#+id/login"
android:title="#string/login"
android:orderInCategory="1"
android:icon="#drawable/account"
app:showAsAction="always|withText"/>
<item
android:id="#+id/my_order"
android:title="#string/my_order"
android:orderInCategory="2"
android:icon="#drawable/track"
app:showAsAction="withText"/>
<item
android:id="#+id/wishlist"
android:title="#string/wishlist"
android:orderInCategory="3"
android:icon="#drawable/wishlist"
app:showAsAction="withText"/>
</menu>
</item>
</menu>
I am new in android developing anyone can help me how to show icon in option menu. Thanks in advance!
By default the overflow menu will disable the icon and only show text, you need some workaround.
1st way
You can enable it by adding the following codes into your class
#Override
public boolean onMenuOpened(int featureId, Menu menu)
{
if(featureId == Window.FEATURE_ACTION_BAR && menu != null){
if(menu.getClass().getSimpleName().equals("MenuBuilder")){
try{
Method m = menu.getClass().getDeclaredMethod(
"setOptionalIconsVisible", Boolean.TYPE);
m.setAccessible(true);
m.invoke(menu, true);
}
catch(NoSuchMethodException e){
Log.e(TAG, "onMenuOpened", e);
}
catch(Exception e){
throw new RuntimeException(e);
}
}
}
return super.onMenuOpened(featureId, menu);
}
2nd way
Create your own overflow item and a nested menu to show both the icon and the text.
Example,
<item
android:id="#+id/overflow"
android:icon="#drawable/ic_overflow_white"
android:orderInCategory="201"
android:title="#string/overflow"
app:showAsAction="always">
<menu>
<item
android:id="#+id/cab_menu_select_all"
android:icon="#drawable/ic_select_all_grey"
android:orderInCategory="100"
android:title="#string/cab_menu_select_all"
app:showAsAction="always|withText"></item>
</menu>
</item>
try this code its works for you
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:id="#+id/action_search"
android:icon="#drawable/ic_action_search"
android:showAsAction="always"
android:title="#string/action_search"/>
<!-- Settings, should always be in the overflow -->
<item
android:id="#+id/action_location_found"
android:icon="#drawable/ic_action_location_found"
android:showAsAction="always"
android:title="#string/action_location_found"/>
<item
android:id="#+id/menu_overflow"
android:icon="#drawable/ic_action_menu"
android:orderInCategory="11111"
android:showAsAction="always">
<menu>
<!-- Refresh -->
<item
android:id="#+id/action_refresh"
android:icon="#drawable/ic_action_refresh"
android:showAsAction="ifRoom"
android:title="#string/action_refresh"/>
<!-- Help -->
<item
android:id="#+id/action_help"
android:icon="#drawable/ic_action_help"
android:showAsAction="never"
android:title="#string/action_help"/>
<!-- Check updates -->
<item
android:id="#+id/action_check_updates"
android:icon="#drawable/ic_action_refresh"
android:showAsAction="never"
android:title="#string/action_check_updates"/>
</menu>
</item>
</menu>
- See more at: http://www.theappguruz.com/blog/android-working-android-actionbar#sthash.ArNQTEBF.dpuf
Create your menu xml as follow
<item
android:id="#+id/menu_item_action_parameters"
android:title="#string/text_parameters"
android:icon="#drawable/ic_menu_parameter"
app:showAsAction="ifRoom|withText"/> >
<menu>
<item
android:id="#+id/action_dropdown1"
android:title="#string/dropdown_1" />
<item
android:id="#+id/action_dropdown2"
android:title="#string/dropdown2" />
<item
android:id="#+id/action_dropdown3"
android:title="#string/dropdown3" />
</menu>
</item>
<item
more item
</item>
Then
#Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
switch (id) {
case R.id.action_dropdown1:
.....
return true;
case R.id.action_dropdown2:
.....
return true;
.....
default:
return super.onOptionsItemSelected(item);
}
}
this is completely working code.Mark this answer up if it helps. :) Happy coding.
you Need to add tools:context="your class" to menu tag
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".activities.BaseActivity">
<item
android:id="#+id/action_notification1"
android:icon="#drawable/one"
android:title="action_notification"
app:showAsAction="always"/>
<item
android:id="#+id/action_notification2"
android:icon="#drawable/two"
android:title="action_notification"
app:showAsAction="always"/>
<item
android:id="#+id/action_notification3"
android:icon="#drawable/three"
android:title="action_notification"
app:showAsAction="always"/>
</menu>
#Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.main, menu);
return super.onCreateOptionsMenu(menu);
}
you shold write tool:context to menu tag then run you will get icons to your text
I need to change color of PopMenu (Setting). I updated style.xml but didn't work. Then a try to change color of Item, didn't work too.
I need a little grey background and white TextColor.
MyActivity.java extends ActionBarActivity
#Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.main, menu);
MenuItem item = menu.findItem(R.id.file);
mShareActionProvider = (ShareActionProvider) MenuItemCompat.getActionProvider(item);
mShareActionProvider.setOnShareTargetSelectedListener(this);
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
#Override
public boolean onMenuItemClick(MenuItem item) {
openShare();
return false;
}
});
return true;
}
MyActivity_layout.xml
<android.support.v7.widget.Toolbar
android:id="#+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#color/action_bar_background"
app:theme="#style/ToolbarTheme"
app:popupTheme="#style/Theme.AppCompat"
>
main.xml(menu)
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.app.MyActivity">
<item android:id="#+id/file"
android:title="Setting"
android:icon="#drawable/ic_setting"
app:actionProviderClass=
"android.support.v7.widget.ShareActionProvider">
</item>
</menu>
styles.xml
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="Theme.AppCompat.Light.NoActionBar" parent="#style/Theme.AppCompat.Light">
<item name="android:windowNoTitle">true</item>
<item name="windowActionBar">false</item>
</style>
<style name="AppTheme.Base" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">#color/primary</item>
<item name="colorPrimaryDark">#color/primaryDark</item>
<item name="android:popupBackground">#android:color/white</item>
</style>
<style name="AppTheme" parent="AppTheme.Base">
</style>
<style name="ToolbarTheme" parent="Theme.AppCompat">
<item name="android:windowNoTitle">true</item>
<item name="android:textColorPrimary">#color/action_bar_text</item>
<item name="actionMenuTextColor">#color/action_bar_text</item>
<item name="android:textColorSecondary">#color/action_bar_text</item>
<item name="android:layout_gravity">center_horizontal</item>
</style>
</resources>
Manifest.xml
<application
android:allowBackup="true"
android:icon="#mipmap/ic_app"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
...
</application>
It's ok, i just updated :
<android.support.v7.widget.Toolbar
android:id="#+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#color/action_bar_background"
app:theme="#style/AppTheme"
app:popupTheme="#style/AppTheme"
>
i have an Activity with an Action Bar. The Action Bar PopUp Menu (that appears after clicking the overflow button) applies my defined style.
But there is a EditText View inside my Activity, that should open a popup Menu by clicking on it.
This PopUp does not apply the style.
I hope someone can help me out..
Thx!!
Theme:
<style name="MyTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- ActionBar -->
<item name="android:actionBarStyle">#style/ActionBar</item>
<item name="android:actionBarTabStyle">#style/ActionBarTabStyle</item>
<item name="android:popupMenuStyle">#style/ActionBarPopupMenu</item>
<item name="android:dropDownListViewStyle">#style/ActionBarDropDownListView</item>
<item name="android:actionBarWidgetTheme">#style/ActionBar.Theme.actionbar.widget</item>
<item name="actionMenuTextColor">#color/mytheme_white_color</item>
<item name="android:actionMenuTextColor">#color/mytheme_white_color</item>
<item name="android:actionDropDownStyle">#style/ActionBarDropDownNav</item>
<item name="android:spinnerDropDownItemStyle">#style/ActionBarDropDownItem</item>
<item name="android:titleTextStyle">#style/ActionBarTextStyle</item>
<item
name="actionBarItemBackground">#drawable/ns_actionbar_selectable_background_selector</item>
<item name="android:actionBarItemBackground">#drawable/ns_actionbar_selectable_background_selector</item>
<!-- Custom Items: -->
<item name="android:editTextStyle">#style/EditTextStyle_singleLine</item>
<item name="android:buttonStyle">#style/ButtonStyle_Default</item>
<item name="android:checkboxStyle">#style/ns_CheckBoxStyle</item>
</style>
Styles:
<style name="ActionBarPopupMenu" parent="#android:style/Widget.Holo.Light.ListPopupWindow">
<item name="android:popupBackground">#drawable/menu_dropdown_panel_actionbar</item>
<item name="android:divider">#drawable/ns_linearlayout_list_divider</item>
</style>
<style name="ActionBarDropDownListView" parent="#android:style/Widget.Holo.Light.ListView.DropDown">
<item name="android:listSelector">#drawable/selectable_background_actionbar</item>
<item name="android:divider">#drawable/ns_linearlayout_list_divider</item>
</style>
<style name="ActionBar.Theme.actionbar.widget" parent="#android:style/Theme.Holo">
<item name="android:popupMenuStyle">#style/ActionBarPopupMenu</item>
<item name="android:dropDownListViewStyle">#style/ActionBarDropDownListView</item>
<item name="android:textColor">#color/mytheme_darkblue_color</item>
<item name="android:textAllCaps">true</item>
<item name="android:textSize">#dimen/text_spinner_item</item>
</style>
Code for non workin PopUp::
public class LoginActivity extends Activity {
......
userName = (EditText) this.findViewById(R.id.txtUname);
userName.setOnClickListener(new OnClickListener() {
#Override
public void onClick(View v) {
showPopupMenu(userName);
}
});
private void showPopupMenu(View v) {
PopupMenu popupMenu = new PopupMenu(LoginActivity.this, v);
popupMenu.getMenuInflater().inflate(R.menu.test, popupMenu.getMenu());
popupMenu
.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
#Override
public boolean onMenuItemClick(MenuItem item) {
Toast.makeText(LoginActivity.this, item.toString(),
Toast.LENGTH_LONG).show();
return true;
}
});
popupMenu.show();
}
Results: