GenericListCellRenderer – Revisiting the Twitter “Infinite List” demo
It appears the previous posting was pretty popular, so I thought I’d continue on the subject a little further. For this posting, I’ll revisit the Twitter client introduced in that post, and make it just a little prettier. I’ll be demonstrating how to utilize the GenericListCellRenderer to display the tweets, and how to display the Twitter avatars on our infinite list using Codename One’s ImageDownloadService.
Read more…
Categories: Development, Tips & Tricks Tags: Android, Blackberry, CodenameOne, Cross-platform, Development, IOS, J2ME, Java, Mobile, Symbian, Twitter, User Interface, Webservices, Windows Phone
Lazy Loading – Implementing an “Infinite List” in Codename One
In one of my projects I’m working on, I have a list that currently contains up to 12000 items (and growing). Of course, I’m not going to attempt to load the entire list in my initializer. Instead, I decided to go with a lazy loading technique that you might have noticed in the Twitter and Facebook apps on your mobile device, commonly referred to as the ‘Infinite List’. The way it works is, the app loads a small batch of statuses on initialization, this way there is no noticeable delay on startup. Then if the user scrolls down to the bottom of the list, another batch of statuses is loaded and appended to the list on the fly. Read more…
Categories: Development, Tips & Tricks Tags: Android, Blackberry, CodenameOne, Cross-platform, IOS, J2ME, Java, JSON, Mobile, Symbian, Twitter, User Interface, Webservices, Windows Phone
Expression Language for Consuming JSON and XML Webservices from Mobile
The latest release of Codename One (Version 0.1 build 20120325 as of this writing) will include a new feature that will increase productivity when consuming JSON and XML webservices from mobile, or working with structured data in general. The code discussed in this blog entry can be found in the API documentation under the new package:
com.codename1.processing
In short, the new com.codename1.processing.Result class provides a subset of XPath, but it is not limited to just XML documents, it can also work with JSON documents, and even with raw hashtables. Read more…
Categories: Development, Tips & Tricks Tags: Android, Blackberry, CodenameOne, Cross-platform, IOS, J2ME, Java, JSON, Mobile, Symbian, Webservices, Windows Phone, XML
Easily Debug Webservice Calls from Mobile Device, Eclipse, Netbeans
I just want to share a tip that will make life much easier when dealing with webservices. Often, when developers need to debug webservice calls, they will start by blindly making API calls to inspect the headers and payload to determine what they are receiving from the webservice. There is a much easier way that does not involve modifying your code at all, nor is there a great deal of setup, it takes about 2 minutes total.
UPDATE @ 2012-04-12 – The Codename One guys have been busy! They introduced some new debugging tools built into the Simulator, thanks!
Categories: Development, Tips & Tricks Tags: Android, Blackberry, CodenameOne, Cross-platform, Debugging, Development, HTTP, IOS, J2ME, Java, JSON, Mobile, Symbian, Webservices, Windows Phone, XML
Codename One, a Mobile Development Toolchain on Steroids
There’s a new suite of open source tools currently just entering public beta as of this writing, that is going to offer a dramatic increase in productivity in mobile development like never seen before. We’ve heard the terms ‘write once, run everywhere’ and ‘rapid application development‘ thrown around for years since Java first introduced it’s JVM somewhere around 15 years ago, but in mobile computing, I’ve never witnessed the kind of rapid coding that I’ve experienced with Codename One over the last week of beta testing. It’s seriously powerful. Read more…
Categories: Development, Product Reviews Tags: Android, Blackberry, Cloud Services, CodenameOne, Cross-platform, Development, IOS, J2ME, Java, Linux, MacOS, Mobile, Symbian, Windows, Windows Phone