Hello all,
i try to figure how to use an actionbar with the help of appcompat.
i have compiled the example and tried to implement it in my own app.
But the app crashed. After running it a second time, the debugger throws an error:
java.lang.RuntimeException: Unable to start activity ComponentInfo{b4a.MyFirstProgram/b4a.MyFirstProgram.main}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
Although i have implemented the manifestlines:
SetApplicationAttribute(android:theme, "@style/MyAppTheme")
CreateResourceFromFile(Macro, Themes.DarkTheme)
CreateResource(values, theme.xml,
<resources>
<style name="MyAppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">#0098FF</item>
<item name="colorPrimaryDark">#007CF5</item>
<item name="colorAccent">#AAAA00</item>
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="android:windowTranslucentNavigation">false</item>
<item name="android:windowTranslucentStatus">true</item>
</style>
</resources>
)
Do i somehow missing this dark.theme?
The Example runs without errors
i try to figure how to use an actionbar with the help of appcompat.
i have compiled the example and tried to implement it in my own app.
But the app crashed. After running it a second time, the debugger throws an error:
java.lang.RuntimeException: Unable to start activity ComponentInfo{b4a.MyFirstProgram/b4a.MyFirstProgram.main}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
Although i have implemented the manifestlines:
SetApplicationAttribute(android:theme, "@style/MyAppTheme")
CreateResourceFromFile(Macro, Themes.DarkTheme)
CreateResource(values, theme.xml,
<resources>
<style name="MyAppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">#0098FF</item>
<item name="colorPrimaryDark">#007CF5</item>
<item name="colorAccent">#AAAA00</item>
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="android:windowTranslucentNavigation">false</item>
<item name="android:windowTranslucentStatus">true</item>
</style>
</resources>
)
Do i somehow missing this dark.theme?
The Example runs without errors