Can't use it on my project. Got this.
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.app.ActionBar.setDisplayHomeAsUpEnabled(boolean)' on a null object reference
I copy the examples on the AppCompat project from Erel. The example works, but when added the reference and use it on my project, fails.
Any tips? I use b4a 8.50 This is my manifest.
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.app.ActionBar.setDisplayHomeAsUpEnabled(boolean)' on a null object reference
I copy the examples on the AppCompat project from Erel. The example works, but when added the reference and use it on my project, fails.
Any tips? I use b4a 8.50 This is my manifest.
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="28"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
SetApplicationAttribute(android:networkSecurityConfig, @xml/network_security_config)
SetApplicationAttribute(android:theme, "@android:style/Theme.Material.Light")
SetApplicationAttribute(android:theme, "@style/MyAppTheme")
CreateResource(xml, network_security_config.xml,
<network-security-config>
<base-config cleartextTrafficPermitted="true">
<trust-anchors>
<certificates src="system" />
</trust-anchors>
</base-config>
</network-security-config>
)
SetApplicationAttribute(android:theme, "@style/MyAppTheme")
CreateResource(values, theme.xml,
<resources>
<style name="MyAppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">#ff039be5</item>
<item name="colorPrimaryDark">#ff039be5</item>
<item name="colorAccent">#AAAA00</item>
<item name="windowNoTitle">true</item>
<item name="windowActionBar">true</item>
</style>
</resources>
)
CreateResource(values, dimen.xml,
<resources>
<dimen name="action_button_padding">10dp</dimen>
</resources>
)
CreateResource(values, colors.xml,
<resources>
<color name="actionbar">#ff039be5</color>
<color name="statusbar">#ff006db3</color>
<color name="textColorPrimary">#ffffffff</color>
<color name="navigationBar">#ff006db3</color>
</resources>
)