-
Components
-
Activitie
- Presents a single visual user interface
- each activity is indepentdent of the others
- one of the activities is marked as the first
- intents
- Service
- Broadcast receiver
- Content Provider
-
User Interface
-
View Class
- represent the basic bulding block for UI component
- A view occupies arectangular area on the screen and is responsible for drawing and event handling
- base class for widgets
-
Group view
-
Xml Layouts
- LinearLayout
- is a box model
- are lined up in a column or row
- areas of control
- orientation
- fill model
- weight
- gravity
- padding
- margin
- RelativeLayout
- TableLayout
- ScrollView
- AbsoluteLayout
- Each element in XML layout is either a view or groupView
- is the base class for layouts
-
Menus
- Increase the functionality of an app
-
2 types
- option menu
- context menu
-
Observation
- text
- Icons
- Radio Buttons
- Checkboxs
- Sub-Menus
- Short-cut Keys
-
using
-
step1
- Indicate which widget(s) on your activity have contextMenu
-
step2
- Implement onCreateContextMenu(...)
- onCreateContextMenu() is called each time the context menu is requested
- context menus are discarded once they are used or dismissed
- onContextItemSelected()
- delegate on the applyMenuChoice() Method the performing of the actions associated to the choices made by user
- Widgets
-
Life cycle
-
Components lifecycle
- A beginning when android instantiates them response to intents
- A end when the instances are destroyed
- In between they somtimes be active / inactive ,visible/invisible
- Activity Stack
- States
- Event
-
Project
- YourActivity.java
- R.java
- Android Library/
- assets/
- res/
- res/drawable
- res/layout
- res/values
- AndroidManifest.xml
- Main Topic 5