Open Source & Free ❤️

Archives: Blog

New Settings UI

With today’s update we’re releasing a design overhaul for the settings (preferences) application. This overhaul will improve the look and reliability/consistency of this app which is core to Codename One. During this transition period we also have the ability to go back to the legacy UI for 100% compatibility but it will be removed. Common

Big Changes and CEF

Today we released one of the biggest changes to Codename Ones simulator in ages. We added the ability to use CEF (Chrome Embedding Framework). This is currently off by default but even if you don’t use it you might feel the impact so it’s crucial that you read this post. Updated July 31st with additional

Diagonal Badging

Recently I got a question on stackoverflow about doing a diagonal badge that’s actually quite similar to the one on our website. This isn’t hard to do in Codename One but it requires a bit of tinkering so here’s how you would implement that. As a matter of fact the original code I provided in

Exif Orientation Tag and Smart Downloads

On some devices, Capture APIs return images with the correct orientation, meaning that they do not need to be changed to display correctly; on other devices, they return images with a fixed orientation and an EXIF tag that indicates how they must be rotated or flipped to display correctly. More precisely, the Orientation Tag indicates

Dark Mode

We recently added support to detect whether a device is running in dark/light mode based on this issue. Some of the code in the implementation is also derived from that issue submitted by Javier. Detecting Dark Mode Dark mode can be detected using APIs in the CN and Display classes. Specifically isDarkMode() and setDarkMode(Boolean). Notice

Moving Away from Java FX

Codename One itself never depended on JavaFX. This kept us small and performant. However, we need JavaFX to support HTML and media in the simulator and on the desktop ports. This was a choice we made easily back in the Java 8 days. JavaFX was integrated into the official JDK and this was an easy

Samsung Lowers Resolution Randomly

A few weeks ago we got this question on stackoverflow. At first I didn’t think this issue was special…​ But as the investigation continued it became clear that we’re facing a weird issue…​ The issue started innocently enough. A device whose native resolution is high was rendering the UI in low resolution. This can happen

RAD Chat Room – Part 5

This is part 5 of the RAD Chatroom tutorial. You can find part 1 here, part 2 here, part 3 here and part 4 here. Adding A Photo Capture Feature Most messaging applications include the ability to add photos to messages. Let’s add this feature to our chat app now. First we’ll define a new

RAD Chat Room – Part 4

This is part 4 of the RAD Chatroom tutorial. You can find part 1 here, part 2 here and part 3 here. Adding More Actions So far we’ve implemented the basic requirements of a chat room. It can display messages, show particpants, and it allows users to send new messages. Now let’s go a step

RAD Chat Room – Part 3

This is part 3 of the RAD Chatroom tutorial. You can find part 1 here and part 2 here. Adding Text Messages from Other Users Our current example only includes messages that the current user posted themself. I.e. We only have chat bubbles on the right-hand side of the view. Let’s add some more sample

RAD Chat Room – Part 2

This is part 2 of the RAD Chatroom tutorial. You can find part 1 here. Adding a “Send” Button A “Send” button is a pretty important part of any chat application. We’ll add a send button to our app by defining an action in our controller, and passing it to the ChatRoomView as follows. First

RAD Chat Room – Part 1

This tutorial describes how to use the RADChatRoom library to quickly and easily add a nice-looking, fully functional chat room to your Codename One application. This is part 1 of a multi-part series of posts over the next few weeks. The finished product will look like the following: You can download the full source of