material design
play

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


  1. Material Design in practice Marcin Korniluk

  2. material design promo video

  3. What is Material Design? • design language – Metro – Snow White • set of rules • no implementation

  4. Evolution • skeumorphism • icons & purposes – save icon – widgets • computing power • a device & a toy

  5. Why? ● computing power ● ‘new’ Android ● natural interaction ● unification

  6. Natural interaction

  7. User interface https://pl.wikipedia.org/

  8. Don’t surprise the user ● physics ● consistency ● cleariness ● feedback

  9. Metrics and keylines

  10. Consistency ● icons ● colors ● navigation ● hero transitions ● animations ● point of origin ● mass, momentum & friction

  11. Consistency 2

  12. Consistency 3

  13. Consistency 4

  14. Views and layouts

  15. Views and layouts 2

  16. Views and layouts 3

  17. Cards • layouts • rounded corners • shadow

  18. Will it blend? • slow devices • long animations • simple apps • custom apps • the apps

  19. Material Design ● set of rules for designers ● lacks implementation ● hard to implement

  20. „ Physical properties ”

  21. AppCompat ● makes things compile ● Theme ● basic views ● Toolbar, SwitchCompat, ...

  22. 3rd party libraries ● android arsenal ● awesome android ● android weekly

  23. Mäaterial http://themancaveblog.com/

  24. Material UI ● floating action button ● elevation & shadows ● ripples ● state animators ● custom drawing order ● hit areas ● vector graphics ● rounded corners

  25. Floating action button • crircle 56dp • shadow • ripple • icon • placement

  26. Shadows ● Lollipop only ● elevation

  27. Shadows 2 ● simple, flat shapes ● ScriptIntrisincBlur ● getting rid of clipping

  28. Ripples ● touch feedback ● RippleDrawable ● androidxref.com ● onTouchEvent ● rendering thread :(

  29. 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; }

  30. Hit area ● isTransformedTouchPointInView ● getHitRect

  31. 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);

  32. 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);

  33. Other features ● state animators ● drawableStateChanged ● hero transitions ● layout animations ● icon animations

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

Recommend


More recommend