Bug with Nifty and screenFullScreen

I have a Nifty GUI that is deployed on Android. For my app, I want to set:
[java]screenFullScreen = false;[/java]
When I do this, the “hit boxes” to register Nifty interacts gets shifted down the amount of pixels of the title bar. So if I have a button, I have to press below the button in order to get the button to register. I’m assuming that this is a bug?


1 Like

I came to report what @P-Worm said plus I get the error below when I click at a button. In order to make the button work I have to click a second button first and then click the button I wanted first in order to call a java method. Additionally, the second button I pressed in order to make things work, that button doesn’t work. In short, there’s this bug in nifty.

Moreover, my code used to work fine before I updated the nightly build. Also, it works fine form my windows 7 machine, it’s the Android part that doesn’t work.

I/System.out( 2125): X: 423.0303 Y: 534.125 Type: DOWN Id: 0
D/dalvikvm( 477): GC_FOR_ALLOC freed 121K, 19% free 12938K/15880K, paused 45ms, total 46ms
I/dalvikvm-heap( 477): Grow heap (frag case) to 13.019MB for 251120-byte allocation
D/dalvikvm( 477): GC_FOR_ALLOC freed 6K, 19% free 13176K/16128K, paused 47ms, total 47ms
I/InputReader( 477): Reconfiguring input devices. changes=0x00000004
I/InputReader( 477): Device reconfigured: id=2, name=‘elan-touchscreen’, size 800x1280, orientation 0, mode 1, display id 0
I/ActivityManager( 477): Config changes=1480 {1.0 310mcc?mnc en_US ldltr sw600dp w600dp h880dp 213dpi lrg port finger -keyb/v/h -nav/h s.7}
W/dalvikvm( 2125): threadid=1: thread exiting with uncaught exception (group=0x41d41930)
E/AndroidRuntime( 2125): FATAL EXCEPTION: main
E/AndroidRuntime( 2125): java.lang.NullPointerException
E/AndroidRuntime( 2125): at com.jme3.input.android.AndroidInput.onShowPress(AndroidInput.java:616)
E/AndroidRuntime( 2125): at android.view.GestureDetector$GestureHandler.handleMessage(GestureDetector.java:261)
E/AndroidRuntime( 2125): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 2125): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 2125): at android.app.ActivityThread.main(ActivityThread.java:5041)
E/AndroidRuntime( 2125): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 2125): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 2125): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
E/AndroidRuntime( 2125): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
E/AndroidRuntime( 2125): at dalvik.system.NativeStart.main(Native Method)
I/ActivityManager( 477): No longer want com.google.android.talk (pid 1300): empty #17
I/dalvikvm( 477): Jit: resizing JitTable from 8192 to 16384
D/dalvikvm( 477): GC_EXPLICIT freed 97K, 18% free 13236K/16128K, paused 7ms+5ms, total 74ms
BUILD STOPPED (total time: 3 minutes 45 seconds)

Does nifty work fine for everyone on Android or is it just me and P-Worm who are getting big bugs? Please answer so I can prepare myself to fix this.

Maybe the reused event pool is empty and then you get null when GestureDetector.OnGestureListener.onShowPress(MotionEvent) is called.