wiring fragments wiring dialogs

4
Wiring Fragments Wiring Dialogs

Upload: saima

Post on 21-Feb-2016

71 views

Category:

Documents


0 download

DESCRIPTION

Wiring Fragments Wiring Dialogs. Wiring Fragments. Wiring Dialogs. Wiring Dialogs. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Wiring Fragments Wiring Dialogs

Wiring FragmentsWiring Dialogs

Page 2: Wiring Fragments Wiring Dialogs

• Ask FragmentManager whether home Fragment exists

• If not, create home Fragment

• Add it

Main ActivitysetContentView

Launch

• Inflate layout• Locate GUI elements• Attach Listeners

Home Fragment onCreateView

• Ask FragmentManager whether next Fragment exists

• If not, create next Fragment• Replace current fragment

Main ActivityMessage Handler

• Inflate layout• Locate GUI elements• Attach Listeners

Another Fragment

onCreateView

Wiring Fragments

Page 3: Wiring Fragments Wiring Dialogs

• Ask FragmentManager whether home Fragment exists

• If not, create home Fragment

• Add it

Main ActivitysetContentView

Launch

• Inflate layout• Locate GUI elements• Attach Listeners

Home Fragment onCreateView

• Create and initialize Dialog

• Show the Dialog

Main ActivityMessage Handler

• Inflate layout• Locate GUI

elements• Attach Listeners

Dialog onCreateView

Wiring Dialogs

Page 4: Wiring Fragments Wiring Dialogs

• Ask FragmentManager whether home Fragment exists

• If not, create home Fragment

• Add it

Main ActivitysetContentView

Launch

• Inflate layout• Locate GUI elements• Attach Listeners

Home Fragment onCreateView

• Create and initialize Dialog

• Show the Dialog

Main Activity

Message Handler

• Inflate layout• Locate GUI

elements• Attach Listeners

Dialog

Wiring Dialogs