android - ActionBar text not visible -
i use regular actionbar in android project. in oncreate:
protected void oncreate(bundle savedinstance) { super.oncreate(savedinstance); setcontentview(r.layout.activity_clientlogin); getactionbar().show(); getactionbar().setbackgrounddrawable(new colordrawable(color.parsecolor("#ff4444"))); .... } @override public boolean oncreateoptionsmenu(menu menu) { // inflate menu items use in action bar menuinflater inflater = getmenuinflater(); inflater.inflate(r.menu.menu_clientlogin, menu); return super.oncreateoptionsmenu(menu); }
menu_clientlogin:
<menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/action_offline_mode" android:name="@string/offline_mode" android:showasaction="always"/> </menu>
everything worked until added navigation drawer, used code example project. actionbar color still red items invisible (there not text shown). if click @ right corner of actionbar see select item , onoptionsitemselected triggered correctly.
i have same problem in other activities of project. example (the actionbar color changed programmaticly, drawericon shown):
my application uses theme:
<resources> <!-- base application theme, dependent on api level. theme replaced appbasetheme res/values-vxx/styles.xml on newer devices. --> <style name="appbasetheme" parent="android:theme.holo.light.darkactionbar"> <!-- theme customizations available in newer api levels can go in res/values-vxx/styles.xml, while customizations related backward-compatibility can go here. --> </style> <!-- application theme. --> <style name="apptheme" parent="appbasetheme"> <!-- customizations not specific particular api-level can go here. --> </style> </resources>
Comments
Post a Comment