AppCompatActivity as a dialog without title

If you are having AppCompatActivity then the following won’t work

requestWindowFeature(Window.FEATURE_NO_TITLE);

The simple way is to set it in the style.xml file.

<style name="mytheme" parent="Theme.AppCompat.Light.Dialog">
    <item name="windowNoTitle">true</item>
</style>

It is name="windowNoTitle", not name="android:windowNoTitle"

If you want to remove it programmatically then add the following in onCreate()

getSupportActionBar().hide();

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)