Skip to content

Instantly share code, notes, and snippets.

@axpence
Created December 25, 2015 19:08
Show Gist options
  • Select an option

  • Save axpence/d2f4e1d8e0beb9951b09 to your computer and use it in GitHub Desktop.

Select an option

Save axpence/d2f4e1d8e0beb9951b09 to your computer and use it in GitHub Desktop.
Android Notes.txt
Very good android tutorial for iOS devs: https://www.objc.io/issues/11-android/android_101_for_ios_developers/
Activities and Intents:
Activities are like UIViewControllers.
Activities have return values (An image editing activity can return a modified version of an input image from the input intent, for example).
Intents create new Activities -- Intents start Activities
Intents contain 2 things-1)Data 2)Action
Starting Activities with Intents is somewhat similar to creating a new UIViewController with a custom init method.
Activities can also return results when finished (goodbye modal delegates!)
Intents need a context.
Fragment:
More modularized version of activitys so you can have multiple "VC's" on a screen, modularly.
Adapter:
UITableViewController similar to ListActivity or ListFragment
on Android we don’t have datasources and delegates for ListView. Instead, we have adapters. Ex: `ArrayAdapter`
adapter has an important method named getView, which is very similar to cellForRowAtIndexPath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment