Latest posts from Codename One.
Blog

Downloads, Callbacks, Signature & More
We’ve had a busy week working with several customers on various tasks/issues as well as the documentation which is practically unrecognizable by now (more than 600 pages by now). As a result a lot of small fixes and enhancements were made to the code as well as one new niche component. ConnectionRequest.downloadImageToStorage We have multiple ways to download an image and our general favorite is the URLImage. However, the URLImage assumes that you know the size of the image in advance or that you are willing to resize it. In that regard it works great for some use cases but not so much for others. ...

It's Full Of Stars & Terse Commands
A very common UI pattern is the 5 star ranking system. Up until recently we always had the same answer when developers asked us how to implement it: “Use toggle buttons (CheckBox)”. This is still not a bad answer but we think there is a “better” simpler way to do this thru the Slider which was effectively designed with this usage in mind. The best way to do that is to just create two images with all 5 stars full and with all 5 stars empty and assign this to the Slider/SliderFull UIID’s. Keep in mind that you need to apply both to the selected and unselected states of the UIID’s. ...

ToastBar & Gaussian Blur
Just last week I wrote that we are making an effort not to add new features and we got foiled by a couple of new features. The main reason for this is paying customers who need to have a feature now. This makes it hard for us to focus completely, but it does keep the lights on here so we can’t really complain.+ To be fair, during this time we were able to almost double the page count of the developer guide from the 3.2 era to 584 pages at this moment and we still have a lot of work ahead of us in that department. ...

SEO, Gallery, Performance, JavaScript & Gradle
We are trying to improve the visibility of Codename One within search engines and as part of that we think we can also help you guys improve your visibility. When you submit your apps to the app gallery we provide dofollow links to your website/app store listings. We’d appreciate if you place dofollow links back to https://www.codenameone.com/ which you can place in a very hidden/unobtrusive way. This helps us increase our page rank and as a result will improve your page rank as we link back to you. ...

Component & Layout Galleries
As you know we’ve been working a lot on the docs both the developer guide and the JavaDoc’s, we nearly doubled the amount pages in the developer guide and we did it without “cheating” (e.g. cramming more stuff, increasing font size). You can see all that work in the developer guide section but what I want to discuss today is the new Component Gallery & Layout Gallery. Both of these are a result of the developer guide work; as we did that we mapped a lot of the work back into the JavaDocs and eventually edited the package.html files to produce that level of detail. We’re particularly proud of the fact that if you click almost any component or layout within those galleries you will see sample usage code that should help you get started with anything you need. ...

Understanding The Table Component
Table is a composite component (but it isn’t a lead component), this means it is a subclass of Container. It’s effectively built from multiple components. __ | Table is heavily based on the TableLayout class. It’s important to be familiar with that layout manager when working with Table. Here is a trivial sample of using the standard table component: Form hi = new Form("Table", new BorderLayout()); TableModel model = new DefaultTableModel(new String[] {"Col 1", "Col 2", "Col 3"}, new Object[][] { {"Row 1", "Row A", "Row X"}, {"Row 2", "Row B", "Row Y"}, {"Row 3", "Row C", "Row Z"}, {"Row 4", "Row D", "Row K"}, }) { public boolean isCellEditable(int row, int col) { return col != 0; } }; Table table = new Table(model); hi.add(BorderLayout.CENTER, table); hi.show(); ...

Android Gradle Build Status & Minor Changes
I’ve been remarkably busy working on issues and documentation so I neglected an important announcement I had to make. Over the weekend we flipped the default build from gradle back to ant. So effectively if you don’t set any build hint the behavior will be android.gradle=false which should work fine for most of you. This is temporary but we felt it was necessary as a stopgap measure. In other news it seems that fixing the Codename One documentation is like diving into a bottomless pit. When we started this effort the developer guide was 300 pages it is now approaching 500 pages and we aren’t close to half way thru… ...

A Thank You & an Important Update On Android Builds
We’d like to thank all of you who signed up to the pro subscription, the release of 3.3 is the perfect time to do that. So we are opening up the JavaScript build target for 1 year until March 1st 2017 to all current pro subscribers! If you have a pro subscription you can start sending a JavaScript build right away and experiment with porting your app to the web… If you don’t have a pro license currently then you have until March 15th to upgrade and enjoy this offer. After March 15th the JavaScript port will return to enterprise only status for everyone who didn’t signup prior to that. ...

Parse, Docs & Updates
Facebook recently announced the closing of parse.com which is disappointing but not totally surprising. Everyone knows a project from a large tech company can just shutdown in a blink of an eye leaving millions of users/developers in limbo. In that sense one of the questions that gets under my skin is what happens if Codename One calls it quits… You’d be better off than anyone who used parse and its far less likely to happen. Codename One is “what we do” and have been doing for the past 4 years. More importantly, unlike Parse you could just use the open source project and your users wouldn’t be the wiser. Since Parse is a service that needs to connect to a hosted server everyone who used parse (myself included) need to develop a rather complex strategy of moving their hosted data (which is live) while moving their users some of which might still have the old version that use parse on their devices… ...

Codename One 3.3 Now Live
We are thrilled to announce the immediate availability of Codename One 3.3! Version 3.3 was tumultuous, we made a lot of earth shattering changes to performance, animations, fonts and many other things. As a result we have a ground-breaking release that requires a step back. With 3.4 we want to tone down on the “big ticket changes” and work heavily on product refinement. We are already hard at work updating our docs and refining our general process.. In 3.3 we focused a lot on the open source aspect of Codename One which is something we neglected to some extent in the past. We intend to keep pushing towards more transparency and community involvement as the project grows. Codename One 3.4 is currently scheduled for May 3rd 2016. Its chief goals are: Performance, Platform fidelity, Documentation & ease of use. ...

Code Freeze for 3.3 & Performance
We’ve been working feverishly to get Codename One 3.3 out of the door next week. Tomorrow morning we will finally have the codefreeze branch for 3.3 and we’ll be able to focus on getting the docs/release in order. The release should be on the 27th of the month and we should ideally get the plugins out of the door within the next couple of days. Performance Update We’ve worked a lot on getting Android to perform nicely in the newer phones. When we launched the Android graphics architecture was quite different than it is today so we had to make quite a few changes over the years. Unfortunately, because of the ridiculously wide variety of devices something that performs well (or even functions) across devices is just not technically feasible on Android. We made a lot of improvements but they carry a heavy risk and we won’t turn them on by default on 3.3, we did however add an option to try them dynamically. You can just invoke the call: ...

JavaDoc Source Samples That Don't Suck
JavaDoc source code embeds suck! I love JavaDoc but it didn’t age well. When you work with other tools (e.g. in the Microsoft world) suddenly the embedded samples look amazing and “search” functionality is just built in! Why can’t we have that? JDK 9 is introducing new support for search but source embeds can be so much better and are a crucial learning tool… Since documentation and proper code samples are so crucial we decided to revisit our javadocs and start from the ground up, to that point we created the new open source project: JavaDoc Source Embed. ...