I have an Activity
inherited from AppCompactActivity
. in manifest for activity set theme:
<style name="Theme.custom" parent="Theme.AppCompat.Light.Dialog">
<item name="android:windowNoTitle">true</item>
<item name="colorPrimary">@color/primary</item>
<item name="colorPrimaryDark">@color/primary_dark</item>
<item name="colorAccent">@color/accent</item>
<item name="colorButtonNormal">@color/accent</item>
<item name="android:buttonStyle">@style/ButtonStyle</item>
</style>
When I run activity, it shows as a dialog, but title is shown! i try supportRequestWindowFeature(Window.FEATURE_NO_TITLE)
and RequestWindowFeature(Window.FEATURE_NO_TITLE)
but title still displayed. Please let me know, What is wrong?
Edit
I solve it, only change android:windowNoTitle
to windowNoTitle
! because i am use AppCompactActvity!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…