Professional Documents
Culture Documents
Advanced ListViews
Prerequisites ....................................................................................... 1011
Multiple Row Types, and Self Inflation ............................................ 1011
Choice Modes and the Activated Style ............................................ 1017
Custom Mutable Row Contents ....................................................... 1018
From Head To Toe ........................................................................... 1024
Action Bar Navigation
Prerequisites ..................................................................................... 1029
List Navigation ................................................................................. 1029
Tabs (And Sometimes List) Navigation ......................................... 1034
Custom Navigation .......................................................................... 1040
Action Modes and Context Menus
Prerequisites ..................................................................................... 1042
Another Wee Spot O History ......................................................... 1042
Manual Action Modes ..................................................................... 1043
Multiple-Choice-Modal Action Modes .......................................... 1048
Long-Click To Initiate an Action Mode .......................................... 1052
Split Action Modes .......................................................................... 1058
What Came Before: Context Menus ............................................... 1060
ActionBarSherlock
Prerequisites ..................................................................................... 1063
Installation ....................................................................................... 1064
Code Changes .................................................................................. 1064
AppCompat: The Official Action Bar Backport
Prerequisites ..................................................................................... 1067
Using AppCompat ........................................................................... 1067
Choosing a Backport ........................................................................ 1073
Other Advanced Action Bar Techniques
Prerequisites ...................................................................................... 1075
Floating Action Bars ......................................................................... 1075
Action Layouts, Action Views, and Action Providers ................... 1078
Searching with SearchView ............................................................. 1079
Implementing a Navigation Drawer
Prerequisites ..................................................................................... 1087
What is a Navigation Drawer? ........................................................ 1087
A Simple Navigation Drawer ................................................. 1089
Alternative Row Layouts ................................................................. 1095
Additional Considerations .............................................................. 1097
What Should Not Be in the Drawer ................................................ 1106
Independent Implementations ........................................................ 1106
Advanced Uses of WebView
xiv
Audio Playback
Prerequisites ..................................................................................... 1769
Get Your Media On .......................................................................... 1769
MediaPlayer for Audio ...................................................................... 1770
Other Ways to Make Noise ............................................................. 1776
Audio Recording
Prerequisites ...................................................................................... 1779
Recording by Intent .......................................................................... 1779
Recording to Files ............................................................................. 1782
Recording to Streams ....................................................................... 1785
Raw Audio Input .............................................................................. 1788
Requesting the Microphone ........................................................... 1788
Video Playback
Prerequisites ...................................................................................... 1791
Moving Pictures ................................................................................ 1791
Using the Camera via 3rd-Party Apps
Prerequisites ...................................................................................... 1797
Being Specific About Features ......................................................... 1797
Still Photos: Letting the Camera App Do It ................................... 1798
Scanning with ZXing ....................................................................... 1800
Videos: Letting the Camera App Do It ............................................ 1801
Directly Working with the Camera ................................................ 1803
Working Directly with the Camera
Prerequisites ..................................................................................... 1806
Basic CameraFragment Usage ......................................................... 1806
Simple Configuration and Usage .................................................... 1807
Core Camera Concepts ..................................................................... 1814
Advanced CWAC-Camera Features ................................................. 1837
Media Routes
Prerequisites ..................................................................................... 1845
Terminology ..................................................................................... 1845
A Tale of Three MediaRouters ........................................................ 1846
Attaching to MediaRouter .............................................................. 1848
User Route Selection with MediaRouteActionProvider ................ 1849
Using Live Audio Routes ................................................................. 1866
Using Live Video Routes ................................................................. 1866
Using Remote Playback Routes ...................................................... 1866
Supporting External Displays
Prerequisites ..................................................................................... 1885
A History of external displays ......................................................... 1885
What is a Presentation? .................................................................. 1886
xxi
xxxiv