23. Outline
A view’s outline defines the shadow it casts
By default, the outline is derived from the view’s background
<shape android:shape="oval">
<solid android:color=“@color/blue“ />
</shape>
24. Outline
But you can do much more with Outline.
Say you want an avatar clipped within a circle…
static class OvalOutlineProvider extends ViewOutlineProvider {
@Override
public void getOutline(View view, Outline outline) {
outline.setOval(0, 0, view.getWidth(), view.getHeight());
}
}
!
view.setOutlineProvider(new OvalOutlineProvider());
25. A card is a piece of paper
that contains a unique
data set of related,
heterogeneous
information.
“
”
Cards
26. A card is a piece of paper
that contains a unique
data set of related,
heterogeneous
information.
“
”
Cards
outline
elevation
47. What’s in a Swatch?
getRgb()
The RGB value of this Swatch (aka the colour)
getPopulation()
The relative amount of pixels this color represents
getHsl()
The HSL value of this Swatch
getTitleTextColor()
ARGB color for legible ‘title’ text over this Swatch
getBodyTextColor()
ARGB color for legible ‘body’ text over this Swatch
Title
Body