Nexus Navigation Bar Overflow Button - java

I am currently improving an android application of mine and was wondering how I would be able to enable the overflow button on the nexus virtual navigation bar. Does anyone know how I would accomplish that?

The three dots menu appears if your application does not have an ActionBar but declares a menu.
This kind of menu is made to support applications that do not use ActionBar menu on devices that have no hardware menu buttons.

Related

How to add Android Device Monitor to Main Toolbar in Android Studio?

I'm following Udacity's Developing Android Apps class, and in their video it shows an icon at the top of Android Studio for a shortcut to Android Device Monitor. My shortcut icon is not there so I had to search to find it.
I'm trying to add it to the toolbar by right clicking and going into "Customize Toolbars and Menus" but I can't find anything. I googled multiple different things and can't seem to find the answer. Not sure if this is a recent change from Android Studio updates.
Is there a way to add this to the top toolbar? Thanks!
fortunately it is :)
open the customize menu and toolbars by right clicking the toolbar.
Navigate to Main toolbar-Android.MainToolBarSdkGroup and then click Add after... (in fact you can choose whatever position you like most).
Then simply choose All actions-Main menu-Tools-Android-Android device monitor
Profit – robot is there :)

Android Menu Overflow

My Problem is that in some cases the overflow menu dosent work on some phones. First i thought it is the android version and designed 2 different menu xml.
But a Samsung Mini S4 with 4.2.2 doesnt show the overflow and Samsung S5 with 4.2.2 shows the overflow menu.
It seem maybe something to be with the hardware buttons, i dont figure it out.
Can anyone help me how to detect when the menu overflow is shown?
I use following: Com.android.support:appcompat-v7:21.0.3
Thanks Malte
Yes, it is the hardware menu button. So on devices that have the hardware menu button, the overflow menu will not display since the user can use the hardware button (it reduces redundancy). However, IMO it also reduces usability since most users do not think to hit that button (at the least, they do not in my apps).
So you can detect the hardware button: Android: Programmatically detect if device has hardware menu button
And then display a menu item that looks like the "***" menu button and have it activate the menu if you like.

Is it possible to prevent the navigation bar on Android <4.4?

In my application I want to prevent the display of the navigation bar. In Android 4.4 it's easy to implement (see here: How to hide navigation bar permanently in android activity?), but lower versions can't do this.
I saw a similar mechanism in some players which hide navigation bar in fullscreen without any possibility to display it when the screen is touched.
I would be grateful for tips or code samples as it can be done.
Thank you.
SYSTEM_UI_FLAG_HIDE_NAVIGATION is available since API level 16.
So it works since Android 4.1+. You have to remember to reset this flag every time the user makes the NavigationBar show up again.
Only the immersive mode is only available since 4.4

Material design navigation drawer

So what I'm trying to do is to add a navigation drawer within a navigation drawer in a material design app. For reference you can look at the Piktures gallery app. When you click on the hamburger menu, it opens, and right next to the menu will appear an arrow. If you click on the arrow, yet another navigation drawer panel opens from the left which has the social network follow buttons. I just need a way to make another navigation drawer open from the same area. Do I add another fragment? Perhaps a fragment within the fragment? Please either give me a concept to read up on or simply a link to a tutorial. If you're feeling particularly generous, maybe you could even leave me the step by step in the answer. I am using Eclipse, not Android Studio.
Mike Penz has developed an awesome library to include a Navigation Drawer into your app with all the Google Material Design guidelines. You can find it on Github, here.
You can check out this article and this one where it's explained how to implement a Material Design Nav Drawer.

Settings activity

I am making an new android app and I would like to make a settings activity where the use can see about info and settings.
So on android devices you have buttons for settings or else it is presented on screen, when I click that button I do get a menu with the name settings (which I guess eclipse once made automatically) and I do have a activity_settings (as a launcher activity, I don't know if that has any influence or what it means actually) but how can I link the menu tab and the activity?
I mean that when in the menu is clicked on the settings-tab the activity opens.
Can you help me out?
Thanks in advance,
Ide
Yes, what Samarth is saying is true. Read the developer guide before you post questions here. A simple google search will give you links as well.
Here's a complete explanation on how to implement Menus and how to do it: http://developer.android.com/guide/topics/ui/menus.html
Also a similar question on how to create an option Menu: Android, How to create option Menu

Categories