6. Menus 3 Flavors Options Menu Primary Menu Type Menu Button Pressed First 5-6 Options -> Icon Menu When 7+ options, Option 6+ -> Expanded Menu Context Menu Long Press Sub Menu
10. Layout Defines what the UI looks like Where views are placed How big views are How views flow Made up of nested views
11. Layout 2 Ways to define layout XML Provides most flexibility Better separation of UI from logic Easier to visualize Programmatically Can be more difficult Best when coupled with XML and LayoutInflater
12. Layout - XML Valid XML file Each node maps to a view instance Attributes set properties on the view Layout File Convention Have .xml extension Named with all lowercase Placed in res/layout/ folder
21. Styles Specifies look and format for views Separates design from content Collection of properties Font Size Font Color Background Color Padding Margin Much more
28. Lifecycle Management Stopped Activities can be killed Then recreated when brought to front Activities with state need to be serialized onPause() onSaveInstanceState()
33. AsyncTask 4 Steps onPreExecute Executes on UI thread doInBackground Executes the actual task on background thread onProgressUpdate Optionally updates user on progress on UI thread onPostExecute Executes on UI thread
34. AsyncTask Rules Task must be created in UI thread execute must be invoked from UI thread Tasks can only be executed once Don’t call onPreExecute, onPostExecute, doInBackground or onProgressUpdate manually