android - AppCompatActivity as a dialog without title -
i have activity inherited appcompactactivity. in manifest 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 run activity, shows dialog, title shown! try supportrequestwindowfeature(window.feature_no_title) ,  requestwindowfeature(window.feature_no_title) title still displayed. please let me know, wrong?
edit
i solve it, change android:windownotitle  windownotitle! because use appcompactactvity!
if having appcompatactivity following won't work
requestwindowfeature(window.feature_no_title);
the simple way set in style.xml file.
<style name="mytheme" parent="theme.appcompat.light.dialog">     <item name="windownotitle">true</item> </style>   it
name="windownotitle", notname="android:windownotitle"
if want remove programmatically add following in oncreate()
getsupportactionbar().hide();      
Comments
Post a Comment