- Activity (UI components)
- Services (background code)
- Broadcast receivers (handler that responds to broadcast events)
- Content Providers (expose a data API to other application)
Addional compoent
- Views (UI elements)
- Layouts (View hierarchies that control screen appearance)
- Intents (Messages wiring components together)
- Resources (External data such as strings and drawables)
- Manifest (Configuration for applications)
Views
- SurfaceView (basic type that provides a direct drawing surface)
- ViewGroup (View that contain other Views)
- Widget (the classic UI components, e.g. Test input boxes, buttons)
Lifecycle
- onCreate
- onRestart
- onStart
- onResume
- onPause
- onStop
- onDestory
- onLowMemory
- onTerminate
- onConfigurationChanged
Process status
- Foreground
- Visible
- Service
- Background
- Empty
Layout
- FrameLayout
- RelativeLayout
- LinearLayout
- TableLayout
- AbsoluteLayout
Adapter
When you have to feed data from a data source to a view, you’ll use an Adapter
.
Intents and IntentFilters
IntentFilter - The Android platform keeps track of all the IntentFilter declarations that the current running system is capable of handling, and then resolves intents as they come in to the most suitable component dynamically, on the fly, at runtime.
Intents - provides in communicating between components, and sharing data between them.
Intent intent = new Intent(Name);
startActivity(intent);
Intent intent = this.getIntent();
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("http://www.google.com/"));
startActivity(intent);
Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);
intent.setData(Uri.parse("http://www.google.com/"));
startActivity(intent);
Intent intent = new Intent(Intent.ACTION_DIAL);
activity.startActivity(intent);
Intent intent = new Intent(Intent.ACTION_CALL);
intent.setData(Uri.parse("tel:987-654-321"));
startActivity(intent);
Container -
Thread -
Theme - Styles
Dialog -
Toast - Small rectanglar pop-up notification
Status bar -
Sliding drawer -
Notification bar -
Build-in Providers -
Directory structure
src/ - Java source code
gen/ - auto gen file (R.java)
asset/ - hold other static files
bin/ - compiled files
libs/ - holding third party Java JARs
res/ - resource such as icon, GUI layout,
AndroidManifest.xml
Size
5px is 5 pixels, 5dip is 5 density-independent pixels, or 5mm is 5 millimeter
Color
"
#rgb
", "#argb
", "#rrggbb
", or "#aarrggbb
".