NHẬP MÔN
ỨNG DỤNG DI ĐỘNG
Chương 4 : Flag Quiz App
Nhóm : 2918
NHAP MON UNG DUNG DI DONG – Flag Quiz App
2
Introduction
NHAP MON UNG DUNG DI DONG – Flag Quiz App
3
Introduction
NHAP MON UNG DUNG DI DONG – Flag Quiz App
4
Introduction
NHAP MON UNG DUNG DI DONG – Flag Quiz App
5
Introduction
NHAP MON UNG DUNG DI DONG – Flag Quiz App
6
Introduction
NHAP MON UNG DUNG DI DONG – Flag Quiz App
7
Introduction
NHAP MON UNG DUNG DI DONG – Flag Quiz App
8
Introduction
NHAP MON UNG DUNG DI DONG – Flag Quiz App
9
Technologies Overview
Menus
Fragments
Preferences
Assets Folder and Resource Folders
Screen Sizes, Resolutions and Device Orientation
Toasts
Handler
NHAP MON UNG DUNG DI DONG – Flag Quiz App
10
Technologies Overview
Animation
ViewAnimationUtils
Color state list
AlertDialog
Logging Exception Messages
Launching Another Activiy Via an Explicit Intent
AndroidManifest.xml
NHAP MON UNG DUNG DI DONG – Flag Quiz App
11
Menus
NHAP MON UNG DUNG DI DONG – Flag Quiz App
12
Fragments
A Fragment represents a behavior or a portion of user interface in an Activity. You can combine multiple fragments in a single activity to build
a multi-pane UI and reuse a fragment in multiple activities. You can think of a fragment as a modular section of an activity, which has its own
lifecycle, receives its own input events, and which you can add or remove while the activity is running (sort of like a "sub activity" that you can
reuse in different activities).
NHAP MON UNG DUNG DI DONG – Flag Quiz App
13
Fragments – Lifecycles
onCreate—This method is called when a Fragment is created. The MainActivityFragment and SettingsActivityFragment are created when the app
inflates their parent activities’ layouts. The DialogFragment that displays the quiz results is created and displayed dynamically when the user
completes a quiz.
onCreateView—This method (which you’ll override in class MainActivityFragment) is called after onCreate to build and return a View containing the
Fragment’s GUI. As you’ll see, this method receives a LayoutInflater, which you’ll use to programmatically inflate a Fragment’s GUI from the
components specified in a predefined XML layout.
NHAP MON UNG DUNG DI DONG – Flag Quiz App
14
Managing Fragments
NHAP MON UNG DUNG DI DONG – Flag Quiz App
15
preferrences
NHAP MON UNG DUNG DI DONG – Flag Quiz App
16
Assets Folder
NHAP MON UNG DUNG DI DONG – Flag Quiz App
17
RESoURCE Folder
NHAP MON UNG DUNG DI DONG – Flag Quiz App
18
Screen Sizes, Resolutions
NHAP MON UNG DUNG DI DONG – Flag Quiz App
19
Device Orientation
NHAP MON UNG DUNG DI DONG – Flag Quiz App
20
Toasts
NHAP MON UNG DUNG DI DONG – Flag Quiz App
21
handler
NHAP MON UNG DUNG DI DONG – Flag Quiz App
22
animation
NHAP MON UNG DUNG DI DONG – Flag Quiz App
23
ViewAnimationUtils
NHAP MON UNG DUNG DI DONG – Flag Quiz App
24
Color state list
NHAP MON UNG DUNG DI DONG – Flag Quiz App
25