codenameone

Adding image in java code in code name

雨燕双飞 提交于 2019-12-22 09:18:01
问题 I am new in code name one. I have to add image in a container(flow layout) with specific width and height. 1: codenameone's guide says that we have to add image in resource folder. Where is that resource folder? 2: To create image i am using createImage(path) of image class. if we put image file in resource folder then what is path of that image. 3: Is here any type restriction of image file in it. Please help. 回答1: When you put the image you would like to add in your src folder the code

Adding image in java code in code name

匆匆过客 提交于 2019-12-22 09:17:14
问题 I am new in code name one. I have to add image in a container(flow layout) with specific width and height. 1: codenameone's guide says that we have to add image in resource folder. Where is that resource folder? 2: To create image i am using createImage(path) of image class. if we put image file in resource folder then what is path of that image. 3: Is here any type restriction of image file in it. Please help. 回答1: When you put the image you would like to add in your src folder the code

Codename One Animation Trouble (also in Solitaire demo)?

一世执手 提交于 2019-12-22 08:55:25
问题 What happened to Codename One animations? I use a lot of them and as of december my app is no longer working. When I left things in June everything was fine (and was so for more than a year). My app is a draughts (checkers) game and is available in the app stores since 2013. After seeing the CN1 Poker demo, I completely rewrote my GUI as I wanted to add those kind of animations to my app. What happens now is that I suddenly get index out of bound exceptions. I narrowed this down to the

CodeName One error: cannot find symbol

冷暖自知 提交于 2019-12-22 08:23:53
问题 I have created a simple sample Application with CodeNameOne without any changes. Certificate and Provisioning file is available and configured as project properties. IDE: Eclipse Desktop OS: Windows Executing 'Send IOS Debug Build' starts the server build and shows the following error: /var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build5327647990993852705xxx/stub/TestBuildDeployStub.java /var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build5327647990993852705xxx/stub/TestBuildDeployStub

How to code an iPhone style popup menu in CN1?

吃可爱长大的小学妹 提交于 2019-12-22 01:15:59
问题 It has probably been covered before, but I couldn’t google anything. What is the best approach for making an iPhone-style pop-up selection menu like attached picture? I've tried with a Dialog , but I haven't found an elegant way to add the Commands so they appear nicely and both trigger the action and close the dialog at the same time. And showing a Cancel entry separately is not supported by a ComponentGroup . 回答1: See this sample: Form hi = new Form("Pop"); Button pop = new Button("Pop");

Reading JSON data that begins with [ and ends with ]

a 夏天 提交于 2019-12-21 22:15:12
问题 I'm using Java with a plugin for NetBeans called CODAPPS to retrieve, parse, and display JSON data. I'm following an example that used JSON data produced by Google's Firebase database, but I'm using SlashDB instead. For some reason the JSON data from SlashDB begins and ends with [ and ] , respectively. I get the following error: org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1] at org.json.JSONTokener.syntaxError(JSONTokener.java:433) at org.json

(Proguard) Server Build Error Codename One

纵饮孤独 提交于 2019-12-21 21:56:18
问题 After adding an Android Certificate in my project, the Codename One server started getting issues to build, then by asking the Codename One support, they told me it could be something related to the Proguard, so after disabling the Proguard by setting android.enableProguard=false which is not recommended right? So after doing it the Codename One server builds fine, but I want to keep the Proguard enable since it's the recommeded, but when I keep it enable the Codename One server gets build

CodenameOne background task for BluetoothLe connection

99封情书 提交于 2019-12-21 20:51:28
问题 I am developing an app using Codename One, which connects to a Bluetooth LE proprietary external device and logs received data (on average data arrives approximately once per second). I am using the Bluetooth LE CN1 library (a wrapper for Cordova Plugin). The app should be able to receive and log the data even when not in foreground, which I have no idea how to do in CodenameOne in a way that the system wont shut it down on its own. I've written a native Android app, where I use a service

Insert data in codename one resource file in command line or directly

北城以北 提交于 2019-12-21 20:12:18
问题 I’am currently write an application and i need to put a content directly in the resource file (theme.res). How can I achieve this? What about the binary format of the resource file? Is it possible to achieve the same thing with the use of CodenameOne designer tool in command line? I want to put a localization bundle in the RES file with my custom app. Thanks! 回答1: You can check the XML Team Mode flag in the designer tool and save. Once you do that you will see an XML file and a hierarchy next