Android / jME questions: GUI

My bad, you were right, the problem still there. I was mistaken with how to reproduce the problem.

Now that I can see the problem again, yes, it seems to be that the guinode is reversed. Things that aren’t overlapped are just fine. However, the stats are reversed too.

The problem pops-up when the screen is turned off (and turned on again) and the screen locker is active. Without screen locker all works fine.

I think that this bug is related too.

So… finally it wasn’t a lemur’s problem but a jme3’s guinode’s management under android.

Just like you said. Lemur has nothing to do (just tried disabling the UI and the stats do still bugging).

Do you know who is the most indicated one to fix this?, I’ve been looking for that post you mention but I can’t find it :S (maybe you were talking about this one? - It seems that I’m a magnet for guinode reversing issues :chimpanzee_cry:)

1 Like

I am also able to replicate this issue (simply turning my phone on and off), and my stats screen turns invisible (probably because of culling).

UPDATE:
It also happens when I long press on my on/off button. I think this bug occures at onStop(), as it does not occur when I press the home button.
More info: Android Lifecycle

Yeah, I’m not sure what’s going on… the other devs read all of these posts, too. So hopefully someone can chime in.

Curious: how did you disable your gui? And did you no longer call GuiGlobals.initialize().

I could conceivably think of a way that Lemur might be involved but it would be related to GuiGlobals.initialize() being called more than once under some strange lifecycle circumstances. It would be nice to rule it in/out conclusively.

I removed the UI appstate from being added to the state manager. That appstate is the one that calls the GuiGlobals.initialize() and all the gui-node stuff, without it is like if the UI code had never existed. No lemur, no guiNode customization.

EDIT: That appstate initialization code is:

    @Override
    protected void initialize(Application app) {
        this.assetManager = app.getAssetManager();
        this.camera = app.getCamera();
        this.guiNode =  ((SimpleApplication)app).getGuiNode();

        GuiGlobals.initialize(app);
        LemurStyle.InitLemurStyle(assetManager);
        GuiGlobals.getInstance().getStyles().setDefaultStyle("glass");

        UiUtils.setWidth(camera.getHeight());
        UiUtils.setHeight(camera.getWidth());

        guiNode.setLocalRotation(UI_ROTATION);
        guiNode.setLocalTranslation(UI_TRANSLATION);
    }

The guiNode is never called from the app but there. And the same with the GuiGlobals (or any related UI thing)

Okay, I guess that definitely rules Lemur out, then. That’s good on the one hand.

Bad on the other because as least I had ideas. Now I must defer to others with Android app lifecycle + JME experience…

1 Like