abortAnimation(),
370
AbsListView
class, 284
AbsoluteLayout,
62
AbsoluteSizeSpan,
295
AccelerateDecelerateInterpolator
class, 239
AccelerateInterpolator
class, 239
accessible vocabulary, 182
action bar. see app bar
ActionBarCompat library, 70
AdapterViewAnimator,
62
AdapterView
class, 57
interfaces for, 61
AdapterViewFlipper,
62
add, PorterDuff image compositing mode, 322
Adobe Illustrator, 118, 168–169
AlignmentSpan.Standard,
295
alpha, View
class attribute, 28
Amazon Appstore, 401
ambient light, 171
Android design website, 13
android:state_activated,
89
android:state_checkable,
89
android:state_checked,
89
android:state_enabled,
89
android:state_focused,
89
android:state_hovered,
90
android:state_pressed,
90
android:state_selected,
90
android:state_window_focused,
90
angle, ShapeDrawable
class attribute, 94
AnimatedVectorDrawable
class, 98–100
animations, 104
property. see property animations
purpose of, 232
AnimatorListener
class, 235
animator
(qualifier), 76
anim
(qualifier), 76
AnticipateInterpolator
class, 239
AnticipateOvershootInterpolator
class, 239
Apple, 170
application description, Google Play, 388
application icon, Google Play, 389–395
apps
Camera app, 15
Gallery app, 15
Paper Camera, 400
Permission Informant, 175
AppWidgetHostView,
62
arrays, 103
attributes, ShapeDrawable
class, 94–95
angle,
94
bottom,
95
bottomLeftRadius,
94
bottomRightRadius,
94
centerColor,
94
centerX,
94
centerY,
94
color,
95
dashGap,
95
dashWidth,
95
endColor,
94
gradientRadius,
95
height,
95
innerRadius,
94
innerRadiusRatio,
94
left,
95
radius,
94
right,
95
shape,
94
startColor,
95
thickness,
94
thicknessRatio,
94
top,
95
topLeftRadius,
94
topRightRadius,
94
type,
95
useLevel,
94
width,
95
attributes, TextView
class, 36–38
drawable,
36
ellipsize,
36
fontFamily,
36
gravity,
36
hint,
36
inputType,
36
lines,
37
lineSpacing,
37
maxLines,
37
minLines,
37
shadowColor,
37
shadowDx,
37
shadowDy,
37
shadowRadius,
37
text,
37
textColor,
37
textIs,
37
textSize,
37
textStyle,
37
typeface,
37
attributes, VectorDrawable
class, 97–98
alpha,
28
background,
29
content,
29
duplicate,
29
focusable,
29
id,
29
importantFor,
29
minHeight,
29
minWidth,
29
padding,
30
visibility,
30
attrs.xml,
409
AutoCompleteTextView,
42
available height, 78
available width, 78
back button, 19
background, View
class attribute, 28
BackgroundColorSpan,
296
Balsamiq, 119
bending to user, core principles, 19
bottom, ShapeDrawable
class attribute, 95
bottomLeftRadius, ShapeDrawable
class attribute, 94
bottomRightRadius, ShapeDrawable
class attribute, 94
BounceInterpolator
class, 239
breaking comps into views, 200–201
brightness, 173
Button
class, 39
CalendarView,
42
Camera app, 15
Canvas
class, 305
capitalization, text, 180
centerColor, ShapeDrawable
class attribute, 94
centerX, ShapeDrawable
class attribute, 94
centerY, ShapeDrawable
class attribute, 94
change log, Google Play, 389
CheckBox,
42
CheckedTextView,
42
Chronometer,
46
circular reveal transitions, 259–262
clear, PorterDuff image compositing mode, 316
ClickableSpan,
296
CMYK (cyan, magenta, yellow, and black), 172
color, ShapeDrawable
class attribute, 95
Color (Adobe’s tool), 177
ColorMatrixColorFilter
class, 314–315
color
(qualifier), 76
complex text, spans for, 297–299
FAB, 23
navigation drawer, 23
notifications, 21
system bars, 20
ComposeShader,
325
CompoundButton,
42
comps, breaking into views, 200–201
computeScroll(),
365
configuration support, 113–114
content, View
class attribute, 29
content pieces, wireframes, 122–123
context.getResources(),
355
Contrast Analyser, 179
contrast ratio, text, 179
core principles
bending to user, 19
visuals, 17
custom drawables, creation of, 304–305
custom fonts, 181–182, 293–295
creating initial custom view files, 352–357
saving and restoring state, 340–347
CycleInterpolator
class, 239
darken, PorterDuff image compositing mode, 320–321
dashGap, ShapeDrawable
class attribute, 95
dashWidth, ShapeDrawable
class attribute, 95
DatePicker,
42
Daydream feature, 6
DecelerateInterpolator
class, 239
defaults, specifying, 81
design
graphical, wireframes and, 168
icons, 184
lighting, 171
navigation, 184
text. see text
transitions, 184
designers, working with, 192–193
design library, 72
design website, 13
detail pages, wireframes, 123–125
developers, 192
Device Art Generator, 401
DialerFilter,
62
DigitalClock,
46
dimensions, 104
display
determining, 407
drawable, TextView
class attribute, 36, 76
Drawable
class, 304–305, 356–357
DrawableMarginSpan,
296
drawables
XML drawables. see XML drawables
draw(Canvas),
304
draw9patch
tool, 195
DST,
PorterDuff image compositing mode, 316–317
DST_ATOP,
PorterDuff image compositing mode, 320
DST_IN,
PorterDuff image compositing mode, 318
DST_OUT,
PorterDuff image compositing mode, 318
DST_OVER,
PorterDuff image compositing mode, 318–319
Duarte, Matias, 6
Duff, Tom, 315
duplicate, View
class attribute, 29
DynamicDrawableSpan,
296
EasyEditSpan,
296
EdgeEffect
class, 351
eliminating, overdraw, 286–289
ellipsize, TextView
class attribute, 36
endColor, ShapeDrawable
class attribute, 94
exit button, 19
ExpandableListView
class, 59
external libraries, 114
extra, extra, extra high dots per inch (XXXHDPI), 32, 81, 198
extra, extra high dots per inch (XXHDPI), 32, 81
ExtractEditText,
46
extra high dots per inch (XHDPI), 32, 81
FAB, 23
FastOutLinearInInterpolator
class, 239
FastOutSlowInInterpolator
class, 240
feature graphic, Google Play, 397–399
flat design, 170
flowcharts, 114
focusable, View
class attribute, 29
focused state, 17
fontFamily, TextView
class attribute, 36
fonts
Roboto font family, 293
TextView
class, 293
ForegroundColorSpan,
296
FragmentBreadCrumbs,
62
fragments, 64
and activities, 130
problems associated with, 69–70
prototypes, creation of. see prototypes, creation of
talking to activity from, 66–69
transactions, 69
FrameLayout
class, 52
Gallery app, 15
Gallery
class, 60
garbage collection, controlling, 283–284
GestureDetector
class, 350
GestureOverlayView,
62
getBounds(),
304
getCurrVelocity(),
385
getIntrinsicHeight(),
304
getIntrinsicWidth(),
305
getOpacity(),
304
getScaledMinimumFlingVelocity(),
355
getScrollX(),
365
GIFs, 83
Gimp, 168
GLSurfaceView,
46
device and configuration support, 113–114
user personas, 112
Google Play, 387
application description, 388
change log, 389
video (YouTube), 400
Google Plus, 16
gradientRadius, ShapeDrawable
class attribute, 95
styles, 169–170. see also specific styles
wireframes and, 168
graphics
feature graphic, Google Play, 397–399
promotional. see promotional graphics
gravity
LinearLayout
class attribute, 52–53
TextView
class attribute, 36
GridLayout,
63
GridLayout library, 72
GridView
class, 59
hardware keyboard type, 80
HDPI (high dots per inch), 32, 81
height, ShapeDrawable
class attribute, 95
eliminating unnecessary views, 292
exporting Photoshop Document, 292–293
missing views, finding, 291–292
high dots per inch (HDPI), 32, 81
hint, TextView
class attribute, 36
history, Android design, 6
home screen, 7
full screen mode, 405
HorizontalIconView
class, 352–355
HorizontalScrollView
class, 63
hot spot, 171
HSB (hue, saturation, and brightness), 172
HTML
class
hue, 172
Ice Cream Sandwich, 6
IconMarginSpan,
296
icons
design, 184
id, View
class attribute, 29
ImageButton
class, 41
image files, 83–84. see also raster images; vector images
images
alternate sizes, generating, 198–199
availability and size, 183
XML drawables. see XML drawables
ImageSpan,
296
ImageSwitcher,
63
importantFor, View
class attribute, 29
ink, as Material Design component, 10–11
Inkscape, 118
innerRadius, ShapeDrawable
class attribute, 94
innerRadiusRatio, ShapeDrawable
class attribute, 94
InputMethodManager,
dismissing software keyboard, 404
inputType, TextView
class attribute, 36
InsetDrawable
class, 92
interaction, and Material Design, 11–12
IntEvaluator
class, 235
ItemAnimator
class, 300
ItemDecoration
class, 300
jank
Jelly Bean, 6
kerning, 180
keyboard availability, 80
keyboards, software keyboard (dismissing), 404
KeyboardView,
46
KitKat, 256
language, 77
language direction, 77
layer list, XML drawables, 87–88
LayoutParams, RelativeLayout
class, 56–57
layout
(qualifier), 76
layouts, 28
LayoutTransition
class, 252
LDPI (low dots per inch), 32, 81
leading, 180
LeadingMarginSpan.Standard,
296
leanback library, 73
left, ShapeDrawable
class attribute, 95
level list, XML drawables, 91
LevelListDrawable
class, 91
lifecycle, of fragments, 64–65
lighten, PorterDuff image compositing mode, 320
lighting, 171
LightingColorFilter
class, 313
LinearGradient,
325
LinearInterpolator
class, 240
LinearLayoutManager
class, 299
LinearOutSlowInInterpolator
class, 240
lines, TextView
class attribute, 37
line spacing, 180
lineSpacing
, TextView
class attribute, 37
listeners, 235
ListView
class, 58–59, 284, 299
LocaleSpan,
296
Lollipop, 7
long press gesture, 25
low dots per inch (LDPI), 32, 81
LruCache
class, 277
LRU (least-recently-used) cache, 277
LTR (left-to-right) layout, 32–34
MaskFilterSpan,
296
match_parent
(layout parameter), 31, 55
and app bar, 22
interaction and animation, 11–12
metrics and alignment, 13
mistakes made by designers/developers, 24–25
maxLines, TextView
class attribute, 37
MDPI (medium dots per inch), 32, 81
measureHeight(int),
358
measurement, views, 332–333, 336–337, 357–360
MeasureSpec,
333
MediaController,
63
MediaRouteButton,
46
MediaRouter library, 73
medium dots per inch (MDPI), 32, 81
menu
(qualifier), 76
menus, 105
methods, design
common, 108
MetricAffectingSpan,
296
Metro (design language), 170
Microsoft, 170
minHeight, View
class attribute, 29
Minimalism, 170
minLines, TextView
class attribute, 37
minWidth, View
class attribute, 29
mipmap
(qualifier), 76
mistakes, made by designers/developers
long press gesture, 25
notification icons, 25
styles from other platforms, 25
mobile country code, 77
mobile network code, 77
modes, PorterDuff image compositing, 316–325
add, 322
clear, 316
DST_ATOP,
320
DST_IN,
318
DST_OUT,
318
lighten, 320
overlay, 323
screen, 323
SRC_ATOP,
320
SRC_IN,
318
SRC_OUT,
318
MotionEvent.ACTION_CANCEL,
371
MotionEvent.ACTION_POINTER_UP,
371
MotionEvent.ACTION_UP,
370–371
MotionEvent
class, 350–351, 369
MultiAutoCompleteTextView,
44
multiple devices, support for, 23–24, 125–126
multiply, PorterDuff image compositing mode, 322–323
naming conventions, wireframes, 127
navigation
design, 184
navigation drawer, 23, 134–136
navigation key availability, 80
network connection, 408
night mode, 79
nine-patch images, 84–86, 195–198
normal state, 17
notification icons, 25
notifications, 21
NumberPicker,
44
ObjectAnimator
class, 234
Omnigraffle, 118
onAbsorb(int),
365
onActivityCreated(Bundle),
64
onAttach(Activity),
64
onBoundsChange(Rect),
305
OnClickListener,
48
onCreate(Bundle),
64
onCreateView(LayoutInflater, ViewGroup, Bundle),
64
onDestroy(),
65
onDestroyView(),
65
onDetach(),
65
OnDragListener,
48
onDraw(Canvas),
355
OnFocusChangeListener,
48
OnGenericMotionListener,
48
OnHoverListener,
48
onKeyDown(int, KeyEvent),
351
OnKeyListener,
48
onLevelChange(int),
305
OnLongClickListener,
48
onMeasure(int, int),
360
onOverScrolled(int, int, boolean, boolean),
366
onPause(),
65
onResume(),
64
onScrollChanged(x, 0, oldX, 0),
365
onStart(),
64
onStateChange(int[]),
305
onStop(),
65
onTouchEvent(MotionEvent),
369, 371
OnTouchListener,
48
onViewStateRestored(Bundle),
64
orientation, 79
orientation, LinearLayout
class, 54, 55
overdraw, eliminating, 286–289
overlay, PorterDuff image compositing mode, 323
OverScroller
class, 351
OvershootInterpolator
class, 240
padding, View
class attribute, 30
PagerTabStrip,
63
PagerTitleStrip,
63
Paint
class, 305
Palette library, 73
paper, as Material Design component, 8–9
Paper Camera app, 400
PathInterpolator
class, 240
patterns, ViewHolder
class, 284–286
performance, techniques to improve
garbage collection, controlling, 283–284
Permission Informant app, 175
photo filters, 17
Photoshop documents (PSD), exporting, 292–293
Pixelmator, 168
platform consistency, core principles, 18–19
platform version, 80
compression, 84
Porter, Thomas, 315
PorterDuff image compositing, 315–316
modes, 316–325. see also modes, PorterDuff image compositing
postInvalidateOnAnimation(),
385
pressed state, 17
primary non-touch navigation method, 80
ProgressBar,
46
Project Butter, 6
promoting apps, Google Play, 400–401
control, 235–241. see also specific controls
prototypes, creation of, 131–160
prototypes, evaluation of, 160
dynamic goal, 162
open-ended exploration, 161
working with users, 161
QuickContactBadge,
46
QuoteSpan,
296
RadialGradient,
325
RadioButton,
44
RadioGroup,
44
radius, ShapeDrawable
class attribute, 94
raster icons, animating, 250–251
raster images, 83
RasterizerSpan,
296
RatingBar,
44
raw
(qualifier), 76
RecyclerView.Adapter
class, 299–300
RecyclerView library, 73
region, 77
RelativeSizeSpan,
296
ReplacementSpan,
296
RGB (red, green, and blue)
right, ShapeDrawable
class attribute, 95
Roboto font family, 293
rounded corners, specifying, 95
round images, shaders for, 325–328
RSSurfaceView,
47
RSTextureView,
47
RTL (right-to-left) layout, 32–34
Samsung, 34
ScaleDrawable
class, 93
scaleType
attribute, values for, 40–41
ScaleXSpan,
296
screen, PorterDuff image compositing mode, 323
screen aspect, 79
screens, keeping on, 405
screenshots, Google Play, 395–397
screen size, 78
Scroller
class, 351
ScrollerCompat
class, 351
ScrollView,
63
SearchView,
63
SeekBar,
44
setAlpha(int),
304
setColorFilter(ColorFilter),
304
setDrawables(ListDrawable),
356–357
setWillNotDraw(false),
355
setWillNotDraw
method, 334
shadowColor, TextView
class attribute, 37
shadowDx, TextView
class attribute, 37
shadowDy, TextView
class attribute, 37
shadowRadius, TextView
class attribute, 37
shadows
shape, ShapeDrawable
class attribute, 94
Show GPU Overdraw option, 287, 288
shrinking images, 199, 272–273
sizes, text, 180
skeuomorphic design, 11
skeuomorphism, 169
slicing, 193
generating alternate sizes, 198–199
SlidingDrawer,
63
smallest width, 78
software keyboard, dismissing, 404
Space,
47
spacing, text, 180
spans
Spinner,
44
Spinner
class, 60
SRC,
PorterDuff image compositing mode, 316–317
SRC_ATOP,
PorterDuff image compositing mode, 320
SRC_IN,
PorterDuff image compositing mode, 318
SRC_OUT,
PorterDuff image compositing mode, 318
SRC_OVER,
PorterDuff image compositing mode, 318–319
StackView,
63
standard icons, 184
startColor, ShapeDrawable
class attribute, 95
state list, XML drawables, 88–91
StateListDrawable
class, 88
StrikethroughSpan,
296
styles
text, 180
StyleSpan,
296
SubscriptSpan,
296
SuggestionSpan,
297
SuperscriptSpan,
297
supporting multiple devices, 23–24, 125–126
support library
design library, 72
GridLayout library, 72
leanback library, 73
MediaRouter library, 73
Palette library, 73
RecyclerView library, 73
SurfaceView,
47
SweepGradient,
325
Switch,
44
system bars, 20
TabHost,
63
TableLayout,
63
TableRow,
63
TabStopSpan.Standard,
297
TabWidget,
63
testing, across device types, 228–229
capitalization, 180
contrast ratio, 179
spacing, 180
styles, 180
varying lengths, 183
text, TextView
class attribute, 37
TextAppearanceSpan,
297
TextClock,
47
textColor, TextView
class attribute, 37
textIs, TextView
class attribute, 37
textSize, TextView
class attribute, 37
textStyle, TextView
class attribute, 37
TextSwitcher,
63
TextureView,
47
fonts, 293
thickness, ShapeDrawable
class attribute, 94
thicknessRatio, ShapeDrawable
class attribute, 94
TimeInterpolator
interface, 236–238
TimePicker,
45
ToggleButton,
45
Toolbar
class, 62
top, ShapeDrawable
class attribute, 95
topLeftRadius, ShapeDrawable
class attribute, 94
topRightRadius, ShapeDrawable
class attribute, 94
touch input
touchscreen type, 79
TransitionDrawable
class, 91–92
transitions, 252
design, 184
type, ShapeDrawable
class attribute, 95
typeface, TextView
class attribute, 37
TypefaceSpan,
297
UCD (User-Centered Design), 108–110
UI mode, 79
UnderlineSpan,
297
up indicator, 125
URLSpan,
297
useLevel, ShapeDrawable
class attribute, 94
User-Centered Design (UCD), 108–110
user personas, 112
ValueAnimator
class, 233–234, 235
values
(qualifier), 76
VectorDrawable
class, 96
vector icons, animating, 246–250
vector images, 84
VideoView,
47
video (YouTube), 400
ViewAnimator,
63
View
class, attributes. see attributes, View
class
ViewFlipper,
63
ViewHolder
class, patterns, 284–286
ViewPager
class, 61
ViewPropertyAnimator
class, 241–242
views, 28
custom. see custom views
drawing, 333
for gathering user input, 42–45
general concepts behind, 332
IDs, 30
layout, 333
missing, finding, Hierarchy Viewer and, 291–292
save and restore state, 334
unnecessary, eliminating, 292
ViewSwitcher,
63
visibility, View
class attribute, 30
visuals, core principles, 17
WCAG (Web Content Accessibility Guidelines), 179
website, Android design, 13
WebView,
47
weight, LinearLayout
class attribute, 53
width, ShapeDrawable
class attribute, 95
and graphical design, 168
naming conventions, 127
supporting multiple devices, 125–126
Wireframe Sketcher, 119
woodworking app, 178
tool details activity, 224–228
wrap_content
(layout parameter), 31
XHDPI (extra high dots per inch), 32, 81
AnimatedVectorDrawable
class, 98–100
InsetDrawable
class, 92
level list, 91
ScaleDrawable
class, 93
tiles, 194
TransitionDrawable
class, 91–92
xml
(qualifier), 76
XOR,
PorterDuff image compositing mode, 323–325
XXHDPI (extra, extra high dots per inch), 32, 81
XXXHDPI (extra, extra, extra high dots per inch), 32, 81, 198
ZoomButton,
47
ZoomControls,
63
13.58.10.55