Material Design in practice Marcin Korniluk material design promo - - PowerPoint PPT Presentation

material design
SMART_READER_LITE
LIVE PREVIEW

Material Design in practice Marcin Korniluk material design promo - - PowerPoint PPT Presentation

Material Design in practice Marcin Korniluk material design promo video What is Material Design? design language Metro Snow White set of rules no implementation Evolution skeumorphism icons & purposes save


slide-1
SLIDE 1

Material Design

in practice

Marcin Korniluk

slide-2
SLIDE 2

material design promo video

slide-3
SLIDE 3
slide-4
SLIDE 4

What is Material Design?

  • design language

– Metro – Snow White

  • set of rules
  • no implementation
slide-5
SLIDE 5

Evolution

  • skeumorphism
  • icons & purposes

– save icon – widgets

  • computing power
  • a device & a toy
slide-6
SLIDE 6

Why?

  • computing power
  • ‘new’ Android
  • natural interaction
  • unification
slide-7
SLIDE 7

Natural interaction

slide-8
SLIDE 8

User interface

https://pl.wikipedia.org/

slide-9
SLIDE 9

Don’t surprise the user

  • physics
  • consistency
  • cleariness
  • feedback
slide-10
SLIDE 10

Metrics and keylines

slide-11
SLIDE 11

Consistency

  • icons
  • colors
  • navigation
  • hero transitions
  • animations
  • point of origin
  • mass, momentum & friction
slide-12
SLIDE 12

Consistency 2

slide-13
SLIDE 13

Consistency 3

slide-14
SLIDE 14

Consistency 4

slide-15
SLIDE 15

Views and layouts

slide-16
SLIDE 16

Views and layouts 2

slide-17
SLIDE 17

Views and layouts 3

slide-18
SLIDE 18

Cards

  • layouts
  • rounded corners
  • shadow
slide-19
SLIDE 19

Will it blend?

  • slow devices
  • long animations
  • simple apps
  • custom apps
  • the apps
slide-20
SLIDE 20
slide-21
SLIDE 21

Material Design

  • set of rules for designers
  • lacks implementation
  • hard to implement
slide-22
SLIDE 22

„Physical properties”

slide-23
SLIDE 23

AppCompat

  • makes things compile
  • Theme
  • basic views
  • Toolbar, SwitchCompat, ...
slide-24
SLIDE 24

3rd party libraries

  • android arsenal
  • awesome android
  • android weekly
slide-25
SLIDE 25

Mäaterial

http://themancaveblog.com/

slide-26
SLIDE 26

Material UI

  • floating action button
  • elevation & shadows
  • ripples
  • state animators
  • custom drawing order
  • hit areas
  • vector graphics
  • rounded corners
slide-27
SLIDE 27

Floating action button

  • crircle 56dp
  • shadow
  • ripple
  • icon
  • placement
slide-28
SLIDE 28

Shadows

  • Lollipop only
  • elevation
slide-29
SLIDE 29

Shadows 2

  • simple, flat shapes
  • ScriptIntrisincBlur
  • getting rid of clipping
slide-30
SLIDE 30

Ripples

  • touch feedback
  • RippleDrawable
  • androidxref.com
  • onTouchEvent
  • rendering thread :(
slide-31
SLIDE 31

Custom drawing order

  • getChildDrawingOrder
  • ViewPager
  • elevation

if (views == null || views.size() != getChildCount()) { views = new ArrayList<View>(); for (int i = 0; i < getChildCount(); i++) views.add(getChildAt(i)); } Collections.sort(views, new ElevationComparator()); @Override protected int getChildDrawingOrder(int childCount, int child) { return views != null ? indexOfChild(views.get(child)) : child; }

slide-32
SLIDE 32

Hit area

  • isTransformedTouchPointInView
  • getHitRect
slide-33
SLIDE 33

Vector graphics

  • svg parser & renderer
  • render to bitmap
  • ImageView

int width = getWidth() - getPaddingLeft() - getPaddingRight(); int height = getHeight() - getPaddingTop() - getPaddingBottom(); if (width <= 0 || height <= 0) return; bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(bitmap); svg.setDocumentWidth(width); svg.setDocumentHeight(height); svg.renderToCanvas(canvas); setImageBitmap(bitmap);

slide-34
SLIDE 34

Rounded corners

  • clipping
  • texturing
  • drawing rounded backgrounds

textureCanvas.drawColor(0, PorterDuff.Mode.CLEAR); super.draw(textureCanvas); RectF rect = new RectF(); rect.bottom = getHeight(); rect.right = getWidth(); canvas.drawRoundRect(rect, cornerRadius, cornerRadius, paint);

slide-35
SLIDE 35

Other features

  • state animators
  • drawableStateChanged
  • hero transitions
  • layout animations
  • icon animations
slide-36
SLIDE 36

Links

  • www.google.com/design/
  • androidxref.com
  • github.com/ZieIony/Carbon
  • code.google.com/p/androidsvg