Slide 1

Slide 1 text

Dmytro Danylyk

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

Android L Developer Preview new touch feedback mechanism. , a typically rectangular button made of paper that lifts and emits ink reactions on press.

Slide 6

Slide 6 text

, a button made of ink that emits ink reactions on press but does not lift.

Slide 7

Slide 7 text

<item name="android:colorControlHighlight">@android:color/holo_purple</item> To change the default touch feedback color, use the theme's attribute.

Slide 8

Slide 8 text

To change the default touch feedback color, of single view use ripple drawable. drawable/ripple.xml​​

Slide 9

Slide 9 text

To make ripple extends beyond the view bounds.

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

ValueAnimator anim = ViewAnimationUtils.createCircularReveal( view, centerX, centerY, startRadius, endRadius ); The method enables you to animate a clipping circle to reveal or hide a view.

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

Path path = new Path(); path.addCircle(x, y, radius, Path.Direction.CW); ObjectAnimator animator = ObjectAnimator.ofFloat(view, View.X, View.Y, path); animator.setDuration(1000); animator.start(); The class has new constructors that enable you to animate coordinates along a path.

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

... The new class lets you define animators that run when the state of a view changes. anim/selector.xml​​

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

... drawable-v21/icon_anim.xml​​ The new class lets you create drawables that show animations between state changes of the associated view.

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

*Nightly build

Slide 20

Slide 20 text

Open Source Ice Cream Sandwitch Scalable graphic Declaration via XML Web app

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

<item name="android:windowContentTransitions">true</item> <item name="android:windowEnterTransition">@transition/fade</item> <item name="android:windowExitTransition">@transition/fade</item> values-v21/styles.xml​​ - moves views in or out of the scene. @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS); getWindow().setEnterTransition(new Explode()); getWindow().setExitTransition(new Explode()); } xml programmatically - moves views in or out from one of the edges of the scene. - moves views in or out from the center of the scene.

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

A determines how views that are shared between two activities transition between these activities. - animates the changes in clip bounds of target views. - animates the changes in layout bounds of target views. - animates the changes in scale and rotation of target views. - animates changes in size and scale type for an image view.

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

To make a screen transition animation between two activities that have a shared element: 1. Enable window content transitions in your style. true @transition/move_image @transition/move_image 2. Specify a shared elements transition in your style. transition/move_image.xml

Slide 30

Slide 30 text

4. Use the method. 3. Assign a common name to the shared elements in both layouts with the attribute. ImageView hero = (ImageView) findViewById(R.id.photo); ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(this, hero, "photo_hero"); startActivity(intent, options.toBundle()); 5. Set image view source inside Details Activity method.

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

// Check if we're running on Android 5.0 or higher if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { // Call some material design APIs here } else { // Implement this feature without material design } Activity transitions Touch feedback Reveal animations Path-based animations Animated selectors Vector drawables

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

No content