Latest posts from Codename One.
Blog

Comparing QT and Codename One
We get a lot of requests to compare Codename One to other technologies and while we do have a comparison page it is somewhat static. Doing a comparison within a blog post does have the advantage of focusing on one technology and allowing comments. In this segment we’ll compare the venerable QT to Codename One. When developers started asking for this comparison I was of the opinion that it made no sense. The technologies are so far apart from one another that they defy any sensible comparison. I still think the conceptual difference is a bit too great but I’ll try to bridge some of the gap. ...

Issue Submission Guidelines
One of the best things in running an open source project is the high quality issues, we don’t always respond immediately and sometimes things get lost under our piles of work but we do appreciate the time you take to file issues. We’d like to define some guidelines for issue submission, this will make our job easier in processing/assigning & resolving issues as soon as possible. We don’t want this post to deter you from submitting an issue, it’s here to help. If something is unclear in this post just go ahead and submit or ask a question in the comments section below. ...

Code Freeze for 3.4
Today we are going into code freeze for Codename One 3.4 which is due one week from now, because of the fast release cycle we don’t need more than a week of code freeze to stabilize our current release. The code freeze applies only to the Codename One libraries and ports as those are the parts that will be inherent to the release. How does the Code Freeze Work? The pieces of Codename One that are frozen are effectively the entire github repository with the exception of the Codename One designer and JavaDoc comments. That means that we will avoid any non-critical commits to that change anything other than the designer or docs until next Tuesday. ...

Should we use Gradients?
With the latest version of the Android port we fixed a long running bug in gradient drawing on Android. Gradients should now work correctly and will also be performant potentially even faster than images on Android. Our standing recommendation is to avoid gradients as they pose a memory/performance penalty on most platforms and so this change raises the question of using gradients back into the forefront. We gave this some thought and decided to keep our existing recommendation to avoid gradients in favor of images but soften it. Performance of gradients isn’t tested as extensively across platforms, we don’t use them at all in our themes and so they are just not as robust as other elements. ...

Featured App – JAT Communication
The jat app is very similar to whatsapp in some regards but is more oriented towards group communication than SMS replacement. Over the past couple of weeks we picked it up as a great communication tool in our team. It uses push notifications to notify and activates accounts via SMS. This makes it very convenient for someone like myself who moves between devices constantly. Chat is a very common use case for developers in the Codename One community which is why I chose this app as one of our first highlighted apps. I highly recommend playing with the app to see some of the things you can do in Codename One. ...

Questions Of The Week II
This week felt slow as we were going thru it but as I was preparing this installment I was reminded just how much activity we had in stackoverflow this week. Codenameone : Alternative to webBrowsers This question was triggered by the desire for dynamic rich UI elements coupled with concern about an issue with the web browser component. It turns out that we just fixed that specific issue as we are moving into the final stretch before 3.4. ...

Open File & Rendering
As part of our continuing effort to squash bugs for the 3.4 release date we hit two major issues, the first of which is a long time RFE to fix PDF viewing on iOS & Android to work consistently. This also applies to any file opening in iOS/Android which should now be trivial with the Display.execute method. Just use that method on any file within your home directory in FileSystemStorage and it should launch the native app to view that file. ...

The Challenge of Multiline Strings
As part of the bug fixes for the 3.4 release we fixed issue #1725 which was surprisingly difficult to fix… As part of that fix we also added a new method to TextArea by the name of setActAsLabel which we now implicitly call in the SpanLabel & SpanButton classes. So why do we need that and why not just use the text area as it is? There are two basic challenges in multiline strings, the first is related to the way layout managers work. Layout managers set the X/Y/Size of the components dynamically based on available space. This seems simple enough until we get into the notion of nesting & changes. ...

New Getting Started Video – IntelliJ/IDEA Version
As I mentioned last week we are redoing a lot of our videos and this video will serve as a benchmark to where we want to be in terms of production. We just released a modified version of the video geared towards IntelliJ/IDEA users here. We are really excited about the new IntelliJ/IDEA plugin we released a couple of weeks ago and this video shows off some of it’s capabilities. ...

Edit UDID in Component Inspector
One of the hard things to debug in Codename One is UIID/Padding/Margin placement which is often tricky to get “just right”. I use the Component Inspector quite a lot to review a layout that misbehaves and gain further insight into what’s happening in runtime. __ | You can gain insight into the Codename One component hierarchy by running the simulator and selecting the Simulate → Component Inspector menu option. This will present the component hierarchy as a navigatable tree Up until now the Component Inspector was a “read only” tool, with the coming update it will gain the ability to edit the UIID field! ...

Why we Don't Import Android Native Code?
When we first started to present Codename One to investors a very prominent local investor said he’d commit to a round of funding if we allow Android developers to import native Android apps to Codename One. We passed on that which in retrospect might have been a mistake but the technical challenges were the main reason for that decision. Should we Support Android Native Code? Ignoring the technical issues involved this might seem like a “no brainer” for Android developers. But history teaches us otherwise… ...
Questions Of The Week I
I’d like to start a new weekly installment for the blog: “questions of the week”. I hope to have this as a regular Friday post to coincide with the Friday release process. The general idea of this post is to bring to your attention our answers to some stack overflow questions that might be helpful for the general community. We spend a lot of time answering stackoverflow questions and some of them are pretty elaborate, e.g “How Does Codename One Work?” is my highest rated answer and might be illuminating to many developers who are new to Codename One. ...