When pulling down the notifications, the gesture navigation bar on the bottom slides down, some apps like the PlayStore handle this well, while my app (and others like WA) is resizing, what is this about? Do I have to recompile with newer AndroidX version or do something in the manifest?
Couldn't find anything on this
(Take a close look at the bottom here ⬆️
First of all, I could not reproduce the issue on the official Android 31 emulator image.
Secondly, it appears that the Google Play app layouts fit the system window and use translucent system bars. Since your app doesn't implement such behaviour, the app layout needs resizing when the navigation bar re-appears. On the other hand, the Play Store layouts don't need resizing because the navigation bar will overlay on top of it. You can implement a translucent navigation bar using the instructions provided in this answer.
Related
I have another question for you:
Is there a way to hide a specific virtual button from android navigation bar?
My particular case is hide recent apps button. I've searched in some posts about this, but they mention how to hide or disable navigation bar. I just need to hide one virtual button from navigation bar.
I hope that you can give me an answer, thanks!
Update:
Somebody told me that Airwatch app from VM-Ware does this customization
It is currently impossible to make an App-specific customization, but it is possible to make a device-specific modification on Navigation Bar, starting from Android 8.0 (Oreo) by unlocking System UI Tuner.
However, do consider the limitation as both Navigation Bar and System UI Tuner ability is pre-defined by OEMs. Which means we cannot customize more than the given customization choices, and different device might introduce different customization capabilities.
You can not change the navigation bar from your application; you do not have access to these settings. Instead, what you can do is using adb to hide the navigation bar and use only the navigation inside your app. You can follow this tutorial of XDA-dev and their application called "Navigation Gesture", you will find the adb command.
fullscreen hides both the Android navigation and status bars (requiring you swipe from the bottom to show the navigation bar over the app), and standalone hides neither, when it comes to the display property of the PWA's manifest.
Simply, I want the bottom Android navigation bar to always show but without showing the top status bar. I wonder if I am missing some HTML meta or manifest JSON property or some other way to accomplish this?
I will expect most users to install the PWA via the web, not via the Play Store (so no TWA, Android application wrapper, etc.)
As far as I know this is not possible.
With the web-manifest you have different choices: default, standalone, fullscreen (see screenshots below):
On the Google docs page, also a "minimal-ui" value is available:
This mode is similar to fullscreen, but provides the user with some means to access a minimal set of UI elements for controlling navigation (i.e., back, forward, reload, etc).
Note: Only supported by Chrome on mobile.
Reading the description it seems this is what you are looking for, but unfortunately the top status bar and also the page address (read-only) is displayed. Therefore I do not think you can achieve what are you looking for with the standard display values of the web manifest.
I'm trying to mimic the Google Play Store application ActionBar: when you click on the title of the application, the title itself is highlighted (normally with a blue background in JB) and the Navigation Drawer opens/closes.
I'm using the Navigation-Drawer sample application available on Google Developers website (link) and it doesn't do the same. There is no blue background when you touch the title and also the "click zone" on the title text is only about 3-4 characters of lenght as width. On the Play Store or Gmail applications you can touch even the end of the string and the Navigation Drawer will open. See this screenshot for reference:
So, I'm looking for tips or even links to source code of other Android applications that have this feature and also:
Use standard ActionBar (no ActionBarCompact or ActionBarSherlock)
Target API 14+
Preferably do not use any external library (does Play Store use them?)
Thanks!
By default, the title is included in the touch target for the drawer on Android 4.3 and Android 4.4 devices (unlike previous versions of Android where the title was not included) so you shouldn't have to do anything to get consistent touch targets.
Note that in Android 5.0 and Material Design, the navigation button is much larger (taking the place of the app icon) and the title is not included in the touch target. Updating to AppCompat v21 will give you this new functionality and be consistent with Google apps across all API versions (although note that not all Google apps have fully followed the guidelines as of yet - a work in progress as they all move to using AppCompat)
I'm devolopping a tablet app. I want it to work full screen. After days of investigeting on google, I achived it using:
.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
.getWindow().getDecorView().setSystemUiVisibility(Window.FEATURE_ACTION_BAR_OVERLAY);
.getWindow().getDecorView().setSystemUiVisibility(Window.FEATURE_ACTION_MODE_OVERLAY);
The Tablet I'm using is 4.1 Android version. That was working perfectly though I had to made some changes like doing my own action bar (because sistem action bar made navigation buttons comes up) and dialogs.
Now the problem is that I've installed my application on 4.2 Android version and it's a disaster. Each time I touch the screen, navigation buttons comes up. It's really annoying. This is driving me mad, I've tried many things but it's still coming up.
Is there a way to solve this problem? I think if I could override the method that makes navigation buttons comes up I could achieve my objective. Anybody know which is this method??
It is not working in 4.0 Android version neither. That doesn't bother me much, but if you know a way to solve it as well, that would help me a lot.
I would appreciate any help. Thanxs a lot.
Each time I touch the screen, navigation buttons comes up.
One of the core Android concepts is that the user is always in control of the UI. If developers were allowed to create fullscreen Apps and override the navigation buttons, it would be trivial for an App (rogue or otherwise) to create a screen which the user could not get out from.
If you really want to remove the system bar, you will system-level access or you need to build your own custom Android.
Does anyone know how to implement a sliding menu like some of the top apps of today?
Other Stack Overflow questions haven't had any answers on how to do this, so I'm trying to gather as much info to help out others. All the applications I mention below do a great job of implementing the slide menu.
1. Google Plus (as of 7/7/12)
You can only go from the first screen to the second screen by clicking the G+ logo in the upper left hand corner. Notice that the entire screen moves from it's position and get's nudged to the right side of the screen (including the action bar). To get back to the first screen you can either slide the right side back into focus or you can click the G+ icon again.
2. YouTube (as of 7/7/12)
You can go from the first screen to second screen using two methods. Either click the YouTube logo in the upper left, or you can use a swipe gesture to move it to the right. This is already different from the G+ app. Secondly, you can see that the action bar stays put (Unlike G+). Lastly, to get the original screen back it works just like G+.
Edit #3:
The Navigation Drawer pattern is officially described in the Android documentation!
Check out the following links:
Design docs can be found here.
Developer docs can be found here.
Edit #2:
Roman Nurik (an Android design engineer at Google) has confirmed that the recommended behavior is to not move the Action Bar when opening the drawer (like the YouTube app). See this Google+ post.
Edit #1:
I answered this question a while ago, but I'm back to re-emphasize that Prixing has the best fly-out menu out there... by far. It's absolutely beautiful, perfectly smooth, and it puts Facebook, Google+, and YouTube to shame. EverNote is pretty good too... but still not as perfect as Prixing. Check out this series of posts on how the flyout menu was implemented (from none other than the head developer at Prixing himself!).
Original Answer:
Adam Powell and Richard Fulcher talk about this at 49:47 - 52:50 in the Google I/O talk titled "Navigation in Android".
To summarize their answer, as of the date of this posting the slide out navigation menu is not officially part of the Android application design standard. As you have probably discovered, there's currently no native support for this feature, but there was talk about making this an addition to an upcoming revision of the support package.
With regards to the YouTube and G+ apps, it does seem odd that they behave differently. My best guess is that the reason the YouTube app fixes the position of the action bar is,
One of the most important navigational options for users using the YouTube app is search, which is performed in the SearchView in the action bar. It would make sense to make the action bar static in this regard, since it would allow the user to always have the option to search for new videos.
The G+ app uses a ViewPager to display its content, so making the pull out menu specific to the layout content (i.e. everything under the action bar) wouldn't make much sense. Swiping is supposed to provide a means of navigating between pages, not a means of global navigation. This might be why they decided to do it differently in the G+ app than they did in the YouTube app.
On another note, check out the Google Play app for another version of the "pull out menu" (when you are at the left most page, swipe left and a pull out, "half-page" menu will appear).
You're right in that this isn't very consistent behavior, but it doesn't seem like there is a 100% consensus within the Android team on how this behavior should be implemented yet. I wouldn't be surprised if in the future the apps are updated so that the navigation in both apps are identical (they seemed very keen on making navigation consistent across all Google-made apps in the talk).
Just recently I forked a current Github project called "RibbonMenu" and edited it to fit my needs:
https://github.com/jaredsburrows/RibbonMenu
What's the Purpose
Ease of Access: Allow easy access to a menu that slides in and out
Ease of Implementation: Update the same screen using minimal amount of code
Independency: Does not require support libraries such as ActionBarSherlock
Customization: Easy to change colors and menus
What's New
Changed the sliding animation to match Facebook and Google+ apps
Added standard ActionBar (you can chose to use ActionBarSherlock)
Used menuitem to open the Menu
Added ability to update ListView on main Activity
Added 2 ListViews to the Menu, similiar to Facebook and Google+ apps
Added a AutoCompleteTextView and a Button as well to show examples of implemenation
Added method to allow users to hit the 'back button' to hide the menu when it is open
Allows users to interact with background(main ListView) and the menu at the same time unlike the Facebook and Google+ apps!
ActionBar with Menu out
ActionBar with Menu out and search selected
There is a great implementation of NavigationDrawer that follows the Google Material Design Guidelines (and compatible down to API 10) - The MaterialDrawer library (link to GitHub). As of time of writing, May 2017, it's actively supported.
It's available in Maven Central repo.
Gradle dependency setup:
compile 'com.mikepenz:materialdrawer:5.9.1'
Maven dependency setup:
<dependency>
<groupId>com.mikepenz</groupId>
<artifactId>materialdrawer</artifactId>
<version>5.9.1</version>
</dependency>
I know this is an old question but the most up to date answer is to use the Android Support Design library that will make your life easy.
Personally I like the navigationDrawer in Google Drive official app. It just works and works great. I agree that the navigation drawer shouldn't move the action bar because is the key point to open and close the navigation drawer.
If you are still trying to get that behavior I recently create a project Called SherlockNavigationDrawer and as you may expect is the implementation of the Navigation Drawer with ActionBarSherlock and works for pre Honeycomb devices. Check it:
SherlockNavigationDrawer github