Once I switched from ActionBarActivity
to AppCompatActivity
one of the only changes I did was add this line:
<item name="windowNoTitle">true</item>
Here is my entire styles.xml
file:
<style name="gptheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/primary</item>
<item name="colorPrimaryDark">@color/primaryDark</item>
<item name="colorAccent">@color/accent</item>
<item name="android:windowContentOverlay">@null</item>
</style>
<style name="ThemeNoActionBar" parent="gptheme">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
Now, all the new AppCompatDialog
s in my code, (which were formerly Dialog d = new Dialog(mContext)
, all have no titles even though I use setTitle()
.
Obviously the change I made to the titles specified windowNoTitle
but that should only affect the parent activity. I would think, anyway.
How exactly does this new feature work?
// style.xml
// manifest.xml
// activity