android - Holoeverywhere : how to programmatically remove at runtime the action bar from an activity -
which correct way remove action bar inside activity ?
my activity extends org.holoeverywhere.app.activity
i've custom application class extends org.holoeverywhere.app.application , @ startup execs static code :
thememanager.setdefaulttheme(thememanager.dark); thememanager.map(thememanager.dark, r.style.holo_demo_theme); thememanager.map(thememanager.light, r.style.holo_demo_theme_light); thememanager.map(thememanager.mixed, r.style.holo_demo_theme_light_darkactionbar); thememanager.map(thememanager.dark | thememanager.fullscreen, r.style.holo_demo_theme_fullscreen); thememanager.map(thememanager.light | thememanager.fullscreen, r.style.holo_demo_theme_light_fullscreen); thememanager.map(thememanager.mixed | thememanager.fullscreen, r.style.holo_demo_theme_light_darkactionbar_fullscreen);
in activity :
protected void oncreate(bundle savedinstancestate) { thememanager.removetheme(this); settheme(thememanager.dark | thememanager.fullscreen); super.oncreate(savedinstancestate); setcontentview(r.layout.activity_login);
if add requestwindowfeature(window.feature_no_title)
in code, on android 4.1.1
-table- bar removed while on handset -android 2.3.3
- bar not removed.
before introducing holoeverywhere worked fine requestwindowfeature(window.feature_no_title).
which correct way remove @ runtime actionbar in holoeverywhere ? (i want @ runtime because user has option set dark or light layout, dark default)
see flag thememanager.no_action_bar. or call
getsupportactionbar().hide();
Comments
Post a Comment