ANDROID STYLES
   XML for Graphics
ADD A LITTLE STYLE
Transform an ordinary layout into something nice.
COLORS.XML
 Create a color palette.
ADDING COLORS
android:background=”@color/white”
STYLES.XML
Separate your styles from your program.
SHAPE DRAWABLES
    A simple gradient
APPLY GRADIENT
  @drawable/green_grad
UNOPTIMIZED STYLES
 Applying similar styles to text & buttons.
OPTIMIZE STYLES
Combine common attributes. Then apply as parent styles.
STATE LIST DRAWABLE
Creating buttons with focus & pressed states.
STATE LIST DRAWABLE
    Interactive button styles
ADDING ICONS
android:drawableLeft=”@drawable/cloud”
ADDING BACKGROUNDS
Create drawable-land folder for landscape versions images.
PHONE / TABLET
By default, most phone styles are small on tablets.
            Background images stretch.
TABLET STYLES
Add values-xlarge folder. Then add a new styles.xml file with just
                   the styles that are different
TABLET STYLES
Styles are adjusted for tablets without affecting phones.
KEEP IN TOUCH


• @aviewfrommyseat

• frank@aviewfrommyseat.com

• frankpanko.com/aa.pdf

Android Styles