This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Android and the fly likes Android User Interface Development - Is it easier/ harder than Blackberry UI development? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Android User Interface Development - Is it easier/ harder than Blackberry UI development?" Watch "Android User Interface Development - Is it easier/ harder than Blackberry UI development?" New topic
Author

Android User Interface Development - Is it easier/ harder than Blackberry UI development?

Henry Naftulin
Ranch Hand

Joined: Feb 08, 2010
Posts: 43
Android User Interface Development - Is it easier/ harder than Blackberry UI development? How close are the libraries to regular java swing libraries? What prior knowledge does the book assume?
Jason Brent Morris
author
Greenhorn

Joined: Mar 29, 2011
Posts: 10

Hi there Henry,

I wouldn't say that Android UI development is easier or harder than any other type of UI development, it's just different. It doesn't have much in common with the Swing API, but in some ways can be seen to share more with the Google Web Toolkit (although even this comparison is not very good).

Android is expected to run on a wide range of devices with limited functionality, and so the same user interface layout won't look great across all of the device variations. Android solves this problem by encouraging (though not forcing) you to declare the layout and styles of your user interface in an XML file which is processed when your application is packaged (a normal part of your Android build process). When you ask it to load the "main" screen layout, the resource loading API will find the XML file that best matches the current device configuration.

As a common example, you want a screen to appear one way when the device is held in a portrait orientation, and a different layout if it's held in a landscape orientation. If this screen layout is named "edit" you would have a resource directory with the following entries:

/res/layout/edit.xml
/res/layout-land/edit.xml

It's a very simple mechanism, and works for many other types of resources (text, images, etc.). More information about how resources are loaded and handled can be found in the official Android documentation.

Finally: your question about what prior knowledge the book assumes. The book is a beginners guide, and so tries to assume as little prior knowledge as possible. The only thing the book expects of the reader is a reasonable grasp of the Java language.

Thanks for the question.


Author of: Android User Interface Development
Available Here: http://link.packtpub.com/Uczf1u
Henry Naftulin
Ranch Hand

Joined: Feb 08, 2010
Posts: 43
Thank you Jason for the very detailed reply!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Android User Interface Development - Is it easier/ harder than Blackberry UI development?