Android Question stdactionbar transparent

Shivito1

Active Member
Licensed User
When I use the following theme with stdactionbar I get errors. is what I'm doing not possible?
B4X:
SetActivityAttribute(Main, android:theme, @style/CustomActTheme)
CreateResource(values, theme.xml,
<resources>
<style name="CustomActTheme" parent="@android:style/Theme.Material">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:backgroundDimEnabled">true</item>
<item name="android:windowFullscreen">true</item>
<item name="android:colorPrimary">#f44336</item> <!-- action bar -->
<item name="android:colorPrimaryDark">#b71c1c</item> <!-- status bar -->
<item name="android:colorAccent">#2DEA6A</item> <!-- Seekbar,, checkboxes,, switches,, etc. -->
<item name="android:textColorPrimary">#00FF00</item> <!-- ? -->
<item name="android:textColorSecondary">#FF00FF</item> <!-- inactive editText line,, scrollbar -->
<item name="android:textColor">#FFFFFF</item> <!-- menu text,, msgbox title -->
<item name="android:textColorLink">#b71c1c</item>
<item name="android:textColorHighlight">#FF9F9F</item>
</style>
</resources>
)


Release error:
B4X:
main_activity_create (java line: 346)
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.ActionBar.setListNavigationCallbacks(android.widget.SpinnerAdapter, android.app.ActionBar$OnNavigationListener)' on a null object reference
    at anywheresoftware.b4a.objects.StdActionBar.SetListItems(StdActionBar.java:235)
    at b4a.example.main._activity_create(main.java:346)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:179)
    at b4a.example.main.afterFirstLayout(main.java:102)
    at b4a.example.main.access$000(main.java:17)
    at b4a.example.main$WaitForLayout.run(main.java:80)
    at android.os.Handler.handleCallback(Handler.java:751)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6780)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1496)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1386)
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.ActionBar.setListNavigationCallbacks(android.widget.SpinnerAdapter, android.app.ActionBar$OnNavigationListener)' on a null object reference
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
main_activity_pause (java line: 368)
java.lang.NullPointerException: Attempt to invoke virtual method 'android.app.ActionBar$Tab android.app.ActionBar.getSelectedTab()' on a null object reference
    at anywheresoftware.b4a.objects.StdActionBar.getSelectedTab(StdActionBar.java:249)
    at b4a.example.main._activity_pause(main.java:368)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:179)
    at b4a.example.main.onPause(main.java:266)
    at android.app.Activity.performPause(Activity.java:7139)
    at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1330)
    at android.app.ActivityThread.performPauseActivityIfNeeded(ActivityThread.java:4165)
    at android.app.ActivityThread.performPauseActivity(ActivityThread.java:4142)
    at android.app.ActivityThread.performPauseActivity(ActivityThread.java:4116)
    at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:4090)
    at android.app.ActivityThread.-wrap18(ActivityThread.java)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1651)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at anywheresoftware.b4a.Msgbox.waitForMessage(Msgbox.java:198)
    at anywheresoftware.b4a.Msgbox.msgbox(Msgbox.java:137)
    at anywheresoftware.b4a.BA.ShowErrorMsgbox(BA.java:238)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:217)
    at b4a.example.main.afterFirstLayout(main.java:102)
    at b4a.example.main.access$000(main.java:17)
    at b4a.example.main$WaitForLayout.run(main.java:80)
    at android.os.Handler.handleCallback(Handler.java:751)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6780)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1496)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1386)
java.lang.NullPointerException: Attempt to invoke virtual method 'android.app.ActionBar$Tab android.app.ActionBar.getSelectedTab()' on a null object reference
** Activity (main) Resume **
 
Top