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
<style name="no_title" parent="AppTheme"> <item name="android:windowNoTitle">true</item> <item name="android:windowContentOverlay">@null</item> </style>
you can change name="---------"
open Androidmaifest.xm
find android:theme="@style/AppTheme" chang to android:theme="@style/no_title"
click select Theme on menubar (it's green color near MainActivity)
To simply remove the title bar (which means the bar contains your app name) from an activity, I simply add below line to that activity in the manifests\AndroidManifest.xml
:
android:theme="@style/AppTheme.NoActionBar"
It should now look like below
<activity
android:name=".MyActivity"
android:theme="@style/AppTheme.NoActionBar"></activity>
Hope it'll be useful.
Check this
ActionBar actionBar = getSupportActionBar();
actionBar.hide();
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
in onCreate() works!
For Beginner Like Me. Just Do it what I say.From your Android Project.
app -> res -> values -> style.xml
replace this code
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
</resources>
Enjoy.
In AndroidManifest.xml
of your application you'll find the android:theme
for example set to @style/AppTheme
Now go to styles.xml
, find the style tag, make sure that name is set to AppTheme
the same as in manifest and set parent to android:Theme.Holo.Light.NoActionBar
(also do this in styles(v21) if you have it in your project)
<style name="AppTheme" parent="android:Theme.Holo.Light.NoActionBar">
<!-- ... -->
</style>