android - use custom title bar while have the normal theme -
if use 1 of many tutorials on creating custom titlebars seems change rest of theme.
how can change titlebar out changing rest of theme eg menu menu , edittext boxes etc
//mainactivity.java requestwindowfeature(window.feature_custom_title); setcontentview(r.layout.activity_main); getwindow().setfeatureint(window.feature_custom_title, r.layout.customtitlebar); //manifest. <application android:allowbackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/apptheme"> <activity android:name="com.mediocrefireworks.cheapchug.mainactivity" android:label="@string/app_name" android:theme="@style/customtheme"> <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> //style.xml <style name="customwindowtitlebackground"> <item name="android:background">#323331</item> </style> <style name="customtheme" parent="android:theme.light"> <item name="android:windowtitlesize">35dip</item> <item name="android:windowtitlebackgroundstyle">@style/customwindowtitlebackground</item>
ok figured out, needed use android:theme.holo.light latest theme. , use different styles.xml in values folder different api's
Comments
Post a Comment