Latest posts from Codename One.
Blog

Questions of the Week XXIII
This has been a busy week with new features and some interesting announcements. We are releasing a plugin update today with a lot of fixes especially to the GUI builder which should be far more stable. NetBeans announced they will be moving to Apache and we volunteered to help. We’ll post some thoughts about this next week. Java One is coming back, again we chose not to go. I wanted to write a bit about it but didn’t find the time to put down my thoughts. Overall I love Java One, it’s loads of fun… But flying there from another continent is probably not the best use of our time/budget. ...

Why we don't Support the Full Java API
This is something we run into every week. A new Codename One user writes asks why “feature X” from Java isn’t supported. In this post we’d like to explain the “bigger picture” or why less is more… Supporting the full Java API in Codename One would be a mistake that will lead us down a problematic path. It would cost you a great deal in functionality, performance, portability, stability and more! ...

Floating Button
The material design floating action button is a powerful tool for promoting an action within your application. Quite a few Codename One developers implemented with own interpretation of this UI element and with the coming update we will have an official implementation. The FloatingActionButton is a round button that resides on top of the UI typically in the bottom right hand side. It has a drop shadow to distinguish it from the UI underneath and it can hide two or more additional actions under the surface. E.g. we can create a simple single click button such as this: ...

Round Border
Circles and completely round border sides are problematic for multi-resolutions. You need to draw them dynamically and can’t use image borders which can’t be tiled/cut to fit round designs. Up until now we recommended using background images or changing the design entirely but now we have a new option: RoundBorder. We designed the RoundBorder to enable two distinct types of borders: Circular borders – e.g. Android floating action ...
Different Icons
When we designed the icon for the new Kitchen Sink demo we tried to use material design principals. We thought it would look reasonable on iOS but it looked awful. So we decided to adapt the design and create a separate yet similar icon for iOS. This is actually quite common but many developers aren’t aware of how easy it is to do these sort of things. The build process for Codename One is mostly transparent and you can replace/customize pieces of it. In this case we edited the build.xml file and modified this build target: ...

Questions of the Week XXII
We made a lot of changes to Codename One over the past week but eventually decided to postpone the plugin update to next week so we can do more work on the GUI builder. We have quite a few new features and fixes lined up for next week already. On stackoverflow things were as usual: how to use phone contacts instead of gmail contacts for social app in codenameone Getting device contacts is actually easier than getting gmail contacts ...

New Peer & GUI Builder Tree
If you relied on the android.newPeer=false build hint it will no longer be available starting with this update. When you build for 3.5 you will still get the old behavior if you define that hint but otherwise it will be ignored. This is a precursor step to merging the newPeer branch into the main branch. It’s an important step to help us move forward with one code base! ...

Rating Widget
The two key factors to improve any product are: get help from your biggest fans & learn from your detractors. Obviously there is a lot of nuance to that wide reaching advice… Rating widgets embody this advice. They prompt a user for a rating. If it’s good we ask him to review the app in the appstore and thus bring more users. If it’s bad we ask him to tell us why! ...

3 Image Tools for App Marketing
Every now and again developers ask us how we do the graphics for our posts/promotions and up until recently the answer was “photoshop”. While knowing photoshop is still very worthwhile we still like these 3 tools that provide great shortcuts to creating both screenshots and art. The App Launchpad App Launchpad is a newcomer to the scene, it’s still a new tool at the MVP stage. The potential is still great and it generates reasonably attractive graphics such as these: ...

First UWP App and the Way Forward
The UWP (Universal Windows Platform) port is finally stable enough to get an app into the Microsoft store. Steve published out Solitaire demo into the Microsoft appstore and it passed thru the whole process. You can download it, install it on your device and try it. We’ll try to setup a company account to publish the kitchen sink as well moving forward. This is a huge step for the UWP port showing its maturity and readiness for prime-time. ...

Questions of the Week XXI
August is finally over and we can get back to our more usual brisk pace of progress! The xcode migration which was one of the biggest pains to go thru is also mostly behind us and we can now turn our gaze to improving Codename One and its general usage experience. This week was mostly uneventful in terms of stack overflow, the biggest news is the migration on Android to API level 23 which might include some issues. ...

Accordion Control & Xcode Migration Update
In the coming update we have a new API to expand/collapse an Accordion component programmatically similar to the Tree component. To achieve this we introduced three new API’s to the Accordion class: /** * Returns the body component of the currently expanded accordion element or null if none is expanded * @return a component */ public Component getCurrentlyExpanded(); /** * Expands the accordion with the given "body" * @param body the body component of the accordion to expand */ public void expand(Component body); /** * Closes the accordion with the given "body" * @param body the body component of the accordion to close */ public void collapse(Component body); All of these methods get/return the body of the accordion which is probably the best way to identify an accordion node. ...