SlideShare a Scribd company logo
1 of 38
Download to read offline
Material design basics 
Jorge Juan Barroso Carmona 
Android expert 
jorge@karumi.com 
@flipper83 
+JorgeJBarroso
Karumi is the Rock Solid code software development studio. 
We embark on every project with a commitment to create something 
elegant, enduring and effective. That is our heartbeat. 
Our approach is uniquely simple and honest, we are a small 
dedicated software studio, delivering outstanding work.
A Coherent Cross-platform 
experience
Flexible design system
Synthesises classic principles 
of good design
Depth is 
Important
<ImageView 
… 
android:elevation = “5dp” 
android:stateListAnimator = 
“@anim/pressed_state_list_animator” 
… 
/> 
view.animate().translationZ(…).start();
Depth as 
Reaction
<selector xmlns:android=“…”> 
<item android:state_pressed="true"> 
<set> 
<objectAnimator 
android:propertyName="translationZ" 
android:duration=“@android:integer/ 
config_shortAnimTime" 
android:valueTo="2dp"/> 
</set> 
</item> 
<item android:state_pressed="false"> 
<set> 
<objectAnimator … /> 
</set> 
</item> 
</selector>
Outline
<ImageView 
… 
android:background=“@drawable/ 
my_circle” /> 
… 
/> 
! 
<shape xmlns:android=“…” 
android:shape=“circle”> 
<solid android:color=“#ffE61A58” /> 
</shape>
ViewOutlineProvider viewOutlineProvider = 
new ViewOutlineProvider() { 
@Override 
public void getOutline(View view, Outline 
outline) { 
int size = getResources(). 
getDimensionPixelSize( 
R.dimen.fab_size); 
outline.setOval(0, 0, size, size); 
} 
}; 
! 
view.setClipToOutline(true); 
view.setOutlineProvider(viewOutlineProvider);
Themes
<style 
name="AppTheme" 
parent="android:Theme.Material.Light.DarkActionBar"> 
<item name="android:colorPrimary">@color/primary</item> 
<item name="android:colorAccent">@color/accent</item> 
<item name=“android:colorPrimaryDark”> 
@color/primary_dark</item> 
</style> 
Material
<style 
name="AppTheme" 
parent="Theme.AppCompat.Light.DarkActionBar"> 
<item name="android:colorPrimary">@color/primary</item> 
<item name="android:colorAccent">@color/accent</item> 
<item name=“android:colorPrimaryDark"> 
@color/primary_dark</item> 
</style> 
Theme.AppCompat
Palette
Dark Muted 
Dark Vibrant 
Muted 
Vibrant 
Light Muted 
Light Vibrant 
Palette
dependencies { 
compile 'com.android.support:palette-v7: 
21.0.+' 
Palette 
} 
!! 
Palette p = Palette.generate(bitmap); 
Palette.generateAsync(bitmap, new 
Palette.PaletteAsyncListener() { 
public void onGenerated(Palette palette) { 
// Do something with colors... 
} 
});
Typography
android:TextAppearance.Material.
TextAppearance.AppCompat.
Cards
xmlns:card_view="http:// 
schemas.android.com/apk/res-auto" 
!! 
<android.support.v7.widget.CardView 
android:id="@+id/card_view" 
android:layout_gravity="center" 
android:layout_width="200dp" 
android:layout_height="200dp" 
card_view:cardCornerRadius="4dp"> 
</android.support.v7.widget.CardView>
Toolbar
Material 
Toolbar toolbar = (Toolbar) findViewById(R.id.my_awesome_toolbar); 
setActionBar(toolbar); 
! 
<Toolbar android:id="@+id/my_awesome_toolbar" 
android:layout_height="wrap_content" 
android:layout_width="match_parent" 
android:minHeight="?android/actionBarSize" 
android:background="?android/colorPrimary" />
App.Compat 
Toolbar toolbar = (Toolbar) findViewById(R.id.my_awesome_toolbar); 
setActionBar(toolbar); 
! 
<android.support.v7.widget.Toolbar 
android:id="@+id/my_awesome_toolbar" 
android:layout_height="wrap_content" 
android:layout_width="match_parent" 
android:minHeight="?actionBarSize" 
android:background="?colorPrimary" />
Activity 
Transitions
Don’t forget 
getWindow().requestFeature(Window.FEATURE 
_CONTENT_TRANSITIONS); 
! 
or 
! 
<style 
name="BaseAppTheme" 
parent="android:Theme.Material"> 
<item name= 
“android:windowContentTransitions"> 
true 
</item> 
</style>
Theme transitions 
<style 
name="BaseAppTheme" parent=“android:Theme.Material"> 
<!-- specify enter and exit transitions --> 
<item name="android:windowEnterTransition">@transition/ 
explode</item> 
<item name=“android:windowExitTransition”>@transition/ 
explode</item> 
<!-- specify shared element transitions --> 
<item 
name=“android:windowSharedElementEnterTransition"> 
@transition/change_image_transform</item> 
<item name=“android:windowSharedElementExitTransition”> 
@transition/change_image_transform</item> 
</style>
Code transitions 
// set an exit transition 
getWindow().setExitTransition(new Explode()); 
// all the options 
Window.setEnterTransition() 
Window.setExitTransition() 
Window.setSharedElementEnterTransition() 
Window.setSharedElementExitTransition() 
// start the Activity 
startActivity(intent, 
ActivityOptions.makeSceneTransitionAnimation(this). 
toBundle());
Element transitions 
<ImageView 
… 
android:transitionName=“@transition/my_transition” 
… 
/> 
!! 
ActivityOptions options = ActivityOptions 
.makeSceneTransitionAnimation(this, androidRobotView, 
transitionName); 
startActivity(intent, options.toBundle());
Ripples
<ripple android:color="?android:colorControlHighlight"> 
<item> 
<shape android:shape="oval"> 
<solid android:color="?android:colorAccent" /> 
</shape> 
</item> 
</ripple> 
And set as background
Circular Reveal
Animator anim = 
ViewAnimationUtils.createCircularReveal( 
myView, 
centerX, 
centerY, 
startRadius, 
finalRadius); 
anim.start();
! 
Bibliography 
They’re the cracks! 
What Material means to Android. David González. Codemotion. 2014 
Material Witness. Chet Haase and Romain Guy. Google IO. 2014 
Papercraft. Chris Banes and Nick Butcher. Droidcon UK. 2014 
http://www.google.com/design
Questions? 
! 
Find me 
I am very social! 
jorge@karumi.com 
@flipper83 
+JorgeJBarroso
!

More Related Content

What's hot

Android UX-UI Design for fun and profit | Fernando Cejas | Tuenti
 Android UX-UI Design for fun and profit | Fernando Cejas | Tuenti   Android UX-UI Design for fun and profit | Fernando Cejas | Tuenti
Android UX-UI Design for fun and profit | Fernando Cejas | Tuenti
Smash Tech
 
Android Layout 3分クッキング
Android Layout 3分クッキングAndroid Layout 3分クッキング
Android Layout 3分クッキング
Yuki Anzai
 
To David - Resume
To David - ResumeTo David - Resume
To David - Resume
David To
 

What's hot (19)

Android Layout
Android LayoutAndroid Layout
Android Layout
 
Android UX-UI Design for fun and profit | Fernando Cejas | Tuenti
 Android UX-UI Design for fun and profit | Fernando Cejas | Tuenti   Android UX-UI Design for fun and profit | Fernando Cejas | Tuenti
Android UX-UI Design for fun and profit | Fernando Cejas | Tuenti
 
BluePrint Mobile Framework
BluePrint Mobile FrameworkBluePrint Mobile Framework
BluePrint Mobile Framework
 
Yahoo Mobile Widgets
Yahoo Mobile WidgetsYahoo Mobile Widgets
Yahoo Mobile Widgets
 
Android UI System
Android UI SystemAndroid UI System
Android UI System
 
09 material design
09 material design09 material design
09 material design
 
Application Craft Tutorial for Google Map
Application Craft Tutorial for Google MapApplication Craft Tutorial for Google Map
Application Craft Tutorial for Google Map
 
Android Layout 3分クッキング
Android Layout 3分クッキングAndroid Layout 3分クッキング
Android Layout 3分クッキング
 
Android ui with xml
Android ui with xmlAndroid ui with xml
Android ui with xml
 
To David - Resume
To David - ResumeTo David - Resume
To David - Resume
 
Training Session 2
Training Session 2 Training Session 2
Training Session 2
 
Getting started with Google Android - OSCON 2008
Getting started with Google Android - OSCON 2008Getting started with Google Android - OSCON 2008
Getting started with Google Android - OSCON 2008
 
User Interface customization for AEM 6
User Interface customization for AEM 6User Interface customization for AEM 6
User Interface customization for AEM 6
 
AEM 6.1 User Interface Customization
AEM 6.1 User Interface CustomizationAEM 6.1 User Interface Customization
AEM 6.1 User Interface Customization
 
iOS UI best practices
iOS UI best practicesiOS UI best practices
iOS UI best practices
 
Write once, ship multiple times
Write once, ship multiple timesWrite once, ship multiple times
Write once, ship multiple times
 
Angular material
Angular materialAngular material
Angular material
 
KKBOX WWDC17 UIKit - QQ
KKBOX WWDC17 UIKit - QQKKBOX WWDC17 UIKit - QQ
KKBOX WWDC17 UIKit - QQ
 
Write once, ship multiple times
Write once, ship multiple timesWrite once, ship multiple times
Write once, ship multiple times
 

Viewers also liked

Google material-design
Google material-designGoogle material-design
Google material-design
Harrison Weber
 
Google Material design
Google Material designGoogle Material design
Google Material design
Dan Vitoriano
 
Android animation
Android animationAndroid animation
Android animation
Krazy Koder
 

Viewers also liked (20)

Android Material Design
Android Material DesignAndroid Material Design
Android Material Design
 
Materials design
Materials designMaterials design
Materials design
 
Esp chap 4 materials design (finished)
Esp chap 4   materials design (finished)Esp chap 4   materials design (finished)
Esp chap 4 materials design (finished)
 
Material Design: Google's New Design Language
Material Design: Google's New Design LanguageMaterial Design: Google's New Design Language
Material Design: Google's New Design Language
 
Material design - AndroidosDay 2015
Material design - AndroidosDay 2015Material design - AndroidosDay 2015
Material design - AndroidosDay 2015
 
Material design
Material designMaterial design
Material design
 
Google material-design
Google material-designGoogle material-design
Google material-design
 
Google Material design
Google Material designGoogle Material design
Google Material design
 
Material design
Material designMaterial design
Material design
 
Implementing Google's Material Design Guidelines
Implementing Google's Material Design GuidelinesImplementing Google's Material Design Guidelines
Implementing Google's Material Design Guidelines
 
Basic Android Animation
Basic Android Animation Basic Android Animation
Basic Android Animation
 
Android animation
Android animationAndroid animation
Android animation
 
School Management System in Android
School Management System in AndroidSchool Management System in Android
School Management System in Android
 
Seguridad en dispositivos móviles
Seguridad en dispositivos móvilesSeguridad en dispositivos móviles
Seguridad en dispositivos móviles
 
Herramientas gestion proyectos
Herramientas gestion proyectosHerramientas gestion proyectos
Herramientas gestion proyectos
 
Por su seguridad
Por su seguridadPor su seguridad
Por su seguridad
 
Certificaciones Tecnológicas: La acreditación del experto
Certificaciones Tecnológicas: La acreditación del expertoCertificaciones Tecnológicas: La acreditación del experto
Certificaciones Tecnológicas: La acreditación del experto
 
Privacidad internet
Privacidad internetPrivacidad internet
Privacidad internet
 
Inteligencia Colectiva
Inteligencia ColectivaInteligencia Colectiva
Inteligencia Colectiva
 
Groovy&Grails: desarrollo rápido de aplicaciones
Groovy&Grails: desarrollo rápido de aplicacionesGroovy&Grails: desarrollo rápido de aplicaciones
Groovy&Grails: desarrollo rápido de aplicaciones
 

Similar to Material design basics

Similar to Material design basics (20)

Design Patterns for Tablets and Smartphones
Design Patterns for Tablets and SmartphonesDesign Patterns for Tablets and Smartphones
Design Patterns for Tablets and Smartphones
 
Chapter 5 - Layouts
Chapter 5 - LayoutsChapter 5 - Layouts
Chapter 5 - Layouts
 
Getting Started With Material Design
Getting Started With Material DesignGetting Started With Material Design
Getting Started With Material Design
 
Fragments: Why, How, What For?
Fragments: Why, How, What For?Fragments: Why, How, What For?
Fragments: Why, How, What For?
 
Tips & Tricks to spice up your Android app
Tips & Tricks to spice up your Android appTips & Tricks to spice up your Android app
Tips & Tricks to spice up your Android app
 
Layouts in android
Layouts in androidLayouts in android
Layouts in android
 
Fernando F. Gallego - Efficient Android Resources 101
Fernando F. Gallego - Efficient Android Resources 101Fernando F. Gallego - Efficient Android Resources 101
Fernando F. Gallego - Efficient Android Resources 101
 
Geekcamp Android
Geekcamp AndroidGeekcamp Android
Geekcamp Android
 
01 09 - graphical user interface - basic widgets
01  09 - graphical user interface - basic widgets01  09 - graphical user interface - basic widgets
01 09 - graphical user interface - basic widgets
 
3. file external memory
3. file external memory3. file external memory
3. file external memory
 
How to use data binding in android
How to use data binding in androidHow to use data binding in android
How to use data binding in android
 
android level 3
android level 3android level 3
android level 3
 
Android Tutorials - Powering with Selection Widget
Android Tutorials - Powering with Selection WidgetAndroid Tutorials - Powering with Selection Widget
Android Tutorials - Powering with Selection Widget
 
Hierarchy viewer
Hierarchy viewerHierarchy viewer
Hierarchy viewer
 
Advanced Android gReporter
Advanced Android gReporterAdvanced Android gReporter
Advanced Android gReporter
 
Support Design Library
Support Design LibrarySupport Design Library
Support Design Library
 
Angular server side rendering - Strategies & Technics
Angular server side rendering - Strategies & Technics Angular server side rendering - Strategies & Technics
Angular server side rendering - Strategies & Technics
 
Android por onde começar? Mini Curso Erbase 2015
Android por onde começar? Mini Curso Erbase 2015 Android por onde começar? Mini Curso Erbase 2015
Android por onde começar? Mini Curso Erbase 2015
 
Getting the Magic on Android Tablets
Getting the Magic on Android TabletsGetting the Magic on Android Tablets
Getting the Magic on Android Tablets
 
Services
ServicesServices
Services
 

More from Jorge Barroso

More from Jorge Barroso (10)

Tensor for android
Tensor for androidTensor for android
Tensor for android
 
Forgetting android v2
Forgetting android v2Forgetting android v2
Forgetting android v2
 
Get out of my thread (Trabajando en diferido)
Get out of my thread (Trabajando en diferido)Get out of my thread (Trabajando en diferido)
Get out of my thread (Trabajando en diferido)
 
All you need know about testing
All you need know about testingAll you need know about testing
All you need know about testing
 
Presistiendo que es gerundio (My storing story)
Presistiendo que es gerundio (My storing story)Presistiendo que es gerundio (My storing story)
Presistiendo que es gerundio (My storing story)
 
Mobile development for startups
Mobile development for startupsMobile development for startups
Mobile development for startups
 
Androides y Mazmorras. Part I (dungeons & robots)
Androides y Mazmorras. Part I (dungeons & robots)Androides y Mazmorras. Part I (dungeons & robots)
Androides y Mazmorras. Part I (dungeons & robots)
 
Learning android with AOSP
Learning android with AOSPLearning android with AOSP
Learning android with AOSP
 
Material for old school
Material for old schoolMaterial for old school
Material for old school
 
Forgetting android
Forgetting androidForgetting android
Forgetting android
 

Recently uploaded

1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
AldoGarca30
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 

Recently uploaded (20)

Computer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersComputer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to Computers
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEGEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech Civil
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 

Material design basics

  • 1. Material design basics Jorge Juan Barroso Carmona Android expert jorge@karumi.com @flipper83 +JorgeJBarroso
  • 2. Karumi is the Rock Solid code software development studio. We embark on every project with a commitment to create something elegant, enduring and effective. That is our heartbeat. Our approach is uniquely simple and honest, we are a small dedicated software studio, delivering outstanding work.
  • 7. <ImageView … android:elevation = “5dp” android:stateListAnimator = “@anim/pressed_state_list_animator” … /> view.animate().translationZ(…).start();
  • 9. <selector xmlns:android=“…”> <item android:state_pressed="true"> <set> <objectAnimator android:propertyName="translationZ" android:duration=“@android:integer/ config_shortAnimTime" android:valueTo="2dp"/> </set> </item> <item android:state_pressed="false"> <set> <objectAnimator … /> </set> </item> </selector>
  • 11. <ImageView … android:background=“@drawable/ my_circle” /> … /> ! <shape xmlns:android=“…” android:shape=“circle”> <solid android:color=“#ffE61A58” /> </shape>
  • 12. ViewOutlineProvider viewOutlineProvider = new ViewOutlineProvider() { @Override public void getOutline(View view, Outline outline) { int size = getResources(). getDimensionPixelSize( R.dimen.fab_size); outline.setOval(0, 0, size, size); } }; ! view.setClipToOutline(true); view.setOutlineProvider(viewOutlineProvider);
  • 14. <style name="AppTheme" parent="android:Theme.Material.Light.DarkActionBar"> <item name="android:colorPrimary">@color/primary</item> <item name="android:colorAccent">@color/accent</item> <item name=“android:colorPrimaryDark”> @color/primary_dark</item> </style> Material
  • 15. <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <item name="android:colorPrimary">@color/primary</item> <item name="android:colorAccent">@color/accent</item> <item name=“android:colorPrimaryDark"> @color/primary_dark</item> </style> Theme.AppCompat
  • 17. Dark Muted Dark Vibrant Muted Vibrant Light Muted Light Vibrant Palette
  • 18. dependencies { compile 'com.android.support:palette-v7: 21.0.+' Palette } !! Palette p = Palette.generate(bitmap); Palette.generateAsync(bitmap, new Palette.PaletteAsyncListener() { public void onGenerated(Palette palette) { // Do something with colors... } });
  • 22. Cards
  • 23. xmlns:card_view="http:// schemas.android.com/apk/res-auto" !! <android.support.v7.widget.CardView android:id="@+id/card_view" android:layout_gravity="center" android:layout_width="200dp" android:layout_height="200dp" card_view:cardCornerRadius="4dp"> </android.support.v7.widget.CardView>
  • 25. Material Toolbar toolbar = (Toolbar) findViewById(R.id.my_awesome_toolbar); setActionBar(toolbar); ! <Toolbar android:id="@+id/my_awesome_toolbar" android:layout_height="wrap_content" android:layout_width="match_parent" android:minHeight="?android/actionBarSize" android:background="?android/colorPrimary" />
  • 26. App.Compat Toolbar toolbar = (Toolbar) findViewById(R.id.my_awesome_toolbar); setActionBar(toolbar); ! <android.support.v7.widget.Toolbar android:id="@+id/my_awesome_toolbar" android:layout_height="wrap_content" android:layout_width="match_parent" android:minHeight="?actionBarSize" android:background="?colorPrimary" />
  • 28. Don’t forget getWindow().requestFeature(Window.FEATURE _CONTENT_TRANSITIONS); ! or ! <style name="BaseAppTheme" parent="android:Theme.Material"> <item name= “android:windowContentTransitions"> true </item> </style>
  • 29. Theme transitions <style name="BaseAppTheme" parent=“android:Theme.Material"> <!-- specify enter and exit transitions --> <item name="android:windowEnterTransition">@transition/ explode</item> <item name=“android:windowExitTransition”>@transition/ explode</item> <!-- specify shared element transitions --> <item name=“android:windowSharedElementEnterTransition"> @transition/change_image_transform</item> <item name=“android:windowSharedElementExitTransition”> @transition/change_image_transform</item> </style>
  • 30. Code transitions // set an exit transition getWindow().setExitTransition(new Explode()); // all the options Window.setEnterTransition() Window.setExitTransition() Window.setSharedElementEnterTransition() Window.setSharedElementExitTransition() // start the Activity startActivity(intent, ActivityOptions.makeSceneTransitionAnimation(this). toBundle());
  • 31. Element transitions <ImageView … android:transitionName=“@transition/my_transition” … /> !! ActivityOptions options = ActivityOptions .makeSceneTransitionAnimation(this, androidRobotView, transitionName); startActivity(intent, options.toBundle());
  • 33. <ripple android:color="?android:colorControlHighlight"> <item> <shape android:shape="oval"> <solid android:color="?android:colorAccent" /> </shape> </item> </ripple> And set as background
  • 35. Animator anim = ViewAnimationUtils.createCircularReveal( myView, centerX, centerY, startRadius, finalRadius); anim.start();
  • 36. ! Bibliography They’re the cracks! What Material means to Android. David González. Codemotion. 2014 Material Witness. Chet Haase and Romain Guy. Google IO. 2014 Papercraft. Chris Banes and Nick Butcher. Droidcon UK. 2014 http://www.google.com/design
  • 37. Questions? ! Find me I am very social! jorge@karumi.com @flipper83 +JorgeJBarroso
  • 38. !