I am using gluon mobile to build my app and I want to update the home window when switching to it with the view.getAppManager.goHome() but unlike setting a new scene in javafx this does not run the initialize function in my home controller.
At first I tried fixing it by changing the scene like in javafx but because the of the way that gluon mobile works it discards a lot of the benefits of the API, like the App bar and so on. I was hoping that there is an easy way to run initialize when switching a view. Another fix I tried is to make my update method public and run it through my other view controller but because I cannot make it satatic, I got nullPointerExeptions when making a new HomePresenter.myUpdateToHomeView. Does Someone know how to work around this?
Related
I am working on an application and want to use MaterialFX's dialog windows. I previously used JOptionPanes that were easy to code and did not require direct use of Scenebuilder/Java FX.
I looked through the author's github, Palexdev, and found this:
https://javadoc.io/doc/io.github.palexdev/materialfx/latest/MaterialFX/io/github/palexdev/materialfx/dialogs/package-summary.html
But I am still having difficulty creating them, so if anyone could point me in any direction that would be great. Thanks
This may be a silly question but I have the following situation: I want to setup my window layout every time the app is open, for example changing the status bar color. So I created my Application file because I heard it is better if you check something like this in the application file and not in the MainActivity.
Problem: How can I call the getWindow() method without an open activity.
Thanks for helping.
A bit tricky, but you can use Window manager in background-service to display your views without opening an Activity.
Also, for API Level 26+ (Oreo or above) you have to start your service as foreground service
I have made a light weight java web-server serving html files and static content (made with pure java library nanohttpd), i have successfully made a javaFX launcher window that has a single button, clicking button simply runs the server in the background and opens the localhost URL in Android/PC browser (I was unsuccessful in making an IOS version using javaFX)
I am thinking of using libGDX as "launcher window" because of IOS support and access to mobile specific hardware like SMS/GPS which javaFX don't have.
I am targeting IOS/Android/PC, I'd like to ask libGDX developers how possible is this given my target platforms?
Yes you can
There's a catch though, you may have to build the UI the game dev way
I've made a game or two using it and had rather steep learning curve in the beginning to get a hold on to how it worked. For example you'll have to provide the images for button, background and also, the pressed view of the button... like that. But your app is not a game. So you won't have to worry that much.
Once you learned how to place them in the screen successfully, there is not much to worry about because the API provides everything you need to carry on from there.
Also I found enough resources/tutorials online enough to make a game from ground up. So you'll definitely can.
And there's very little to worry about your multi-platform problem.
I am building an Android application for a Capstone class at my university with some other students. Our task is to implement open source games that run inside the application when they are selected.
I have done a lot of research looking around after having lots of trouble with it, and I have discovered that there is apparently no way to launch another app as a view in an already running app (you can only launch the outside app which will run on its own).
I saw some suggestions about fragments, but after looking into them, I don't think that fragments is possible either, since I'm trying to run a full application and not just a single class or two.
So am I correct in thinking that there is no way to do this without the already mentioned method of launching the app from inside the already running application, or would fragments be what I need to use to accomplish this?
I'm creating an app that is required to be used on older devices, I used the included source at https://developer.android.com/training/backward-compatible-ui/index.html to create the tabs but I would like to be able to switch between them using swipes.
Now I guess I probably messed everything up by using the java files in that training article and adapting it for my app, but I've got my app working exactly how I want it albeit without swiping.
So, start anew? or any other suggestions?