so I'm trying to style my application, and I've run into problems when using the Holo theme. I have no intrest in earlier versions of android, so I'don't want to use AppCompat. To do my error checking I have created an empty app with one blank activity. This is my styles.xml:
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="@android:style/Theme.Holo.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="android:actionBarStyle">@style/AppTheme_ActionBarTheme</item>
</style>
<style name="AppTheme_ActionBarTheme" parent="@android:style/Widget.Holo.Light.ActionBar">
<item name="android:background">@color/light_green</item>
<item name="android:titleTextStyle">@style/AppTheme_ActionBarTheme_Text</item>
</style>
<style name="AppTheme_ActionBarTheme_Text" parent="AppTheme_ActionBarTheme">
<item name="android:textColor">@color/light</item>
</style>
</resources>
and this is my AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://ift.tt/nIICcg"
package="com.fokamb.chmielowskim.fokamb" >
<uses-sdk android:targetSdkVersion="15" android:minSdkVersion="14"/>
<application
android:allowBackup="true"
android:label="@string/app_name"
android:theme="@style/AppTheme"
>
<activity
android:name=".MainActivity"
android:label="@string/main_act_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
I didn't change any other files, and I tried running this app on an emulator with API level 21 and my phone with api 19. On both, i get the message "Unfortunately, FokaMB has stopped" Even though, in the preview window in android studio the app looks the way I would've liked it to. So, where might be my mistake? If I use AppCompat app works fine, but im unable to change the text color of actionbar (even though the background changes). Any help would be greatly appreciated:)
No comments:
Post a Comment