Fork us on GitHub

Social Boo Revisited

Redoing a Legacy Demo
Social Boo Revisited

Social Boo Revisited

SocialBoo originated from the same app design vault set of designs that brought us the Chrome Demo. This demo uses a somewhat outdated but still reasonable gunmetal look, it also features different UI styles when running on a tablet/phone. Notice in the screenshot above that the UI for the demo differs when running in a phone/tablet and even changes when the tablet flips between portrait and landscape…​

This demo was originally created using the old GUI builder but was modernized to use the new GUI builder.

Check the live version running on the right hand side thanks to the power of the Codename One JavaScript port!

You can check out the demo here & the full source code here.

We barely changed anything in this demo, although it did "age" it still looks reasonable even today. One of the few things added was a button to toggle the phone/tablet mode, this is really useful for a demo to show off how these differences apply especially when running in a browser.

We replaced the old title behavior with the new Toolbar API, this required a few code changes but not much and in terms of the design we didn’t need to do anything…​

The switch from the old GUI builder to the new GUI builder almost worked but there was some reliance on splash screen support in the old code. This isn’t supported by the new GUI builder as there is no concept of "flow" so we replicated roughly the same behavior using:

if(SocialBoo.isTabletMode()) {
    UITimer.timer(2000, false, this, () -> new Person().show());
} else {
    UITimer.timer(2000, false, this, () -> new Main().show());

Notice that we used the SocialBoo.isTabletMode() call instead of Display.getInstance().isTablet(). We did that to allow forcing tablet/phone mode which is great for a demo although not really necessary for a "real world app".

Up Next

Social Boo isn’t currently a part of the builtin demos in the IDE’s but I think it should be. In our last update we were supposed to include some of the revised demos but the build scripts didn’t chug correctly and some demos just didn’t make it…​

We fixed the scripts so hopefully Social Boo and the other demos we’ve revisited will all make it to the coming plugin updates.

Share this Post:

Posted by Shai Almog

Shai is the co-founder of Codename One. He's been a professional programmer for over 25 years. During that time he has worked with dozens of companies including Sun Microsystems.
For more follow Shai on Twitter & github.