How to create Facebook style fixed Status bar?
Dean Edwards' "IE7" JavaScript library may help. It fixes position: fixed in IE6.
Fixed Bar like facebook/wibiya with jquery/YUI/prototype
There is a tutorial for exactly what you want here (part 1 and part 2)
UPDATE: BOTH LINKS ARE NOW DEAD! :(
Fixed status bar conflicts with slide out menu
Edited based on comments:
If you add a div inside of your nav, you can add a margin-left to that inner div when the menu is open. This jsfiddle now has the menu button still visible when the side menu opens.
I added a variable for the toolbar in Menu.prototype._init
and used .inner.is-active{ padding-left:300px; }
to pad the contents inside the fixed nav. You cannot add a margin or padding to the fixed element without it extending beyond the side of the page.
https://jsfiddle.net/Lz9fqvy8/
Original Answer
=====================================
If you let the content hide below your slide out menu, the toolbar will stay in place. To accomplish this I removed the translateX
from the .site-wrap.has-push-left
.
https://jsfiddle.net/hg9038vd/
You can also replace the translateX
with a margin-left:300px
and the toolbar will not push down.
https://jsfiddle.net/m5xcq3zf/
Fixed Status bar and hidden Navigation bar
The easiest way to solve this is in two parts, removing the navbar and then making the status bar transparent.
1 - Removing the navbar
To remove the navbar, create a new style on the styles.xml file under the values folder that inherits from Theme.AppCompat.Light.NoActionBar.
Then on the manifest.xml file change the theme of the Activity to your custom style.
With this the navbar will be removed, but the status bar will still be grayed out.
2 - Making the status bar transparent
You can follow this tutorial to make the status bar transparent: Transparent Status Bar
Or just add the following to the onCreate method of your Activity:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
Window w = getWindow();
w.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,
WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
}
With this you can expect an App style similar to the one in the next picture:
3 - Removing the status bar completely
To hide the status bar completely, add this on your onCreate method:
View decorView = getWindow().getDecorView();
int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
You can read more on this at Hiding the status bar
Result:
4 - Removing the navigation Bar
You can find a solution to this at the Android Developer site Hiding the navigation bar
Basically just add this to your onCreate:
View decorView = getWindow().getDecorView();
int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
How can I create a status bar with bootstrap?
A fixed-bottom Navbar seems right. There's even a Bootstrap Example that demonstrates this.
how iphone facebook app make the navigation bar fixed
this is what worked for me:
toolBar = [[UIView alloc]initWithFrame:CGRectMake(105, 20, 105, 44)];
notificationsBtn = [UIButton buttonWithType:UIButtonTypeCustom];
messagesBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[notificationsBtn setImage:[UIImage imageNamed:@"notifications-icon.png"] forState:UIControlStateNormal];
[notificationsBtn setFrame:CGRectMake(35, 0, 35 , 44)];
[notificationsBtn addTarget:self action:@selector(showNotifications:) forControlEvents:UIControlEventTouchUpInside];
[messagesBtn setImage:[UIImage imageNamed:@"messages-icon.png"] forState:UIControlStateNormal];
[messagesBtn setFrame:CGRectMake(70, 0, 35 , 44)];
[messagesBtn addTarget:self action:@selector(showMessages:) forControlEvents:UIControlEventTouchUpInside];
[toolBar addSubview:notificationsBtn];
[toolBar addSubview:messagesBtn];
[_window.rootViewController.view addSubview:toolBar];
iOS 8: web app status bar position and resizing problems
Apple fixed this bug in iOS 8.3 beta 1
Related Topics
Remove Less // Comments on Compile
How to Get a Custom Icon in a Back Button
Scss/Sass to CSS in Special Folder with PHPstorm 7 File Watcher
How to Set Margins 0 on Print Preview
Layering Images in CSS - Possible to Put 2 Images in Same Element
What Is The Effect of Content: "\0020"; Property
Full Viewport Height Scaling Div Just CSS No Js... Possible
Change Input Placeholder Color Darker
Bootstrap 4 Animate Column Width Change
Overriding Styles in Semantic UI React
How to Clear The Last <Li> Tag Within a <Ul>
Firefox Not Recognizing a Font
How to Use Font Awesome in Own CSS
Styling Overlapping Annotations in Text with HTML <Span> Tags and CSS
How to Float a Twitter Bootstrap Navbar Item Right with Either Class=Pull-Right or Float:Right
How to Make Leaflet Map Height Variable
Two Divs Inside Div. How to Auto-Fill The Space of Parent Div by Second Div