android-optionsmenu Questions
18
Solved
I using menu drawer which has more Fragments. In some Fragments I have menu item REFRESH but in some fragments I want hide this menu item (I don't want show menu but I don't want hide ActionBar).
...
Pornocracy asked 1/2, 2014 at 13:16
4
Solved
I am using the toolbar for android.
I just want to change the background color of the overflow menu. But it is not changing.
Style xml
<style name="MyDarkToolbarStyle" parent="Widget.AppCompat...
Ventriloquism asked 17/3, 2015 at 9:41
25
Solved
I am trying to add an item to the options menu from a group of fragments.
I have created a new MenuFragment class and extended this for the fragments I wish to include the menu item in. Here is th...
Yt asked 29/11, 2011 at 9:48
3
I'm trying to show custom layout as an item in options menu.
And this is what I have done so far
<item
android:id="@+id/action_profile"
android:orderInCategory="100"
android:title="Profil...
Frivolous asked 21/2, 2016 at 11:14
4
Solved
To change the default option menu icon color(3 vertical dote), i have tried adding
<item name="android:textColorSecondary">@color/white</item>
But it doesn't make any change. I think...
Inkle asked 4/7, 2016 at 19:9
5
I have options menu item in my application. Requirement was to add a toggle button to a menu item. Is this possible?
Paripinnate asked 22/1, 2014 at 11:57
13
Solved
How to change the index icon of option menu?
I mean icon (3).
Here is my code:
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
inflater.i...
Knawel asked 10/10, 2014 at 13:22
5
I have a simple application with options menu, which changing at the start of fragments.
The problem is that at the start any fragments except first onCreateOptionsMenu() called twice - within onCr...
Truong asked 12/5, 2013 at 9:40
9
I have been searching a lot on invalidateOptionsMenu() and I know what it does. But I cannot think of any real life example where this method could be useful.
I mean, for instance, let's say we wa...
Chinkapin asked 16/1, 2015 at 12:31
4
Solved
When developing applications for ICS - the actionbar looks different depending on if there is a physical menubutton present on the device or not.
For example if not, a virtual button is displayed ...
Sitology asked 12/12, 2011 at 15:0
5
I have tried to change the background color of options menu in my android app. I am using ActionBarSherlock library. I have tried this code for changing the background color of options menu
https:...
Phallicism asked 16/11, 2012 at 11:2
2
Solved
I got an options menu with a bunch of checkboxes in it. I'd like to check a bunch of them on or off, but the menu closes automaticly every time I check just one. Can I prevent the menu from closing...
Customable asked 21/3, 2017 at 15:22
3
I have this item in my options menu:
<item
android:id="@+id/opt_mnu_action"
android:icon="@android:drawable/ic_dialog_info"
android:orderInCategory="1"
android:showAsAction="ifRoom"
androi...
A1 asked 4/10, 2013 at 14:50
1
Solved
I have a simple activity with options menu setup with the code shown below. The problem i'm experiencing is that after expanding and collapsing the searchview, menu items with app:showAsAction="ifR...
Fluecure asked 28/11, 2017 at 15:30
2
Solved
I'm trying to hide some menu items when a fragment is changed, but seems that this is not working. Here is what im doing:
Defining the menu and menu items:
@Override
public boolean onCreateOption...
Coax asked 17/10, 2014 at 7:40
2
I've seen several reports of issues where openOptionsMenu() will not work on various Android versions, eg:
openOptionsMenu() across android versions
openOptionsMenu() not working
but the issue I...
Pattipattie asked 14/9, 2015 at 23:43
2
Solved
I've got three fragments in a viewpager.
Two of these fragments have their own version of the onCreateOptionsMenu method:
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflat...
Nidorf asked 22/9, 2014 at 1:57
2
Solved
I have an app that adds items to an sqlite database and returns a cursor, this cursor is then used with a custom CursorAdapter called StoreCursorAdapter to show the items in a ListView.
There is a...
Senegambia asked 28/10, 2016 at 19:2
2
Solved
For some reason, my onCreateOptionsMenu and onPrepareOptionsMenu run twice (checked with a log input on the start of both methods). This happens for multiple fragments that I have, including some t...
Centigram asked 8/8, 2016 at 19:54
2
Solved
The onOptionsItemSelected(MenuItem item) method can be used to identify a click on each menu item. But i need to have a listener that can identify the click on the menu title (3 vertical dots at th...
Devilfish asked 4/7, 2016 at 20:28
3
Solved
I'm following a book on Android Development to get myself started writing my first real app.
I got up to the point where I'm making an options menu for one of my activities. The menu shows up, but ...
Farlee asked 18/1, 2012 at 11:2
1
Solved
I have this nav drawer which was working perfectly fine.
Refactoring my code I removed all onOptionsItemSelecteds in activities and made all activities inherit from a base activity which extends A...
Toting asked 12/4, 2016 at 10:23
11
Some users tell me about the exception the got:
java.lang.IllegalArgumentException: Invalid payload item type
at android.util.EventLog.writeEvent(Native Method)
at android.app.Activity.onMenuItemS...
Klemm asked 5/10, 2011 at 8:44
2
Solved
I cant seem to find the Menu softkey on my Nexus 9 and nexus 5 [Android Version Lollipop]. All the apps that i had developed which contained option menu are not displaying menu softkey. So i am una...
Prospero asked 12/12, 2014 at 11:27
2
I have an app with several fragments.
Only A fragment has an options menu.
A fragment could be initiated from fragment B (which extends listfragment).
So B fragment does not have an options me...
Vaulted asked 5/8, 2015 at 23:59
1 Next >
© 2022 - 2025 — McMap. All rights reserved.