I am Android developer and dealing with Android Nougat (7.0) source code. I experienced kind of strange problem in Snapchat app. In the app, bottom bar icons overlap with the android navigation bar, so I can't use bottom bar icons in the app. I found this issue from different resources as well so I am confused whether this problem is in the app side or in the code base. Does anyone have any idea what can cause this problem?
Add this line in your styles.xml file
<item name="android:windowTranslucentNavigation">false</item>
Related
I'm using Nexus5 for testing application and I got issue that is Navigation bar hides Bottom Layout
Main container is RelativeLayout which has LinearLayout on the bottom. other devices are fine and showing well but only Nexus5 has that issue because I think it has navigation bar on the bottom of screen.
Anyone has the same issue that you got? If you do, please share it.
// In style 21 add this line.
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
for more info visit Documentation..
the navigation bar is overlaying my activity view on the bottom. Same issue like here: Android Navigation Bar overlaying my view
The issue seems to happen only on Android Lollipop. On my Moto G with KitKat 4.4.4. i don't have this issue. I don't know why this problem is only related to Lollipop.
My problem is, with the solution #ps-glass postet is not working for me somehow setting fitsSystemWindow = true. I tried it with the theme or with the layout file directly, nothing worked for me so far.
Here is an image: https://drive.google.com/file/d/0B5g_MttTC7ZIQzNfS3Y2dVFKSFk/view?usp=sharing
You can only see a bit of the text, the rest is overlaid by the navigation bar.
I found out that this problem is related to a library we are using:
https://github.com/jfeinstein10/SlidingMenu
and other people have this problem too after they updated their AppCompat to v21.
Some solutions were posted here https://github.com/jfeinstein10/SlidingMenu/issues/680 and another one here The getDecorView method return view include navigation bar view on lollipop?
The Solution from https://stackoverflow.com/users/715451/saulobrito is working for me now and it is the easiest way i think.
<style name="Theme" parent="FrameworkRoot.Theme">
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
</style>
I put this code snippet to a my theme in the res/values-v21 folder.
I am currently building an app that uses the material design theme as a base theme.
However the action bar has a dark shadow below the action bar.
I have tried everything I can think of, but I can't seem to get rid of it.
Here is a screen shot showing what I mean:
https://docs.google.com/file/d/0B_krkpxyd558V0p6a1NKZXFHeHc/edit?usp=docslist_api
If someone could tell me how I can get rid of it, I would much appreciate it.
Thanks
Corey :)
Shadow is created by using elevation, here's how you can disable it programmatically:
getActionBar().setElevation(0);
I have put two icons from Android Icon Packager for action bar. The Info Action appears brightly while the next one, Refresh Action is not appearing. I use both as holo_dark. I tried switching just the refresh action, and it appears very very dimly.
I've try reading many many stuffs I seem to find nothing about this topic.
EDIT: I have solved this problem by deleting the whole refresh icon and then remove the line
android:icon="#drawable/ic_action_refresh"
in the XML. I then re-added the icon and it works like a charm. Voted both answer for caring about my question
Use Icon from your Android Package Opposite to Your Theme.
For eg: If you are using Holo_Dark Theme in your Application use Holo_White Icon Set for it.
I have a non-market app that was built to run on a specific device. Originally, this was on a device running 2.2, but now the app is targeting a specific device on 3.1 and I am adding in support for the Action Bar.
One of the apps Activities is required to be full-screen and have hidden the status bar and the Action Bar. This is achieved using the following in the manifest:
<activity
android:name=".activity.EditorActivity"
android:label="#string/activity_edit"
android:theme="#style/Canvas">
Which references this style:
<style name="Canvas" parent="#android:style/Theme.NoTitleBar.Fullscreen">
<item name="android:windowBackground">#color/bg_white</item>
</style>
So, after moving to 3.1, the effect works, in that the Activity is fullscreen, and everything is hidden as needed, but this of course hides the options menu from populating the Action Bar.
I know that if I leave the android:targetSdkVersion="8", the options menu is shown in the bottom navigation, but this seems like a bit of a hack - is there any other way or 'best practice' for this? I basically have to set android:targetSdkVersion="12" to ensure the app works and isn't put onto older devices so this won't be a permanent solution.
I've decided to stop trying to swim upstream and have switched to using a translucent Action Bar that is overlaid - it works perfectly and is exactly what I had been doing prior to 3.x with my custom solution.
Custom Translucent Android ActionBar