Android examples for User Interface:View
get Matrix from View
//package com.java2s; import android.graphics.Matrix; import android.os.Build; import android.view.View; import android.view.animation.Animation; import android.view.animation.Transformation; public class Main { static Animation animation; static Transformation transformation; public static Matrix getMatrix(View view) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) return view.getMatrix(); animation = view.getAnimation(); if (animation == null) return new Matrix(); transformation = new Transformation(); animation.getTransformation(view.getDrawingTime(), transformation); return transformation.getMatrix(); }/* w ww . j a va 2s . c o m*/ }