Pro Skill (7) – Android

Use this Google post to start development for Android!

Key UI paradigms in Android:

  1. Action bar,
  2. Overflow menu,
  3. Back button: back button pop activity from main OS stack.
  4. Share action,

Key differences with iOS:

  1. No need for class prefix
  2. Ivars start with m, not _
  3. Have to check NULL
  4. No Properties

Project Structure:

Android applications primarily has 2 sections:

  1. Java Source-code:
    1. Activities: (like UIViewControllers). Android OS keeps a main application’s activity stack – when 1 app launched -> main activity of that app is pushed on stack. (Many apps can be launched and so pushed on the same stack). Back button pops from OS stack -> can pop different applications.
      • Activities can be created with Intents (like UIViewController with custom init). Activities can also return data -> placing data on the Intents.
      • Any activity can be Entrance for application if registered in AndroidManifest.
      • To be sent between intents & fragments, objects have to implement Parcelable interface. (like NSCopying protocol in iOS)
    2. Fragments: (since Android 3.0) mini controllers that can be instantiated to fill activities (like subviews). Use many fragments on an activity!
    3. Views:
    4. Adapters,
    5. Data (models and managers).
  2. Resource (res folder)
    1. Images
    2. XML Layout files: like xib files
    3. XML Values files: like plist
  3. AndroidManifest.xml (similar to  Project-Info.plist)
    1. Store activities, app names and Intents
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s