android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="New Button" android:paddingLeft="16dp" android:paddingRight="16dp"/> Android L Developer Preview new touch feedback mechanism. , a typically rectangular button made of paper that lifts and emits ink reactions on press.
<br/><item name="android:colorControlHighlight">@android:color/holo_purple</item><br/> To change the default touch feedback color, use the theme's attribute.
ValueAnimator anim = ViewAnimationUtils.createCircularReveal( view, centerX, centerY, startRadius, endRadius ); The method enables you to animate a clipping circle to reveal or hide a view.
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.
<br/><item name="android:windowContentTransitions">true</item><br/><item name="android:windowEnterTransition">@transition/fade</item><br/><item name="android:windowExitTransition">@transition/fade</item><br/> 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.
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.
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.
4. Use the method. android:id="@+id/photo" android:viewName="photo_hero" /> 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.
// 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