Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

How to change the ActionBar Tab Text color When using the AppCompat Library ?

$
0
0

I'm in Titanium SDK version 3.3.0.GA and i have customized my Android Action Bar Style using the generator and i set the Style compatibility to appCompat as it's recommended for that version.

In both this android documentation page about Styling the Action Bar and also this question there are only solutions to customize the ActionBar title Text color when using parent="@style/Theme.Holo.Light"or parent="@style/Theme.Holo" for the custom style but as i said i have parent="@style/Theme.AppCompat.Light"

In the other hand, when i tried to change my app to be using the older theme Theme.Holo.Light i got an eror saying that i have to use appCompat as my app extending ActionBarActivity which requires the AppCompat theme to be applied as said here.

[ERROR] :  TiApplication: (main) [707,707] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo{com.crystaleez.immoneuftunisie/org.appcelerator.titanium.TiActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.; Titanium 3.3.0,2014/07/11 12:36,787cd39
[ERROR] :  TiApplication: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.crystaleez.immoneuftunisie/org.appcelerator.titanium.TiActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
[ERROR] :  TiApplication:   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2306)
[ERROR] :  TiApplication:   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2358)
[ERROR] :  TiApplication:   at android.app.ActivityThread.access$600(ActivityThread.java:156)
[ERROR] :  TiApplication:   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1340)
[ERROR] :  TiApplication:   at android.os.Handler.dispatchMessage(Handler.java:99)
[ERROR] :  TiApplication:   at android.os.Looper.loop(Looper.java:153)
[ERROR] :  TiApplication:   at android.app.ActivityThread.main(ActivityThread.java:5299)
[ERROR] :  TiApplication:   at java.lang.reflect.Method.invokeNative(Native Method)
[ERROR] :  TiApplication:   at java.lang.reflect.Method.invoke(Method.java:511)
[ERROR] :  TiApplication:   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
[ERROR] :  TiApplication:   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
[ERROR] :  TiApplication:   at dalvik.system.NativeStart.main(Native Method)
[ERROR] :  TiApplication: Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
[ERROR] :  TiApplication:   at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:108)
[ERROR] :  TiApplication:   at android.support.v7.app.ActionBarActivityDelegateICS.onCreate(ActionBarActivityDelegateICS.java:57)
[ERROR] :  TiApplication:   at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:98)
[ERROR] :  TiApplication:   at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:511)
[ERROR] :  TiApplication:   at org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:18)
[ERROR] :  TiApplication:   at android.app.Activity.performCreate(Activity.java:5122)
[ERROR] :  TiApplication:   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1081)
[ERROR] :  TiApplication:   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2270)
[ERROR] :  TiApplication:   ... 11 more

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>