924
Lectures Watched
Since January 1, 2014
Hundreds of free, self-paced university courses available:
my recommendations here
Peruse my collection of 275
influential people of the past.
View My Class Notes via:
Receive My Class Notes via E-Mail:

VIEW ARCHIVE


Contact Me via E-Mail:
edward [at] tanguay.info
Notes on video lecture:
The Fragment Class
Choose from these words to fill the blanks below:
right, heuristics, hierarchy, destroyed, vertical, high, hosting, appropriate, 3.0, use, hand, view, interface, activities, visible, larger, zero
fragments were added to Android        to better support interfaces for devices with              screens
some of the design                      that made sense for smaller phone display no longer work
example application: quote viewer
two activities
1. shows titles of Shakespeare plays
2. when title is selected, a quote from that play is shown
this is an                        interface for a phone
on a tablet, however, the display is not too          and wide
too much white space
uses little of the                  space
imposes a slow back-and-forth user experience since the user has to move his          so far
better layout for tablet:
quotes now get shown on           
single activity
two fragments
fragments
are hosted by                     
an activity can host          or more fragments
lifecycle of a fragment is tied to the lifecycle of the activity that is hosting it
a fragment is statically bound to its                activity
a fragment also has some of its own lifecycle callbacks
two states
resumed
fragment is visible in running activity
paused
another activity is in the foreground and has focus
containing activity is               
stopped
fragment is not visible
lifecycle callback statements
onAttach()
fragment is first attached to activity
onCreate() (not the same as the activity)
unlike in activity.onCreate(), you don't set up the user                    here, but in onCreateView()
onCreateView()
set up user interface
sets up and returns a          which contains the fragment's user interface
onActivityCreated()
fragment gets this call after its view has been installed in the activity's view                   
after fragment's user interface has been installed in the activity, its lifecycle is dependent on the life cycle of the activity
if the hosting activity is about to become visible, it will receive a call to its onStart() method, and the fragment will also receive a call to its onStart() method
same with onResume()
same with onPause()
same with onStop()
when activity is                   , fragment receives a call to onDestroyView()
clean up resources associated with the view
then when fragment is no longer in       , it receives a call to its onDestroy() method
when no longer attached to activity, it receives called to onDetach() where you might want to null out references to the hosting activity

Vocabulary:

heuristic, adj. refers to experience-based techniques for problem solving, learning, and discovery that give a solution which is not guaranteed to be optimal, e.g. where exhaustive search is impractical, heuristic methods are used to speed up the process of finding a satisfactory solution via mental shortcuts to ease the cognitive load of making a decision  "Some of the design heuristics that made sense for smaller phone displays no longer work on large tablet screens."
Android Architecture
The Android Development Environment
Developing an Android App
The Activity Class
Fields of the Intent Class
Android Permissions
The Fragment Class