codenameone

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

…衆ロ難τιáo~ 提交于 2019-12-21 20:10:28
问题 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

How to achieve Floating Action Button in Codenameone?

余生颓废 提交于 2019-12-21 17:22:10
问题 Floating Action button in android is good option. I want this in my codenameone application. I have tried it by using LayeredLayout, by having two layouts. I'm unable to achieve it perfectly. The button is keep moving along with the scroll. how to fix the button to the right bottom of the screen without affecting when the background layer is scrolling. Here is how i tried. Form myForm = new Form(); myForm.setLayout(new LayeredLayout()); myForm.setTitle("Floating Action Button"); SpanLabel lbl

How to make a round Progress Bar in codename one?

主宰稳场 提交于 2019-12-21 05:12:27
问题 I want to create a round progress bar, depicting the current status in percent in its mid. like this: now I already followed the instructions on creating a flat progress bar, but as I am not familiar with swing and I don't have any clue of Javas graphics, I have no clue how to transfer from the 'flat' to the 'round' progress bar. How could a code similiar to the progress bar look like? ps: I saw Hannahs post on the analog clock and tried it like this - but failed due to my lack in painting

Google doc no preview available error

≡放荡痞女 提交于 2019-12-20 09:38:36
问题 I used the google doc to display the pdf file in web broswer. It was working fine before. Now it gives no preview available. Most of the time it gives the blank screen with no preview available but sometime it opens the pdf. However i noticed that if the size of the pdf is small, it works fine but if the size is a bit larger with 10-100 or more pages, the no preview is shown. link: https://docs.google.com/gview?embedded=true&url=http://trafficpolice.gov.np/traffic/uploadfiles/56a0e8156d4ea

CodenameOne stopped working after build

泄露秘密 提交于 2019-12-20 07:29:26
问题 I have an odd issue with codenameone, and I'm not even sure what went wrong. I've tried to "send windows phone build", and don't think I have changed anything else since then. However, after I did so the simulator wouldn't launch and kept saying my imports were wrong. They weren't, the suggested solution was importing once that were already in. The errors I get Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

CodenameOne stopped working after build

断了今生、忘了曾经 提交于 2019-12-20 07:28:22
问题 I have an odd issue with codenameone, and I'm not even sure what went wrong. I've tried to "send windows phone build", and don't think I have changed anything else since then. However, after I did so the simulator wouldn't launch and kept saying my imports were wrong. They weren't, the suggested solution was importing once that were already in. The errors I get Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

Codenameone Layered Layout

若如初见. 提交于 2019-12-20 06:28:11
问题 I have two containers on a layered layout say c1 and c2. c1 has a lot of buttons, drag n drop etc. c2 has a translucent background for the entire screen with a centre aligned image and a close button. I need to be able to automatically disable all actions for c1 when c2 is added over c1. While I can handle this programatically when c2 is added over c1 during runtime, it would great to automatically disable all events for c1. Is there a better way to handle this ? Thanks 回答1: I think making

How to check if an app has already been purchased - CodenameOne

旧街凉风 提交于 2019-12-20 04:22:33
问题 My application can buy an in-app product which I have configured on the google developer account. The product is a buy-once product. I would like to know how to check if this item has already been bought (in codenameone) and handle it based on result of query. Here is a code extract: if(p.isManagedPaymentSupported()) { if(p.wasPurchased(id)){ boolUpdate = true; Form f = (Form)createContainer(resPath,"Search"); beforeSearch(f); f.show(); }else{ Display.getInstance().callSerially(new Runnable()

How to show two or more label at centre of the container in codenameone

强颜欢笑 提交于 2019-12-19 04:33:05
问题 I am new for Codenameone Is there any option to align a label depends on another label like align bottom, top, right and left option? How to align many labels at the centre of the parent layout? Here I have attached the code I tried for: Container center = new Container(new BorderLayout()); Label des = new Label((String) data.get("title")); des.setUIID("MultiLine2"); center.addComponent(BorderLayout.NORTH,des); Label author = new Label((String) data.get("author")); author.setUIID("MultiLine2"

NSAllowsArbitraryLoadsInWebContent in CN1

主宰稳场 提交于 2019-12-19 04:23:27
问题 I'm trying to deal with Apple's http restrictions on Codename One. According to iOS Cocoa keys doc, NSAllowsArbitraryLoadsInWebContent will work on iOS 10 following these instructions: An optional Boolean value that applies only to content to be loaded into an instance of the following classes: WKWebView UIWebView (iOS only) WebView (macOS only) Set this key’s value to YES to obtain exemption from ATS policies in your app’s web views, without affecting the ATS-mandated security of your