android - cannot combine custom titles with other title features -


i have created custom title bar 1 of screen , trying use same concept in other ,but getting android.util.androidruntimeexception: cannot combine custom titles other title features .

requirement:

enter image description here

styles.xml:

<?xml version="1.0" encoding="utf-8"?> <resources>     <style name="titlebarheading" parent="@android:style/textappearance">         <item name="android:textsize">17sp</item>         <item name="android:textstyle">bold</item>         <item name="android:textcolor">#444444</item>     </style>         <style name="customwindowtitlebarbg">             <item name="android:background">#323331</item>         </style>         <style name="titlebartheme" parent="android:theme">             <item name="android:windowtitlesize">35dip</item>             <item name="android:windowtitlebackgroundstyle">@style/customwindowtitlebarbg</item>     </style> </resources> 

manifest.xml:

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"     package="com.example.loginscreen"     android:versioncode="1"     android:versionname="1.0" >     <uses-sdk         android:minsdkversion="8"         andrid:targetsdkversion="17" />     <uses-permission android:name="android.permission.internet" />     <application         android:allowbackup="true"         android:icon="@drawable/ic_launcher"         android:label="@string/app_name"         >         <activity             android:name="com.example.x.sampleapp.mainactivity"             android:label="@string/app_name" >             <intent-filter>                 <action android:name="android.intent.action.main" />                 <category android:name="android.intent.category.launcher" />             </intent-filter>         </activity>         <activity             android:name="com.example.x.sampleapp.itemactivity"              />         <activity             android:name="com.example.x.sampleapp.reminderactivity"             android:theme="@style/titlebartheme" >        </activity>     </application> </manifest> 

java class:

public class reminderactivity extends activity {     context context;     @override     protected void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);         requestwindowfeature(window.feature_custom_title);         getwindow().setfeatureint(window.feature_custom_title, r.layout.reminderlayout);         context=this;         arraylist<getreminder> list = (arraylist<getreminder>) getintent().getserializableextra("reminderlist");         system.out.println("size >>>"+list.size());      } } 

even added <item name="android:windowactionbar">false</item> seeing other posts

public class reminderactivity extends activity {     context context;     @override     protected void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);         getwindow().setfeatureint(window.feature_custom_title, r.layout.reminderlayout);         context=this;         arraylist<getreminder> list = (arraylist<getreminder>) getintent().getserializableextra("reminderlist");         system.out.println("size >>>"+list.size());      } } 

solution post

removing requestwindowfeature(window.feature_custom_title); activity , adding label manifest activity this:

  <activity    android:name="com.example.sheetal.sampleapp.itemactivity"    android:label="ss"    android:theme="@style/titlebartheme" /> 

Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -