FAQ Database Discussion Community


Popupmenu wont work in java?

java,swing,listener,popupmenu
i am constructing a word processor program as an assignment for my Java class in school and i am having a really hard time getting the popupmenu to work when i right click on my text area. I have already constructed the popup menu and have my textarea listening to...

Java AWT - Add a popupMenu to a Panel / Frame without Layout

java,user-interface,awt,popupmenu
I need to create a GUI which has to provide a PopupMenu. I managed to do this but it only appears if I set the Layout null - In this case there is the problem, that none of my features appears only the popupmenu. I am not allowed to use...

How to set a custom color for the popup of action items, including of the overflow menu?

android,android-actionbar,android-support-library,popupmenu,overflow-menu
Background I'm working on adding some material design style for an app, so I've chosen a different color for the action bar and status bar. The problem For this, the theme of the app is of "Theme.AppCompat.Light.DarkActionBar", and added this to hide the action bar as I need to handle...

How can I stylize my menuPopup, to look like the menu popup for powering down?

java,android,android-layout,android-activity,popupmenu
I have used menuPopups briefly before, but I've never figured out how to stylize them. I would like my menuPopup below, to look like this screenshot of the android power down menuPopup below The features of the menu popup below to which I would like mine to posses (but so...

remove popup menu item programmatically

android,xml,popupmenu
I'm inflating a popup menu in my application. I've created a popmenu xml like below. Song_popup xml <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" style="@style/ToolBarStyle"> <item android:id="@+id/add_queue" android:title="Add to queue" /> <item android:id="@+id/play_next" android:title="Add to favourite" /> <item android:id="@+id/add_download" android:title="Download" /> </menu> Now i want to remove a item by checking a...

anchor popup menu over overflow button

android,android-actionbar,android-menu,popupmenu,overflow-menu
I'm trying to create a custom popup menu that I would like to position on the overflow menu button of the actionbar (am using a Toolbar with setSupportActionBar() for this if it matters). I found out that this can be done with the setAnchorView() (from reading Custom Menu item in...

Update the ListView after renaming a ListView item within a Popup Menu in a BaseAdapter in Android

android,listview,android-listview,android-arrayadapter,popupmenu
I have a ListView which has a custom Adapter and a PopupMenu giving some options on the list item, including a rename option. After renaming the list item I want to refresh the ListView and display the renamed list item also. Following is my code. DocumentsFragment public class DocumentsFragment extends...

How to force PopupMenu to overlap anchor?

android,recyclerview,popupmenu
How to force PopupMenu to overlap anchor? I would like to recreate something similar to this: ...

PopupMenu is not positioned properly inside RecyclerView

java,android,imageview,recyclerview,popupmenu
I'm making an Android app to load data into a RecyclerView with an ImageView inside as the overflow button. When users click it, a PopupMenu is displayed with options to choose. I had managed to show it but the position does not seem right. Please look at the screenshots. Only...

SetEnabled(true) in Popup Menu items is not working

android,spinner,popupmenu
In my app I have a spinner that the user fills it with phone numbers. The user have 3 options : Add - Edit - Delete. For displaying the options i used popupMenu. So, in the beginnging when the spinner in empty, the options Edit & Delete are enabled (defined...

Handling popup menu items click

android,onitemclicklistener,popupmenu
I've implemented a popup menu to my android application. I've created a xml for popup menu and code also works fine. Now what i cant figure out is how to handle popup menu items click. I've tried using PopupMenu.OnMenuItemClickListener but was not successful. How can i do this? My code...

TPopupmenu Ownerdraw

delphi,delphi-2010,popupmenu,ownerdraw
i set the Popupmenu OwnerDraw property True but there is no "OnOwnerDraw" event neither in the object inspector nor .OnOwnerDraw property in the code ! using Delphi 2010 ...