Hi there!
I use StdActionBar successfully in one of my apps.
Now I am trying to use in another one and it causes an exception:
java.lang.NullPointerException
at anywheresoftware.b4a.objects.StdActionBar.setSubtitle(StdActionBar.java:218)
at yashar.yPainel.main._initappbar(main.java:1121)
at yashar.yPainel.main._doinicio(main.java:693)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:179)
at anywheresoftware.b4a.keywords.Common$5.run(Common.java:996)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4446)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
it happens shen using subtitle in this line:
This is the same code from my other working app. This is part of a initialization sub that I call using CallSubDelayed to be executed AFTER the Activity_Create is executed. Basically I just set the title and the background color of the bar.
I removed everything possible and the problem continues
thanks
I use StdActionBar successfully in one of my apps.
Now I am trying to use in another one and it causes an exception:
java.lang.NullPointerException
at anywheresoftware.b4a.objects.StdActionBar.setSubtitle(StdActionBar.java:218)
at yashar.yPainel.main._initappbar(main.java:1121)
at yashar.yPainel.main._doinicio(main.java:693)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:179)
at anywheresoftware.b4a.keywords.Common$5.run(Common.java:996)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4446)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
it happens shen using subtitle in this line:
B4X:
appbar.Initialize("appbar")
If AppManager.IsInitialized Then
Dim subtitle As String = s & "Versão " &AppManager.GetVersionCode
appbar.Subtitle = subtitle
End If
This is the same code from my other working app. This is part of a initialization sub that I call using CallSubDelayed to be executed AFTER the Activity_Create is executed. Basically I just set the title and the background color of the bar.
I removed everything possible and the problem continues
thanks