android-menu Questions

5

My android application uses the following style: <style name="AppTheme" parent="android:style/Theme.Holo" ></style> It is assigned for the whole application in the AndroidManifest.xm...
Ambivalence asked 22/8, 2012 at 15:49

27

Solved

I have an action bar with a menuitem. How can I hide/show that menu item? This is what I'm trying to do: MenuItem item = (MenuItem) findViewById(R.id.addAction); item.setVisible(false); this.inva...
Machicolate asked 21/5, 2012 at 21:18

18

I know it's not possible using the native API. Is there a workaround to implement that kind of view?
Newspaperwoman asked 22/8, 2013 at 7:27

2

I am trying to show icons with overflow menu with below codes MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.my_menu,menu); if(menu instanceof MenuBuilder){ MenuBuilder menuB...
Outrank asked 4/2, 2018 at 12:5

10

I am trying to get the ActionBar working properly on my app (and I'm using ActionBarSherlock to get a unified UI between Android 2.x and 4.x). I feel like android:showAsAction="ifRoom" is just a ...

18

Solved

I want use ToolBar instead of ActionBar, but don't show me menu in toolbar!!! i want set menu such as Refresh or Setting buttons in ActionBar. Toolbar.xml code : <?xml version="1.0" e...
Marivaux asked 26/2, 2016 at 10:12

5

Solved

I have checked and tried out all the possible codes here but those didn't work for me as i am replacing the layout only not having different toolbar.I am using fragments and NavigationDrawer, the n...
Impudent asked 16/4, 2015 at 11:10

3

Solved

A month or so ago, the Android team deprecated onCreateOptionsMenu and onOptionsItemSelected, as well as setHasOptionsItemMenu. This unfortunately broke all of my code. My app has a lot of fragment...
Hydrotherapy asked 5/7, 2022 at 1:20

3

How to split a menu like chrome browser as shown in the image: This is my actual code <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/...
Highlander asked 25/2, 2015 at 15:28

4

Solved

I want to use Android's DrawerLayout and NavigationView for menus, but I don't know how to have the menu items use a custom font. Does anyone have a successful implementation?

16

I got pretty helpful hints to my last questions, I hope it won't be different this time :) First, let me explain the situation. I have an activity with 2 fragments. For each fragment I have a xml m...
Sackville asked 23/8, 2012 at 11:15

4

Solved

I use Fragments and when I switch to nested Fragment, which implements public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) my menu inflates quantity of times when I get to that nested...
Lucius asked 12/9, 2013 at 15:9

8

Solved

I am trying to show a drop down menu for my toolbar which includes BOTH text and icons: <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/a...
Serafina asked 15/6, 2015 at 12:56

9

Solved

I have a PopupMenu and I know the usual way to associate a menu to it is to use popup.getMenuInflater().inflate(R.menu.my_menu, popup.getMenu()); or something of the like. My problem is, I have an ...
Dinnie asked 9/12, 2012 at 2:28

7

How can I set a long click listener on a MenuItem? I tried this answer, but the method doesn't exist for me. Any solutions? Code: Menu menu = navigationView.getMenu(); MenuItem menuItem = menu...
Satem asked 18/6, 2016 at 16:16

7

Solved

Here is what I am trying to implement: when people click on the menu on top right corner of a toolbar, an options menu appears on bottom of the screen. See picture below: I am not sure what meth...
Confluence asked 21/6, 2017 at 12:46

12

Solved

My navigation drawer keeps showing the last selected item.Is there any way to remove it.I want that if the user is at Home page, the navigation drawer items should be non-highlighted. I have tried...
Juvenescence asked 30/8, 2016 at 7:26

7

I am using simple menu items in action bar by using following code in main activity: package com.kaasib.ftpclient; import android.app.Activity; import android.os.Bundle; import android.view.Menu...
Chemesh asked 18/8, 2013 at 16:36

3

Solved

I have a Fragment with menu: public class FragmentA extends Fragment { public FragmentA() { setHasOptionsMenu(true); } @Override public void onCreate(Bundle savedInstanceState) { super.onC...

4

How can i get Current selected item of navigation drawer? My menu is stored in drawer_menu.xml navigationView = (NavigationView) findViewById(R.id.navigation_view); navigationView.setNavigationIt...
Follett asked 12/7, 2016 at 18:37

13

I am using android studio 3.1 for some development. But Its does not showing android option under Tools menu. Whereas Android studio 3.0 doesn't have this problem. Here is the screenshot of androi...
Judiejudith asked 20/12, 2017 at 11:0

3

I'm working on an android app and I'm facing some problems in designing my actionbar. I'm using the dark actionbar with white icons on it. I have a dropdown menu popped when I click the overflow ic...

4

Solved

I had done a menu overflow items.I need to reduce menu items width,height and textview size. I referred this post.But it is not working for me.I am posted the code and screenshot related to that: ...
Dutcher asked 25/6, 2015 at 7:52

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...

15

Solved

I have a PopupWindow on my activity, the thing is my PopupWindow still shows even when I'm interacting with my activity (say scrolling on my list). I can scroll through my list and the PopupWindow ...
Frieda asked 2/9, 2012 at 1:19

© 2022 - 2025 — McMap. All rights reserved.