ChrisHarry ChrisHarry - 2 months ago 5
Android Question

How to remove title bar in android?

I want to do android program that contain no title bar. For some reason I cant remove title bar.
I have already tried this coding.

this.requestWindowFeature(Window.FEATURE_NO_TITLE);


This one also I have tried but the program suddenly stop..

android:icon="@drawable/icon"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"


How can I fix this?

Answer

In the Style.xml window (App->src->main->res->values->styles.xml) make changes to the <resources> to look like this:

<resources>

    <style name="AppTheme" parent="Theme.AppCompat.NoActionBar">

    </style>

</resources>