Week03-Elements of Material Design PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Elements

 of  Material  Design  


Material  Design  in  Android  
•  Many  of  the  Material  design  features  are  supported  
only  on  Android  5.0  (API  21)  and  higher.  
•  Some  features  are  supported  on  previous  plaBorms  
through  the  v7  support  libraries  
–  Material  design  styles  available  for  some  widgets  by  using  
the  Theme.AppCompat  
–  Color  paleHe  theme  aHributes  and  PalleHe  class  to  extract  
prominent  colors  from  images  
–  RecyclerView  and  CardView  

COMP  107x  (Muppala)   Basics  of  Material  Design   2  


Applying  Material  Design  Elements  
•  The  AppCompat  theme  
•  New  UI  Widgets:  
–  Toolbar  
–  RecyclerView  
•  We  are  using  AppCompat  to  use  
some  of  these  features  in  the  
ChatClient  Colors  app  

COMP  107x  (Muppala)   Basics  of  Material  Design   3  


Color  PaleHe  
•  Using  the  Color  PaleHe  to  specify  
various  colors  for  use  
–  colorPrimary  
–  colorPrimaryDark  
–  textColorPrimary  
–  windowBackground  
–  navigaUonBarColor  

COMP  107x  (Muppala)   Basics  of  Material  Design   4  


RecyclerView  
•  Layout  Manager  for  
posiUoning  views  
RecyclerView  
–  LinearLayoutManager  
–  GridLayoutManager  
–  StaggeredGridLM   Layout  
Adapter   Dataset  
Manager  
•  Default  animaUons  
•  Implement  
RecyclerView.Adapter  

COMP  107x  (Muppala)   Basics  of  Material  Design   5  


Toolbar  
•  GeneralizaUon  of  AcUonBar  
–  Can  be  placed  anywhere  in  the  layout,  as  a  view  
–  Can  be  set  to  act  like  the  AcUonBar  using  
setSupportAcUonBar()  

COMP  107x  (Muppala)   Basics  of  Material  Design   6  


Basic  Graphics  Exercise  
•  Off  to  our  next  exercise  
–  Understanding  2D  graphics  with  Canvas  
–  Drawing  items  onto  the  canvas  and  displaying  it  
on  the  UI  

COMP  107x  (Muppala)   Basics  of  Material  Design   7  

You might also like