I have seen a few activities out there (and especially Home replacements) that actually have transparent/translucent status bar (and by that I really mean the status bar and not the title bar) and was wondering how they were doing it.
I've looked everywhere (Google, StackOverflow, etc) and haven't found a straight answer to this question, tried a lot of things myself but in vain... Now running out of options and the only one I have left is to set the activity FULLSCREEN and have a replacement for it (there are a few projects out there that offer replacements for the status bar, but I'd rather not go that far for such a simple task really).
Thanks.
EDIT:
I've found my answer after studying how others "did it"... They actually didn't.
My guess goes a little further than that since I think that my status bar IS actually transparent just like those applications, but the real difference is that they are using the 2D/live wallpapers rendered by Android as background which is rendered behind the status bar.
So the reason why I'm thinking I don't have a transparent status bar is because in my case only black is being rendered behind it...
I don't have a phone here with a opaque status bar but I'm pretty sure those apps will also have an opaque status bar (and not transparent).
You have looked every where except android developers official website.You can customize ur status(notification) bar.Here
is the link where u can get the custom notification bar tutorial.
Related
This question has been asked several times -- and answered, but the answers don't seem to "add up".
Yes, one can simply set android:windowTranslucentStatus to true and set the WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS flag. (See Android Completely transparent Status Bar?) That produces a completely transparent status bar (in recent Android releases). That's great!
The issue is that this then results in the soft navigation bar being drawn over the lower contents (e.g. controls) within one's activity. I've tried resolving this with fitSystemWindows, but currently am clearly getting something wrong. Overall, it seems quite wrong that one has to get into any of this mess just to get a completely transparent vs. a translucent status bar!
I am an intermediate android developer and i have an app that should have a custom designed action bar.I have researched and noticed that skype uses a customised action bar at the top.How did they implement that?I only need pointing to the right direction and the rest i can do myself.
Below is a screenshot of the skype design am talking about.
I am posting this for anyone who might find it helpful.The action bar in android is a bit rigid and doesn't offer a developer much freedom for styling it.Instead style the window title bar to suit your design taste. That's how i achieved my design.
Tutorials on how to do that are all over the internet,and the best thing about it is its really simple.
I am working on an app right now whose blueprints I got from a friend. I offered to use the ActionBar for screen navigation, but he insists on a little red button at the top-right of the screen.
I have two question:
Having never designed in android, can I make the ActionBar completely transparent, except for a little red square on the right so it looks like what i described?
If there is not such way, can someone please offer an alternative? I was searching for "button drop down list", but got only very old tutorials. Maybe I should look for something else?
Thanks a lot
Yes, you can make the Action Bar transparent. There is an example: Custom Translucent Android ActionBar. Of course, you can make completely transparant AB. Then you can add a MenuItem to the top-right corner (it will be your little red button).
Here you have an Android Action Bar Style Generator. As you can see, there is an option for solid or transparent Action Bar.
There is no need to break the rules with a proper navigation pattern (Action Bar).
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.
Okay, this would be fairly simple in some other environments, but I can't figure out how to do it, or if its even possible in Android.
I have placed an icon on the status bar. I would like to run a method of another class whenever the user selects that icon. I've seen similar functionality used in volume icons that sit on the status bar that allow a user to raise or lower the volume when the icon is clicked. However, these icons are on the right side of the status bar, and from what I've seen, I'm not allowed to put an icon there. I don't know if that kind of functionality is available to left side icons.
So basically, I'm looking for how to run a function when a status bar icon is clicked. I don't want to open an activity, I just want to run a function.
What you're searching is probably related to the Android UI ActionBar pattern.
Regarding that I'd like to consider you to take a look at the Google I/O 2010 Android app. It contains many of these patterns and may help you out.
Summarizing, you have to create your own ActionBar (or Status Bar as you call it). You place your buttons, retrieve them via the findViewById(...) method and associate a click listener.