Android Development – Eclipse Sneak Preview

Spread the love

Got some time to play with Eclipse and this time the experiment was with Android. Having heard a lot about this google’s OS and the way it is capturing mobile market, I was bit curious to find out the development tools and understand how quickly one can get into the development. Finally after spending few hours with installation and getting first application running with Android simulator, I found somethings that I would like to share with you. Just to make it clear, this article is no attempt to compare Android Eclipse plugin with other plugins.
To be frank, there was no clear intension of playing with Android, but I just stumbled upon Android full app part I article and thought of giving it a try.

1. Configuration and Installation
The first step involved downloading Android SDK and configuring it with Eclipse SDK. The activity was less painful and without much efforts it got configured pretty easily.

2. Development Language
I like one thing about above article, rather than getting into traditional example like Hello World, the article explains some of the basic concepts about Android SDK development using simple search application. Though the search actually does nothing but I felt it perfect example for those who don’t know anything about Android but having knowledge of Java and XML. Developers of these languages will find right at the home as the don’t have to learn any new language or syntax to start development with Android. The Android UI is developed using XML while the actual logic is handled using Java language. (Initially when I created Android project, I read the XML name as main.mxml and was bit shocked as why Android is using that extension. But no worry, It was my mistake – the file name was actually main.xml 😉

While XML is definitely better way to define UI and much easier than writing Java Code, there are few things that definitely need to be taken care. Most of the element properties (rather all of them) are placed in namespace other than the control itself. This is definitely annoying as the default prefix for this namespace was “android” and I soon found that my 25 lines of XML code has more than 30 words as “android”. All over the XML I could just see one word as “android” and nothing else. Though one can argue that it is possible to change the prefix to something shorter version as “a” and get rid off all those extra characters. But I would rather feel better If the namespace is completely removed or just used as root namespace. (Come on guys, make my code cleaner and dont force me to type in extra characters.)

3. Eclipse Plugin
The Android SDK is not just plain Code editor, but it does come with UI designer. The designing editor contains decent list of controls to use. But there are definitely few things which need improvement in design editor.
The control bar is divided into two parts – Layouts and Views. Android seems to consider common components as Views (quite confusing term for Eclipse plugin developer).
Another notable point is that some of the items listed in Layouts tab also have prefix as View, adding more to confusion as what is the difference between View and Layout. Just to add to the list, RadioGroup is considered as Layout. (Don’t find any reason, as why it is hanging there. RadioGroup is used to define a logical group for Radio Buttons, what it has to do with Layout.)

While it is also quite evident that, there is no much effort spent on managing look and feel of the plugin – the Layout and Views bar can very well placed into other view. (Just check following Flex Builder screenshot – much better and cleaner)

The components listed in control bar, also do not carry icons and are just prefixed with Starting letter. (For a moment I thought I am reading A B C D..). The designing editor seriously needs some improvement.

The A B C D is also quite evident in XML editor and really of no help there, I will be very happy if there are no icons at all and just plain text.

4. Android Emulator
Aha, Finally it was time to test the tutorial application and see if it really works. The project was built in no time and after following tutorial steps to run the application, I found a new window popped up containing Android interface. For some time the emulator just continued to show only one word “android”, I was bit confused as whether something has went wrong with code or SDK and why my application interface is not coming up. But after noticing the console view (some may call it console tab) in eclipse, I found some activity was going on and I just waited for few minutes to see what is happening. Fortunately after some time the application screen just came and now I could test my application.

Though I liked the Emulator interface, it seriously needs some initial performance improvement and some kind of indication on emulator screen about the progress.

Leave a Comment.