I would like to add a simple button to my AndroidHarness based activity.
what is the best practice to do so?
the AndroidHarness GLSurfaceView is stretched all over the activity and I want a button above it in the center-bottom of the screen.
I prefer it will be a simple regular android button but if there is a JME dedicated UI element I’ll settle for it as well.
Looking for best practice for adding UI elements to my app.
Regarding GUI libraries… Last time i tried Lemur on android it had issues loading groovy-all - which i think paul actually wanted to look into but nobody was up for helping much. That leaves you with Nifty or TonegodGui. I cant really decide which one you should use, but those are the “out of the box” choices you have.
Yeah it’s a bit difficult to use Android stuff in jME. However, if you really want something like that, you can look at the file “src\main\res\layout\main.xml” or something. With button it should look like this:
Correct me if i’m wrong guys - it seems that Nifty is the “official” UI package for JME?
I’m trying to decide where to put my learning efforts.
So - which is the best UI package to use for the long term in your opinion?
I personally think Lemur is much much much much more jme aware as it has Spatials and the like you know from jme. Nifty is just a gui lib which also work with jme.
I worked with both and I like Lemur better (ok it lacks documentation a bit )
For some reason Lemur brings JME (ext.jmeVersion=‘3.1.0-alpha4’ // but must be alpha4 or better) Alpha version which collides with the current JME i’m using in my project.
Is there a way to tell it (in the gradle file) not to bring JME with it?
I’m using JME 3.1.0-stable. I have added it as a jar dependency so for some reason it collides with the JME3.1.0-alpha4 that gradle brings with Lemur.
Anyway, I managed to overcome the problem by removing the JME jar (from the dependency tab) and bring it via gradle. Now it works but I’m getting run-time exception regarding missing bulletjme??
All I wanted is to add a simple button to my Android activity
Can anyone assist with this bulletjme run-time problem - what should I do?
I started using the SDK and it worked great. Then I tried to add Lemur via gradle and I started getting all kind of errors. Do you suggest working only with gradle?
What will my gradle dependencies will look like? I need JME+Lemur and it is an Android project
OK, removed all the gradle stuff and now adding the JARS in my project and getting this at run-time:
java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/script/ScriptEngineManager;
OK, so I remarked the two lines loading the “glass” style and now the app doesn’t crash and I can see the UI elements. It’s a major progress
Here is a link to my app in action. It’s going to be some kind of 3D scripting language for kids: https://www.youtube.com/watch?v=e9NX2U7vxV8