Slide 1

Slide 1 text

Material Design from Concept to Implementation Xamarin Android Fanboys @jeremie_laval | @JamesMontemagno Jérémie Laval | James Montemagno

Slide 2

Slide 2 text

Developers that adopt Material Design now will be leaps and bounds ahead of the competition when Android L releases. Andy Chief Android Mascot

Slide 3

Slide 3 text

Material Design Material is a metaphor Bold, graphic, intentional Motion provides meaning

Slide 4

Slide 4 text

Demo

Slide 5

Slide 5 text

GUIDELINES – DO NOT USE SLIDE Material Theme

Slide 6

Slide 6 text

Material Theme ■ Theme.Material ■ Theme.Material.Light ■ Theme.Material.Light.DarkActionBar Beautiful new styles

Slide 7

Slide 7 text

GUIDELINES – DO NOT USE SLIDE

Slide 8

Slide 8 text

Theming Your App ■ Three Colors ■ Primary Dark ■ Primary (Brand Color) ■ Accent Color Easier than ever

Slide 9

Slide 9 text

UI Color Palette Primary and Accent Colors

Slide 10

Slide 10 text

Theming Your App New attributes 
 <!-- Main theme colors -->
 <!-- your app's branding color (for the app bar) -->
 <item name="android:colorPrimary">@color/xam_blue</item>
 <!-- darker variant of colorPrimary -->
 <item name="android:colorPrimaryDark">@color/xam_dark_blue</item>
 <!-- theme UI controls like checkboxes and text fields -->
 <item name="android:colorAccent">@color/xam_purple</item>
 


Slide 11

Slide 11 text

GUIDELINES – DO NOT USE SLIDE

Slide 12

Slide 12 text

Bring Your UI to Life Mixing images with color

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

Palette ■ Vibrant ■ Vibrant dark ■ Vibrant light ■ Muted ■ Muted dark ■ Muted light Generate Color Palette Automatically https://www.nuget.org/packages/Xamarin.Android.Support.v7.Palette/

Slide 15

Slide 15 text

Demo

Slide 16

Slide 16 text

Layout & Typography

Slide 17

Slide 17 text

Print Design

Slide 18

Slide 18 text

Baseline Grid

Slide 19

Slide 19 text

Roboto

Slide 20

Slide 20 text

Typographic Scale ?android/ TextAppearance.Material.*

Slide 21

Slide 21 text

Keylines

Slide 22

Slide 22 text

Demo

Slide 23

Slide 23 text

GUIDELINES – DO NOT USE SLIDE Paper Craft

Slide 24

Slide 24 text

Paper Craft

Slide 25

Slide 25 text

Shadow Casting

Slide 26

Slide 26 text

Seams

Slide 27

Slide 27 text

Steps

Slide 28

Slide 28 text

Demo

Slide 29

Slide 29 text

End of Part I Xamarin Android Fanboys @jeremie_laval | @JamesMontemagno Jérémie Laval | James Montemagno

Slide 30

Slide 30 text

Material Design from Concept to Implementation Xamarin Android Fanboys @jeremie_laval | @JamesMontemagno Jérémie Laval | James Montemagno

Slide 31

Slide 31 text

Material Design Material is a metaphor Bold, graphic, intentional Motion provides meaning

Slide 32

Slide 32 text

GUIDELINES – DO NOT USE SLIDE Motion

Slide 33

Slide 33 text

Touch Feedback Ripple Ink Response Radial Actions

Slide 34

Slide 34 text

Demo

Slide 35

Slide 35 text

Transitions Activity Transitions Circle Reveal Curved Motion

Slide 36

Slide 36 text

Demo

Slide 37

Slide 37 text

GUIDELINES – DO NOT USE SLIDE

Slide 38

Slide 38 text

Card View

Slide 39

Slide 39 text

Theming Your App Frame View https://www.nuget.org/packages/Xamarin.Android.Support.v7.CardView/

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

public override View GetView (int position, View convertView, ViewGroup parent)
 {
 MyViewHolder holder;
 var view = convertView;
 if (view != null)
 holder = view.Tag as MyViewHolder;
 if (holder == null) {
 holder = new MyViewHolder ();
 view = activity.LayoutInflater.Inflate (Resource.Layout.OptimizedItem, null);
 holder.Name = view.FindViewById (Resource.Id.textView1);
 holder.Description = view.FindViewById (Resource.Id.textView2);
 holder.Image = view.FindViewById (Resource.Id.imageView);
 view.Tag = holder;
 }
 holder.Name.Text = Names [position];
 holder.Description.Text = Descriptions [position];
 holder.Image.SetImageResource (Names [position].ToLower().Contains ("xamarin") ?
 Resource.Drawable.hexagongreen :
 Resource.Drawable.hexagopurple);
 return view;
 }


Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

RecyclerView Super ListView ■ Auto ViewHolder Recycling ■ Built-in Animations https://www.nuget.org/packages/Xamarin.Android.Support.v7.RecyclerView/

Slide 44

Slide 44 text

Compatibility ■ Material Theme - Only available in Android L • Define theme that inherits from older theme (like Holo) in res/ values/styles.xml • Set them as your app’s theme in manifest file New APIs ■ Layouts - Do not use new XML attributes from Android L in pervious versions. - Provide alternative layouts • Android L Layouts: res/layout-v21 • Alternative: res/layout • Modify the style in res/values-v21 for new APIs

Slide 45

Slide 45 text

Compatibility ■ Only available in Android L - Activity Transition - Touch feedback - Reveal - Path-based animations ■ Wrap code in version check Animations

Slide 46

Slide 46 text

Compatibility ■ Recycler View ■ Palette - Both are available back to v7 - Exposed via support library UI Widgets ■ CardView - Available back to v7 - Exposed as Support Library - Limitations (pre-L) - Uses programatic shadows - Does not clip children that intersect with rounded corners

Slide 47

Slide 47 text

Distributing Material Design ⏰ Not yet

Slide 48

Slide 48 text

google.com/design/spec

Slide 49

Slide 49 text

The End! Xamarin Android Fanboys @jeremie_laval | @JamesMontemagno Jérémie Laval | James Montemagno