Questions tagged [options-menu]

108 questions
2
votes
0 answers

Handle a hardkey (i.e. via dispatchKeyEvent) while an options menu is visible (i.e. via onCreateOptionsMenu) in Android?

Currently, my activity intercepts volume button key presses dis-allowing the setting of the ringer/media volume while my app is running. However, if the user presses the menu button, it brings up my options menu but, when this happens, the volume…
fatfreddyscat
  • 835
  • 3
  • 8
  • 26
2
votes
2 answers

How to redraw an optionsmenu-icon with canvas

I'm trying to get a optionsmenu-icon inside onPrepareOptionsMenu in my Activity an redraw it with the help of canvas: @Override public boolean onPrepareOptionsMenu(Menu menu) { super.onPrepareOptionsMenu(menu); MenuItem item =…
David Geh
  • 307
  • 1
  • 2
  • 12
2
votes
2 answers

Unable to use LayoutInflater from within onOptionsItemSelected

I am trying to inflate a layout through an options menu item. code i tried to use is as follows public class Test01 extends Activity { @Override public void onCreate(Bundle savedInstanceState) { …
Deepak
  • 1,238
  • 3
  • 22
  • 47
2
votes
2 answers

Android Options Menu on Action bar shows duplicate icons

action bar (Toolbar) on android has 3 options menu. Its working fine. But the problem is when ever i am uninstalling and reinstalling this duplication of the menu item is showing. Also the Title is also remains same, not changing. after sometimes,…
2
votes
1 answer

openOptionsMenu() not working

Well, tried a lot of ways to solve this problem but nothing... I want to open the options menu via menu item. package com.example.tachles; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import…
Max
  • 319
  • 1
  • 4
  • 18
2
votes
0 answers

customize options menu in android

I'd like to customize options menu in my app. After some googling and making a lot of effort I am still unable to do it. Here is what I want: menu.xml file:
boburShox
  • 2,630
  • 5
  • 23
  • 35
2
votes
3 answers

android implement missing hardware OptionsMenu button

I'm new in the world of android. Until now each and every "OptionsMenu" could be created like this: @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.activity_list_view_controller, menu); return…
Mr.S
  • 94
  • 9
2
votes
2 answers

Chrome-like display of menu

I'm trying to find some information on how to create a menu that looks like the top of the menu for chrome for Android. I have tried experimenting with implementing icons for Android 4.0, but no luck. Tried googeling, but the only thing i found was…
ringkjob
  • 193
  • 2
  • 13
1
vote
1 answer

res folder inside bin has gone empty,causing errors.How to fix?Something to do with options menu?

The res folder inside of bin is supposed to contain .dex,.apk and .ap_ i think.Mines gone empty somehow causing errors like not being able to access the layout resources.I have tried clean and build but it doesent seem to work.Just seem to create an…
1
vote
0 answers

Change the background of OptionsMenu and add/remove options dynamically

I have used the solution given in post like this for changing the background of my OptionsMenu (over min API 7). But now I have a problem. If after doing it I dynamically add or remove an option the new option comes with correct color but the…
Addev
  • 31,819
  • 51
  • 183
  • 302
1
vote
1 answer

Android make menu

I have made an options menu attached to my android menu button, but how do I make a list menu from clicking one of those menus (like the standard one you see when you go to android settings) I must be doing the wrong google searches
CQM
  • 42,592
  • 75
  • 224
  • 366
1
vote
1 answer

Problem with tab view, cannot set content view

I'll link all of my files in the bottom of my post My problem is that, I have a tab view, currently with two tabs. These tabs are each a seperate activity, which extends CustomMenuActivity. This is so that both activities can share the same options…
1
vote
3 answers

OptionsMenu appears in double

I Have a Fragment inside an Activity. This Activity contains OptionsMenu. I use a FragmentTransaction to launch a new instance of the same Fragment class, when I selected the OptionsMenu, it appears in double because it load twice. How can I do to…
tgirard12
  • 11
  • 3
1
vote
2 answers

Android galaxy tab options menu different?

My friend tried my app with his new galaxy tab and it seems it is a little different than the emulator I tested it on. His options menu for the app was dark instead of the white background and you could not really see any of the options and most of…
Pengume
  • 550
  • 11
  • 27
1
vote
1 answer

Error in creating menu in android

I am trying to create a menu in android. But it results only in blank page with text only. Menu is not coming on the screen. code is given below public class SimpleOptionMenu extends Activity { /** Called when the activity is first created.…
bejoy george
  • 29,385
  • 5
  • 19
  • 15