Latest posts from Codename One.
Blog

Codename One 3.2 Now Live
We are thrilled to announce the immediate availability of Codename One 3.2! Version 3.2 sets the pace for many upcoming features & migration processes such as the new cloud infrastructure for push servers, modernized GUI builder etc. Codename One 3.3 is currently scheduled for January 27th 2016 and should continue the trend of iterative changes that form a larger platform evolution arch. Highlights Of The Release – Click For Details ____New GUI Builder (technology preview) ...

Terse Syntax, Migration Wizard & more
In this last minute before 3.2 finally comes out we have a batch of new features & updates. Some of the last minute features that went into Codename One include: shorter more terse syntax for creating forms, migration wizard for the new GUI builder & dialog adaptive sizing. Better Syntax For Populating Containers and Toogle Buttons Codename One is slightly verbose. In part its due to Java’s tradition of verbosity but some of that comes from the fact that we never considered terse to be a virtue. Obviously a lot of developers disagree with that notion and would like shorter syntax, which does have a point… One such small modification of the “why didn’t we do this sooner” variety is new methods we added to container that are shorter (add instead of addComponent) but also return the Container instance thus allowing chaining. E.g. this is taken directly from the KitchenSink’s input demo: ...

I Am Your Density
This morning I was awoken by myself – or rather the 1985 version of myself. He (I’ll refer to the 1985 version of myself in the 3rd person here forward) was in a panic and was yammering about something to do with changing history. He asked why my pants were inside out, and I wondered why he was wearing a life preserver. According to him, he had driven a time machine from 1985 to this day (October 21, 2015) in the future to stop me from making a terrible mistake. I asked him: “What mistake?”, to which he produced a 3.5 inch floppy disk. ...

Rounded Corners, Gradients, and Shadows with CSS
Codename One provides you with the tools to craft a visually stunning and unique user interface via its pluggable look and feel. For simple use cases, you can define styles entirely by setting style properties either in code or the resource editor. However, to achieve best results (for anything more complicated than a solid background color with a rectangular border), you will often want to use image borders and backgrounds. The usual process for styling elements in Codename One is: ...

GUI Builder Walkthru
Since we announced the new GUI builder work we got quite a few questions in the discussion forum and offline so I prepared a quick video showing how the new GUI builder will look when released (more or less). Notice that a lot of things will change with the GUI builder but some things are pretty much fixed such as the basic architecture with the XML to Java process. This is unlikely to change much. ...

Integrating 3rd Party Native SDKs Part III
This is the third and final instalment in a series on integrating 3rd party native SDKs in your Codename One application. If you missed the first two chapters, I recommend you begin with part one before reading this tutorial, as it provides much needed context for the procedures described here. Part 2: Implementing the iOS Native Code Part 1 of this tutorial focused on the Android native integration. Now we’ll shift our focus to the iOS implementation. ...

Release Plan For 3.2 & New Approach To Demos
Codename One 3.2 is scheduled for Tuesday the 27th of October. In keeping with our successful 3.1 release we’ll use a very short one week code freeze on the 20th of October at which point we will only commit crucial fixes with code review. I hope we can land quite a few new features for the release, the GUI builder is getting very close although its still a very rough product and will only be featured as a “technology preview” showing the direction we are heading rather than a final product. ...

Integrating 3rd Party Native SDKs Part II
This blog post is part two in a three-part series on integrating 3rd party native SDKs into Codename One application. I recommend you start with part one in this series as it will give you much-needed context to understand the procedures described in part two and three. In part one, we described the design and development of the public API and native interfaces of the Codename One FreshDesk library. In this installment we’ll move onto the development of the Android side of the native interface. ...

Local Notifications on iOS and Android
We are happy to announce support for local notifications on iOS and Android. Local notifications are similar to push notifications, except that they are initiated locally by the app, rather than remotely. They are useful for communicating information to the user while the app is running in the background, since they manifest themselves as pop-up notifications on supported devices. Sending Notifications The process for sending a notification is: ...

Integrating 3rd Party Native SDKs Part I
This past Thursday, we held our fourth webinar, and the topic was how to incorporate 3rd party native libraries into a Codename One app. I used the recently released FreshDesk cn1lib as a case study for this webinar. As the topic is a little involved, I decided to break it up into two webinars. In part one, we focused on the public API and architecture involved in developing a wrapper for a native SDK, and walked through the native implementation for Android. ...

Updated Parse Lib, Tiling Performance, Decimals & Trees
The excellent Parse4cn1 library just announced version 1.1. The biggest new feature is batch operations but there are a few others that could be helpful. Overall the library was pretty solid before the 1.1 version and this is a nice improvement on top. Fabricio Cabeca contributed an interesting pull request that has the potential to improve performance nicely on most platforms. Hopefully we’ll fix the issues in this approach and get it up again. ...

New GUI Builder
Our GUI builder is the result of many twists and turns in our product line mostly due to corporate bureaucracy hacks and last minute deadlines from our days at Sun. Its also written using Swing which is pretty much a dead end API that isn’t seeing any maintenence and since FX is even worse off there isn’t much hope for the tools future. The GUI builder is also one of the most controversial parts of our UI. While it has its strengths and simplicities its UI could do with a facelift and its architecture was designed before tablets existed. It was designed when Apple just barely surpassed Blackberry sales and had just announced the iPhone 4 (first with Retina display). ...