1. Trang chủ
  2. » Công Nghệ Thông Tin

Nhập môn ứng dụng di động Chương 4

30 516 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 30
Dung lượng 2,6 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

NHAP MON UNG DUNG DI DONG – Flag Quiz App 3Introduction... NHAP MON UNG DUNG DI DONG – Flag Quiz App 5Introduction... NHAP MON UNG DUNG DI DONG – Flag Quiz App 7Introduction... NHAP MON

Trang 1

NHẬP MÔN ỨNG DỤNG DI ĐỘNG

C hươn g 4 : Flag Quiz Ap p

Nhóm : 2918

Trang 3

NHAP MON UNG DUNG DI DONG – Flag Quiz App 3

Introduction

Trang 4

Introduction

Trang 5

NHAP MON UNG DUNG DI DONG – Flag Quiz App 5

Introduction

Trang 6

Introduction

Trang 7

NHAP MON UNG DUNG DI DONG – Flag Quiz App 7

Introduction

Trang 8

Introduction

Trang 9

NHAP MON UNG DUNG DI DONG – Flag Quiz App 9

Introduction

Trang 10

Fragments

Preferences

Assets Folder and Resource Folders

Screen Sizes, Resolutions and Device Orientation

Toasts

Handler

Technologies Overview

Trang 11

NHAP MON UNG DUNG DI DONG – Flag Quiz App 11

Animation

ViewAnimationUtils

Color state list

AlertDialog

Logging Exception Messages

Launching Another Activiy Via an Explicit Intent

AndroidManifest.xml

Technologies Overview

Trang 12

Menus

Trang 13

NHAP MON UNG DUNG DI DONG – Flag Quiz App 13

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).

Trang 14

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.

Trang 15

NHAP MON UNG DUNG DI DONG – Flag Quiz App 15

Managing Fragments

Trang 16

preferrences

Trang 17

NHAP MON UNG DUNG DI DONG – Flag Quiz App 17

Assets Folder

Trang 18

RESoURCE Folder

Trang 19

NHAP MON UNG DUNG DI DONG – Flag Quiz App 19

Screen Sizes, Resolutions

Trang 20

Device Orientation

Trang 21

NHAP MON UNG DUNG DI DONG – Flag Quiz App 21

Toasts

Trang 22

handler

Trang 23

NHAP MON UNG DUNG DI DONG – Flag Quiz App 23

animation

Trang 24

ViewAnimationUtils

Trang 25

NHAP MON UNG DUNG DI DONG – Flag Quiz App 25

Color state list

Trang 26

Alert dialog

Trang 27

NHAP MON UNG DUNG DI DONG – Flag Quiz App 27

Logging Exception Messages

Trang 28

Launching Another Activiy Via an Explicit Intent

Trang 29

NHAP MON UNG DUNG DI DONG – Flag Quiz App 30

Demo app

Trang 30

The end

Ngày đăng: 08/11/2016, 16:41

TỪ KHÓA LIÊN QUAN

w