how to show only status bar in android -


i working on application of activity in full screen. implemented using theme.

<style name="apptheme" parent="theme.appcompat.light.noactionbar">         <!-- customize theme here. -->         <item name="windownotitle">true</item>         <item name="windowactionbar">false</item>         <item name="android:windowfullscreen">true</item>         <item name="android:windowcontentoverlay">@null</item>     </style> 

now stuck situation in 1 activity need show status bar. buddy know how forcefully made changes first apply theme how can code forcefully show status bar not actionbar.

thanks

in activity want status bar, can try code:

getwindow().addflags(windowmanager.layoutparams.flag_force_not_fullscreen); getwindow().clearflags(windowmanager.layoutparams.flag_fullscreen); 

then if have title defined make visible, example

((view) findviewbyid(android.r.id.title)).setvisibility(view.visible); 

Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -