codenameone

Codename one separate class along with statemachine class

白昼怎懂夜的黑 提交于 2020-01-04 06:50:06
问题 I am working a project in gui builder..As my project is growing bigger and bigger, i find it hard to search a particular forms and methods all in a statemachine class. so i wanted to create a separate class for each form. but since the gui builder create the methods automatically in statemachine which extends statemachineBase class. how can i use separate class for separate gui forms so that they automatically create methods in the designated class. for instance when i click before show event

barChart starts from Middle of Screen instead of Top , why?

走远了吗. 提交于 2020-01-03 04:51:13
问题 When I have set height of barChart to screenHeight then the chart starts from middel of screen ,it should start from top of Screen and its screenshot is attached Tabs chartTabs = new Tabs(); chartTabs.setPreferredH(screenHeight); chartTabs.addTab("", icon1, new BarChartGenerator().getBarChart(dealersNames, dealersValues)); public Component getBarChart(ArrayList<ArrayList<String>> nameList, ArrayList<ArrayList<Double>> valueList) { String[] titles = new String[]{"2017"};

Codename One - RegexConstraint to check a valid phone number

六月ゝ 毕业季﹏ 提交于 2020-01-03 02:22:16
问题 In the following code, the RegexConstraint doesn't work, because the phone number results always incorrect. What's wrong? I need to check a mobile phone number (without the country code). For example, the input 3652312453 should be correct, but in the following code it's evaluated as incorrect. I copied the regex from the discussion linked in the comment: my only requirement is a valid phone number. (Note: this question is not for generic Java, but only for Codename One. The class

Create something similar to the iPhone camera functions selector in Codename One

守給你的承諾、 提交于 2020-01-03 01:09:08
问题 In this picture, there is a screenshot of the iPhone camera functions selector: the user can horizontally scroll them, and the function name moved to center is selected (it changes its color and it calls a listener that activate the function). It's easier to test on a real iPhone than to describe. The behavior is very similar to the lightweight string picker, but the main differences are that it's horizontal and it's always shown (while the string picker can be opened and closed). At the

Codename One - Style border of overflow menu

久未见 提交于 2020-01-03 00:57:15
问题 I'm try to style the border of the overflow menu. Right now it looks like this. I want to give it a small black border instead of the blue it is now. I've tried the Menu in the Designer but no luck there. 回答1: Open the TitleCommand UIID. Go to the Border style and click "Override". Click the ... button. Pick line border and uncheck the "Theme Colors". Select the color you want for the border and its thickness. 来源: https://stackoverflow.com/questions/53049869/codename-one-style-border-of

Codename one Native Map not showing

爱⌒轻易说出口 提交于 2020-01-02 20:46:19
问题 I'm using the native map CN1Lib for my project. I followed the instructions from here and added the required build hints. In simulator the map looks fine but when I export it to android (debug on android studio), the map only shows as a gray rectangle with "Google" on the left bottom. I thought it was a problem about google api so I created a few new api keys at google console. All keys were not limited. Google Maps Android API was also enabled, but the problem persists. I've also checked

How to remove a command added to the Toolbar using addCommandToRightBar(Command)?

戏子无情 提交于 2020-01-02 19:37:09
问题 after having added a command to the Toolbar using addCommandToRightBar(Command), I want to remove or hide the command again (e.g. when I select/unselect on a specific tab in Tabs). In the SideMenuBar there is removeCommand(Command) for this, but I can't figure out how to do the same for Toolbar. Any suggestions how I can achieve this? Thanks 回答1: removeCommand works but you should remember to revalidate() : Toolbar.setGlobalToolbar(true); Form hi = new Form("Bar"); Command cmd = hi.getToolbar

Build problems with CodenameOneCameraKit.cn1lib

痴心易碎 提交于 2020-01-02 18:36:29
问题 I am trying to run the demo program for the CodenameOne CameraKit: https://github.com/codenameone/CameraKitDemo/ after reading https://www.codenameone.com/blog/camerakit-low-level-camera-api.html It compiles and runs in the simulator, but when I send it to the server to build, it gives me a build error. Am I missing something? I am using the IntelliJ IDE: IntelliJ IDEA 2018.1.1 (Community Edition) Build #IC-181.4445.78, built on April 9, 2018 JRE: 1.8.0_152-release-1136-b27 x86_64 JVM:

Cannot find type System.ApplicationException in module CommonLanguageRuntimeLibrary

做~自己de王妃 提交于 2020-01-02 12:16:03
问题 I ran a 3rd party Android library through CodenameOne's version of IKVM and successfully imported the output .dll as a reference to my UWP app in Visual Studio. Upon trying to compile the project I get a single build error: (from the Error List window) Cannot find type System.ApplicationException in module CommonLanguageRuntimeLibrary (from the Output window) Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v14.0\8.2\Microsoft.Windows.UI.Xaml.Common.targets(352,5): Xaml Internal Error error

Cannot find type System.ApplicationException in module CommonLanguageRuntimeLibrary

[亡魂溺海] 提交于 2020-01-02 12:15:34
问题 I ran a 3rd party Android library through CodenameOne's version of IKVM and successfully imported the output .dll as a reference to my UWP app in Visual Studio. Upon trying to compile the project I get a single build error: (from the Error List window) Cannot find type System.ApplicationException in module CommonLanguageRuntimeLibrary (from the Output window) Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v14.0\8.2\Microsoft.Windows.UI.Xaml.Common.targets(352,5): Xaml Internal Error error