In my app there is this title bar at the top where the overflow menu would be, but I don't need settings and only have one screen. When I change the theme like described in many other questions I get the old 2.2 theme. I want to have the modern theme just without the bar at the top.
相关问题
- 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
In the manifest file Change:
This works for me
Best way is to use actionbar function
setTitle()
if you wish to show logo or have some other stuff in you actionBar but dont want to see name of the app, write this code in MainActivity.java or anywhere you wish to hide title inonCreate
:This way your app won't have reason to crash.
I have faced the same problem as you, and solve this problem just by changing the class which I extended.
I hope this will solve your problem.
works in
onCreate()
when put beforesetContentView()
is invoked.otherwise it crashes
In
AndroidManifest.xml
of your application you'll find theandroid:theme
for example set to@style/AppTheme
Now go to
styles.xml
, find the style tag, make sure that name is set toAppTheme
the same as in manifest and set parent toandroid:Theme.Holo.Light.NoActionBar
(also do this in styles(v21) if you have it in your project)