How do I make an activity full screen? I mean without the notification bar. Any ideas?
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
Here is an example code. You can turn on/off flags to hide/show specific parts.
Then, you reset to the default state:
You can call the above functions from your
onCreate
:Try this with appcompat from
style.xml
. It can support with all platforms.I wanted to use my own theme instead of using @android:style/Theme.NoTitleBar.Fullscreen. But it wasn't working as some post on here had mentioned, so I did some tweaking to figure it out.
In AndroidManifest.xml:
In styles.xml:
Note: in my case I had to use
name="windowActionBar"
instead ofname="android:windowActionBar"
before it worked properly. So I just used both to make sure in the case I need to port to a new Android version later.If your using AppCompat and ActionBarActivity, then use this
getSupportActionBar().hide();
There's a technique called Immersive Full-Screen Mode available in KitKat.
Example