Latest posts from Codename One.
Blog

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. ...

KitchenSink II
I try all things, I achieve what I can. — Herman Melville Moby-Dick Opening with a Moby-Dick quote seems rather appropriate for taking on the kitchen sink demo. It often seemed like a task that is too big and unsurmountable as we were working our way thru it. In fact the version that we are releasing now has far less features and abilities than our original whiteboard… The kitchen sink was our first demo, we drew inspiration from previous demos we did at Sun where the custom is to show off every UI element. ...

Java 8 & API 23 defaults
One of the biggest changes we made in the past couple of years was the introduction of Java 8 language support features and making it the default target. We are now ready for the next step: removing compatibility for Java 5 targeted builds. Notice that this won’t break existing projects… They will compile with the retrolambda pipeline even if you set the build hint java.version=5. We are doing this so we can integrate Java 8 features into the core of the Codename One itself and make the implementation more efficient/easy. ...