In order to use the support action bar, my activity has to extend ActionBarActivity, and when I do that and start the activity, the application crashes with:
Exception: You need to use a Theme.AppCompat theme (or descendant) with this activity.
In my styles.xml I have
<style name="AppBaseTheme" parent="@style/Theme.AppCompat.Light"></style>
And in my AndroidManifest.xml for the offending activity I have
<activity android:name="com.example.test3.SettingsActivity"
android:theme="@style/AppBaseTheme" />
All you need to do is add android:theme="@style/Theme. AppCompat. Light" to your application tag in the AndroidManifest. xml file.
426. An Android support library that enables the use of the ActionBar and Material Design specific implementations such as Toolbar for older devices down to Android v2.
You have to check for other folders, that contain styles files as well, that could possibly override your styles.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With