How to create a custom status bar in android common for all activity in android?
I am developing a small application. I want to add my own Status bar at the top of my application with b开发者_JAVA百科lack background containing the battery, 3g,network and an icon of my choice. Please guyz help me out in creating a custom status bar..Thanks in advance
yes that is quite possible...
1- Make your application full screen.
2- Create a linear layout (as you wish)
3- if app contains more than one activity, include the layout in every layout...
For app full screen:
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
Status bar design depends on you...
If by "top status bar" you mean where the battery meter and signal meter and notifications go, you cannot change it from an app. You can set a theme to remove it (e.g., Theme.NoTitleBar.Fullscreen).
I believe you can use a custom view for the app's title bar. See the answers to this question:
Custom title with image
精彩评论