Egil
Egil

Reputation: 195

Android application design

I am starting to develop an application for Android and was wondering what the common application design/structure looks like.

In iOS, I would generally start with a RootController which contains a UITabBarController and fill this with 4-5 UINavigationControllers. Each UINavigationController would contain its stack with UIViewControllers.

What would a similar application look like for Android?

Upvotes: 0

Views: 563

Answers (4)

Mark Buikema
Mark Buikema

Reputation: 2540

Take a look at Android Design in Action, they have great video lessons on how to design Android apps!

Upvotes: 0

JAL
JAL

Reputation: 3319

Egil.. The Android way is significantly different from the iOS way in that it is more like a web interface.

First: "Activities" or UIs can be killed at any time. In fact, rotating the phone can kill an activity. So that each Activity needs to be able to save its state in onSaveInstanceState and restore state in onResume. Furthermore, "shared document like data" is written in onPause() and restored in onResume(). The closest analogy in iOS is saving state on low memory warning.

Second: Activities are relatively independent of each other so that state needs to be passed between Activities (UIs) using intents or saved globally using say Application state.

It is possible to quickly move an iOS TabBar to Android using Androids Options menu, but there is no built in hierarchy of views like UINavigationController.

I have a table comparing and contrasting iOS and Android here.

Upvotes: 0

Nikolay Elenkov
Nikolay Elenkov

Reputation: 52936

Start reading here. The basic building block is an Activity, you setup your UI, display data and respond to events in your Activity classes. Screen navigation is handled by starting other activities using intents.

Upvotes: 1

user427390
user427390

Reputation:

I lay out my activities and my activity xml files. Then I code in the components that are needed in the activity classes. Then I set up preferences and my submenu etc. From there I do my support classes and glue it all together.

Upvotes: 0

Related Questions