Questions tagged [oncreateoptionsmenu]
112 questions
0
votes
1 answer
Android menu - on a click each activiy stay behing
I have a menu on my application. The problem is that, when I click on an item, the previous one stays behind. So when I click on the previous button of my phone, the previous activity appears. I don't know what is going wrong with my code.
So this…
user3464216
0
votes
1 answer
related to onCreateOptionMenu on android
I am very much new in android development. trying to make a dictionary application where a button in main activity suppose to open next activity.
to do that I am following a tutorial.
there is a method like:
@Override
public boolean…

Kamrul hasan
- 1
- 1
0
votes
1 answer
Android. Starting activity from Optionsmenu
I meet a problem starting the activity from optionmenu. I need to go to Logout activity when Logout is pressed. But nothing happens..
Here is my code:
public class MenuActivity extends Activity {
public void onCreate(Bundle menuinstance) {
…

user3416113
- 61
- 1
- 10
0
votes
1 answer
options menu not inflating correctly in page change in view pager
I have a view pager with each fragment having its own options menu which is inflated when the fragment comes is current one in the view pager however, it is not working as expected. Sometimes the correct options menu appears sometimes the adjacent…

user3025833
- 33
- 6
0
votes
1 answer
how can i update the menu before the menu button is pressed
i created a menu that needs to change depending on user input and the menu does change but only once the user opens the menu twice. my guess is that the original menu is built by public boolean oncreateOptionsMenu(Menu menu) but it is not actually…

blu
- 353
- 1
- 5
- 17
0
votes
0 answers
onCreateOptionsMenu not showing up
I have activity with three tabs which contain fragment each. I have created menu but its not showing up , My min sdk version is 14, I have tried on different devices but can't figure out the error. Code is:
@Override
public boolean…

Talib
- 1,134
- 5
- 31
- 58
0
votes
0 answers
Not able to set icons in Android 4.2.2 option menu
I wondered why i am unable to add icons in option menu. I am developing app in android 4.2 and i want to add custom menu options. I'm doing like below:
In menu folder -> home_activity.xml
0
votes
1 answer
OnCreateOptionsMenu crash below API level 16
I've been building an app (my first) from the Master/Detail flow template in eclipse.
I've added actionbarsherlock to the project successfully and the app will run down to API 10, though whenever I try to call mItem.id (the ID of the list item…
0
votes
2 answers
What is the current method of implementing an options menu in an application?
I am relatively new to android development and I'm having a good time so far. My application is functional and I'm ready to add a few options for the user. There seems to be a wealth of information on the ways to do this and I'm having trouble…

Casey Murray
- 1,582
- 17
- 21
0
votes
1 answer
Fragment's onCreateView called before onCreateOptionsMenu so i cant expand action view at fragment launch
I have a refresh menu item in action bar.
I can expand action view (== show progress bar in actionbar) like this:
menuItem.setActionView(R.layout.action_view_refresh);
menuItem.expandActionView();
I do this when user presses on menu item in action…

DixieFlatline
- 7,895
- 24
- 95
- 147
0
votes
1 answer
Cannot Display Icon In The Options Menu
Hello guys I am really frustrated this is what I want to get
but I what ever I do I cannot get my icon bonded to my Options Menu. I have tried
@Override
public boolean onCreateOptionsMenu(Menu menu)
{
menu.add(1, 1, 0,…

user2283550
- 11
- 7
0
votes
0 answers
Oncreateoptions menu not called
Hi i have a strange scenario where onCreateOptionsmenu not getting called when i run the program but when i keep a breakpoint it gets called for a device < 3 (Android OS) FOr Android OS > 3 fones its getting called . below is my code
public boolean…

user1340801
- 423
- 3
- 10
- 21
0
votes
1 answer
ActionBar Sherlock, Fragment and SearchWidget
As the title says i have a problem implementing search widget in some Fragment. My problem is that when i use inflater to inflate custom view inside a onCreateOptionsMenu and after that I find SearchView it is always null!
If anyone had same or…

Jovan
- 1,741
- 4
- 19
- 38
0
votes
1 answer
ABS: ViewPager, FragmentStatePager Adapter, SherlockListFragment and Menus
It's my understanding that in a normal FragmentActivity / ViewPager / FragmentStatePagerAdapter situation onCreateOptionsMenu should be handled by the ListFragment...
...but what about in a scenario where ActionBarSherlock is extending the…

Quasaur
- 1,335
- 1
- 10
- 27
0
votes
1 answer
ABS CustomView - overflow menu
I'm working on a project where I need to replace the ABS with an customview. I have a button on the top right corner. When you click that button I want a Spinner/contextMenu/overflow menu shown (like the standard abs with overflow theme).
The button…

user1954433
- 11
- 1