Search code examples
androidtitaniumtitanium-alloytitanium-modules

Titanium Actionbar Extras module issues


I am developing app in Titanium Alloy, and i want to use this module: actionbarextras module. I am pretty sure that i have done everything as it should be, but almost nothing works as expected. In my window controller i have added following lines of code:

_abx = require('com.alcoapps.actionbarextras');
_abx.setBackgroundColor("#ffffff");
_abx.title = "wewfwefwe";
_abx.hideLogo();

and in console, while app is starting i see following lines:

[WARN] :   W/System.err: java.lang.NullPointerException
[WARN] :   W/System.err:    at com.alcoapps.actionbarextras.ActionbarextrasModule.handleSetBackgroundColor(ActionbarextrasModule.java:261)
[WARN] :   W/System.err:    at com.alcoapps.actionbarextras.ActionbarextrasModule.handleMessage(ActionbarextrasModule.java:126)
[WARN] :   W/System.err:    at android.os.Handler.dispatchMessage(Handler.java:102)
[WARN] :   W/System.err:    at android.os.Looper.loop(Looper.java:136)
[WARN] :   W/System.err:    at android.app.ActivityThread.main(ActivityThread.java:5196)
[WARN] :   W/System.err:    at java.lang.reflect.Method.invokeNative(Native Method)
[WARN] :   W/System.err:    at java.lang.reflect.Method.invoke(Method.java:515)
[WARN] :   W/System.err:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
[WARN] :   W/System.err:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
[WARN] :   W/System.err:    at dalvik.system.NativeStart.main(Native Method)
[WARN] :   W/System.err: java.lang.NullPointerException
[WARN] :   W/System.err:    at com.alcoapps.actionbarextras.ActionbarextrasModule.handleSetTitle(ActionbarextrasModule.java:190)
[WARN] :   W/System.err:    at com.alcoapps.actionbarextras.ActionbarextrasModule.handleMessage(ActionbarextrasModule.java:118)
[WARN] :   W/System.err:    at android.os.Handler.dispatchMessage(Handler.java:102)
[WARN] :   W/System.err:    at android.os.Looper.loop(Looper.java:136)
[WARN] :   W/System.err:    at android.app.ActivityThread.main(ActivityThread.java:5196)
[WARN] :   W/System.err:    at java.lang.reflect.Method.invokeNative(Native Method)
[WARN] :   W/System.err:    at java.lang.reflect.Method.invoke(Method.java:515)
[WARN] :   W/System.err:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
[WARN] :   W/System.err:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
[WARN] :   W/System.err:    at dalvik.system.NativeStart.main(Native Method)
[WARN] :   W/System.err: java.lang.NullPointerException
[WARN] :   W/System.err:    at com.alcoapps.actionbarextras.ActionbarextrasModule.handleHideLogo(ActionbarextrasModule.java:544)
[WARN] :   W/System.err:    at com.alcoapps.actionbarextras.ActionbarextrasModule.handleMessage(ActionbarextrasModule.java:162)
[WARN] :   W/System.err:    at android.os.Handler.dispatchMessage(Handler.java:102)
[WARN] :   W/System.err:    at android.os.Looper.loop(Looper.java:136)
[WARN] :   W/System.err:    at android.app.ActivityThread.main(ActivityThread.java:5196)
[WARN] :   W/System.err:    at java.lang.reflect.Method.invokeNative(Native Method)
[WARN] :   W/System.err:    at java.lang.reflect.Method.invoke(Method.java:515)
[WARN] :   W/System.err:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
[WARN] :   W/System.err:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
[WARN] :   W/System.err:    at dalvik.system.NativeStart.main(Native Method)

I have checked .setTitle() and .getActionbarHeight() and first is not working, and second works... Does any one have issues with this module?

I am using Ti SDK 3.5.1, Alloy 1.5.1, tested on device with Android 4.4.4 and emulator Android 5.1.0 with same efect.


Solution

  • I'm the author of the module. Please ask this question in the Issues section on Github at https://github.com/ricardoalcocer/actionbarextras, so the team can check it out and react in case its a bug.

    R