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);
Related
I want to change the change navigation gesture bar and icon colour to white how should I do that. I tried to change the theme of the app to dark theme but it's not working. Below are the screenshots which I have achieved so far.
If anyone knows how to implement this please help.
Thanks in advance.
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>
I'm using ABS for backwards compatibility. In one of my activities, I'm using Action Bar tabs which appear before custom view (in landscape) in action bar so I can't use that. So i'm using Action bar title. So in short, my question is how do I increase the spacing between the title and the icon?
I added some spacing like this:
actionBar.setTitle(" " + myTitle);
I don't think it should be done this way but I've searched a lot I couldn't find any solution for this without using custom view which I can't because I'm using AB tabs.
So if anyone else has a better (cleaner) solution, do answer. For others, this works better than anything else I tried.
Cheers!
Adding these link in Toolbar declaration in xml file.
app:contentInsetLeft="16dp"
app:contentInsetStart="16dp"
app:contentInsetEnd="16dp"
app:titleMarginStart="32dp"
Pay attention at the app prefix. This worked for me with Android 4.4.2 and Android 5.1.
I'm now customizing theme through some framework files. The problem is that I've made the status bar with transparent background. But there's an obvious side line between status bar and the application. How can I merge them together? Looks like the application align to the top of the screen but the status bar also exist.
Thanks in advance.
Please find WindowManager.LayoutParams.TYPE_STATUS_BAR in StatusBarService.java and replace it with WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY.
I think it is what you want.
When using the recent apps button in Android the action bar of my app does not retain its style like other apps do. The action bar color returns to the default gray and the text to the default black. Does anyone know how to control this behavior in an Android project?
Thanks, any help would be greatly appreciated.