i have problem when set theme on app theme.appcompat.light.darkactionbar. reason there white bar above actionbar. how remove this? unfortunately, can't show picture of i'm not allowed post pictures yet. it's white empty bar same title action bar has.
my oncreate method looks of now:
@override protected void oncreate(bundle savedinstancestate) { if(preferencemanager.getdefaultsharedpreferences(getbasecontext()).getstring("theme_preference", "1").equals("apptheme")) { settheme(r.style.apptheme); } else { settheme(r.style.darktheme); } super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main_transmit); apptheme theme.appcompat.light.darkactionbar , darktheme theme.appcompat.
how remove white bar appears?
i can't sure without picture sounds have problem figured out how fix. white bar status bar. starting in android 5.0, android gives status bar same color colorprimarydark in app's theme. if colorprimarydark equals white, did , needs in case, of white icons blend in , create solid, ugly white bar above actionbar. thread: how change status bar color in android contains ways change color manually. chose use this:
if(build.version.sdk_int>=build.version_codes.lollipop) { getwindow().setstatusbarcolor(getresources().getcolor(android.r.color.black)); }
Comments
Post a Comment