gluon-mobile

How to make the SoftKeyboard show up again

冷暖自知 提交于 2019-11-29 15:53:42
When you hide the SoftKeyboard via the Android Back Button , touching the (still focused) inputNode won't make the keyboard show again. To solve this issue I'm using the following class: public class RefocusableTextField extends TextField { private Region fakeFocusTarget; public RefocusableTextField(String text) { this(); setText(text); } public RefocusableTextField() { fakeFocusTarget = new Region(); fakeFocusTarget.setManaged(false); getChildren().add(fakeFocusTarget); addEventFilter(MouseEvent.MOUSE_PRESSED, MouseEvent::consume); addEventHandler(MouseEvent.MOUSE_CLICKED, e -> { if (

Can't build a gluon project for mobile using gradle

我是研究僧i 提交于 2019-11-28 13:45:49
I followed the instructions on http://docs.gluonhq.com/charm/4.0.1/#_getting_started . I'm using eclipse 4.5.2 and JDK 1.8.0_102. I also downloaded Android Studio with the 24/25 API level SDK from https://developer.android.com/studio/index.html#Other . Here is what I did: downloaded gradle 3.1 and set up the environment variables so gradle -v returns the correct information. installed the eclipse gluon plugin version 2.4.0 from http://download.gluonhq.com/tools/eclipse/release installed Buildship 1.0.21 from Buildship - http://download.eclipse.org/buildship/updates/e45/releases/1.0 created the

getPublicStorage(“Pictures”) lists no files

北战南征 提交于 2019-11-28 13:12:26
Calling File picturesDir = Services.get(StorageService.class) .flatMap(s -> s.getPublicStorage("Pictures")) .orElseThrow(() -> new RuntimeException("Error retrieving public storage")); for (File pic : picturesDir.listFiles()) { System.out.println("file " + pic.getName()); } lists no files. I think it should list all files from my Image-Gallery on iPhone. Calling s.getPublicStorage("") it lists two folders though: gluon, Pictures. How can i access it properly? José Pereda As discussed previously in this question , on mobile there is no Swing or AWT, so once you have a JavaFX image, to retrieve

SwingFXUtils shows NoClassFoundError

余生颓废 提交于 2019-11-28 12:52:02
问题 I have tried to use the function SwingFXUtils.fromFXImage which raises NoClassFoundError exception. How can i save an image otherwise on Gluon mobile? 回答1: SwingFXUtils nor any Swing related classes are supported on Android. Based on your comments, you are using Charm Down PicturesService to retrieve an image from the camera and show it on an ImageView control: Services.get(PicturesService.class).ifPresent(service -> service.takePhoto(false).ifPresent(imageView::setImage)); And now you want

Gluon mobile cross-platform adsView

断了今生、忘了曾经 提交于 2019-11-28 10:54:19
问题 Is there any way to integrate ads such as Google's Admob library into gluon mobile on either android or iOS or hopefully both? This is the gradle file, I have downloaded the Google Play Services library and the google Repository : buildscript { repositories { jcenter() } dependencies { classpath 'org.javafxports:jfxmobile-plugin:1.2.0' } } apply plugin: 'org.javafxports.jfxmobile' repositories { jcenter() maven { url 'http://nexus.gluonhq.com/nexus/content/repositories/releases' } }

How to make the SoftKeyboard show up again

喜你入骨 提交于 2019-11-28 09:38:49
问题 When you hide the SoftKeyboard via the Android Back Button , touching the (still focused) inputNode won't make the keyboard show again. To solve this issue I'm using the following class: public class RefocusableTextField extends TextField { private Region fakeFocusTarget; public RefocusableTextField(String text) { this(); setText(text); } public RefocusableTextField() { fakeFocusTarget = new Region(); fakeFocusTarget.setManaged(false); getChildren().add(fakeFocusTarget); addEventFilter

Poor ListView performance on Gluon

人盡茶涼 提交于 2019-11-28 02:16:49
I have a custom ListCell implementation, shown in the picture below. The left side, which represents the date, consisting of 3 labels, put in a VBox and the "CounterContent" consisting of the counter, with a TextField for each digit, contained in a HBox , and two Hboxes containing labels for kWh, kWh/day and so on. And that seem to be just too much, to be running performantly. I've tried to load the data in a background task, showing a progress indicator, while the task is running, but unlike on desktop, on android the performance is very poor. Whenever I switch to the listview, the garbage

getPublicStorage(“Pictures”) lists no files

大兔子大兔子 提交于 2019-11-27 07:33:11
问题 Calling File picturesDir = Services.get(StorageService.class) .flatMap(s -> s.getPublicStorage("Pictures")) .orElseThrow(() -> new RuntimeException("Error retrieving public storage")); for (File pic : picturesDir.listFiles()) { System.out.println("file " + pic.getName()); } lists no files. I think it should list all files from my Image-Gallery on iPhone. Calling s.getPublicStorage("") it lists two folders though: gluon, Pictures. How can i access it properly? 回答1: As discussed previously in