codenameone

Cannot find type System.ApplicationException in module CommonLanguageRuntimeLibrary

断了今生、忘了曾经 提交于 2020-01-02 12:15:16
问题 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

Codename One - Mask and Unmask Password Field on iOS

只谈情不闲聊 提交于 2020-01-02 08:57:11
问题 TextField password = new TextField("", "Pass Word", 15, TextField.PASSWORD); CheckBox maskAndUnmaskCheck = new CheckBox(); maskAndUnmaskCheck.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent evt) { if(maskAndUnmaskCheck.isSelected()) { password.setConstraint(TextField.ANY); } else{ password.setConstraint(TextField.PASSWORD); } } }); We are using the above code to display the password without mask i.e showing the text that what he types when a user

How to add gradle library dependency to a codenameone project

橙三吉。 提交于 2020-01-01 17:14:36
问题 Normally in android I can just edit the build.gradle file and place my compile dependencies like this: dependencies { compile 'com.android.support:support-v4:23.+' compile 'com.google.android.gms:play-services-plus:8.3.0' compile 'com.google.android.gms:play-services-auth:8.3.0' compile 'com.google.android.gms:play-services-base:8.3.0' } How can I add a compile dependency in a codenameone project? 回答1: The generated project utilizes the jcenter() repository. In order to add a compile

How to add gradle library dependency to a codenameone project

旧街凉风 提交于 2020-01-01 17:12:34
问题 Normally in android I can just edit the build.gradle file and place my compile dependencies like this: dependencies { compile 'com.android.support:support-v4:23.+' compile 'com.google.android.gms:play-services-plus:8.3.0' compile 'com.google.android.gms:play-services-auth:8.3.0' compile 'com.google.android.gms:play-services-base:8.3.0' } How can I add a compile dependency in a codenameone project? 回答1: The generated project utilizes the jcenter() repository. In order to add a compile

AdMob ads not showing in iOS

冷暖自知 提交于 2020-01-01 11:55:29
问题 AdMob ads are not showing for iOS builds in the last couple of days. It used to work and I didn't change anything. iOS - 9.3.5 IDE - NetBeans 8.0.2 CodenameOne Plugin - 3.5.2 OS - Windows 7 回答1: Google deprecated the old admob library and discontinued it. We need to update to the latest version for ads to keep working. We plan on updating the cn1lib within the near future, I'm assuming that is the implementation you are referring to. 回答2: AdMob ads are not showing because for iOS 9 http URL’s

Codename One - Modify a font size in a theme like in an hashtable

丶灬走出姿态 提交于 2019-12-30 11:34:07
问题 In the previous question Codename One - Method to enlarge or reduce all the fonts in all the styles I replied with a method that iterates all the values of a theme and, if a given value is an istance of Font, it changes its font size of a given percentage. The problem is that it doesn't work as expected, because some fonts are changed and others are not. For example, if I have the following font size of a Label (3.1mm) in my theme.xml, that Label font size it's not changed: <font key="Label

How to change the color of the status bar in a codenameone android app?

雨燕双飞 提交于 2019-12-30 05:24:07
问题 I would like to change the color of the status bar to match my app background, how can I do this? 回答1: It is possible by placing a colors.xml file under the CN1 project <project>/native/android directory with the following example content: <resources> <color name="colorPrimary">#ffffc003</color> <color name="colorPrimaryDark">#ffffc003</color> <color name="colorAccent">#ff009486</color> </resources> Where in this case the colorPrimaryDark is the color you would like to color the status bar 来源

Chart does not render with the new CN1aChartEngine library

…衆ロ難τιáo~ 提交于 2019-12-25 08:53:55
问题 Here is the code: public Component getCombinedTemperatureChart(Context context) { /** * Title for each line */ String[] titles = new String[]{"Temp 1", "Temp 2"}; /** * x-axis values */ List<double[]> x = new ArrayList<double[]>(); for (int i = 0; i < titles.length; i++) { x.add(new double[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}); } /** * Value sets */ List<double[]> values = new ArrayList<double[]>(); values.add(new double[]{12.3, 12.5, 13.8, 16.8, 20.4, 24.4, 26.4, 26.1, 23.6, 20.3, 17.2,

Download Audio File From Url To Storage And Play On Download Complete In Codename One

牧云@^-^@ 提交于 2019-12-25 04:44:13
问题 I am developing an application using codenameone that needs to download an audio file (mp3) from a remote server, and then play it once the download is complete. I want it to happen once a button is clicked, but so far...all i see in the simulator is the infinite dialog and nothing else. I am using java 7 on my development pc. Here are relevant code snippets: ok.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { String file=_cat+".mp3"; String path="/"+file

CodeNameone Simulator Launch Issue

∥☆過路亽.° 提交于 2019-12-25 02:45:00
问题 I am facing issues with Codenameone after recent JDK upgrade. Tried to resolve it in multiple ways but no luck. jar: [echo] Compile is forcing compliance to the supported API's/features for maximum device compatibility. This allows smaller [echo] code size and wider device support [copy] Copying 2 files to C:\Appstek\Workspace\AppsMobile\build\tmp [javac] C:\Appstek\Workspace\AppsMobile\build.xml:130: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to