O'Reilly logo

Android Cookbook, 2nd Edition by Ian F. Darwin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. Graphical User Interface

When Android was being invented, its designers faced many choices whose outcome would determine the success or failure of their project. Once they had rejected all the other smartphone operating systems, both closed and open source, and decided to build their own atop the Linux kernel, they were faced with somewhat of a blank canvas. One important choice was which programming language to use; they wisely chose Java. But once that choice was made, there was the choice of user interface technology to deploy: Java ME, Swing, the Standard Widget Toolkit (SWT), or none of the above.

Java ME is the Java Micro Edition, Sun/Oracle’s official standard API for cell phones and other small devices. Java ME was once a pretty big success story: tens if not hundreds of millions of cell phones have a Java ME runtime inside. Also, all BlackBerry devices made from around 2000 to around 2010, and all BlackBerry smartphone applications for BlackBerry OSes 5, 6 and 7 (but not including BlackBerry OS 10), were based on Java ME. But the Java ME GUI was regarded as too limiting by the Android team, having been designed for the days when cell phones had really tiny screens and limited functionality (it’s noteworthy that BlackBerry came to a similar conclusion, dropping Java ME when it came time to produce BlackBerry 10).

Swing is the Java Standard Edition (desktop Java, Java SE, a.k.a. JDK or JRE) GUI. It is based on Java’s earlier widget toolkit, the Abstract Window ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required