Is there any way to create skew animation for a View with ObjectAnimator in android -


i want create skew animation view in android. so, have rectangular view (this normal/start state), @ end should looks this:
enter image description here

i can such thing android.view.animation package using transformation of type_matrix. can create matrix , use preskew method, apply matrix custom animation , start animation on view. ok.

but

the problem want objectanimator. because using android.view.animation package not recommended use. can't solution problem objectanimator class.

if have imageview, can use method setimagematrix objectanimator (and create custom matrixevaluator evaluate corresponding matrices each factor), want solution problem view class, not subclass of it. , main reason is, textview, example, doesn't have public method setmatrix, , want solution textview too. solution base view class main desire.

there solution: create custom, example, skewtextview, in ondraw method use canvas.skew method.

but worse solution using android.view.animation package, because need create wrappers view subclass want skew.

so, don't know, how can skew view objectanimator (as view class doesn't have public methods setskew or setmatrix).

how solve problem?
have idea of how solve problem?
there solution problem objectanimator?

any (or thoughts) appreciated
thanks

well without subclassing might bit tricky. main idea use timeanimator, provide time callbacks in conjunction camera (which can use matrix transformations). or can use timeanimator , make bitmap view want skew, make original view invisible, , draw bitmap on each timeanimator step applying matrix it. i'm not sure if optimal way that, since have create new bitmap on each frame

edit: no, camera approach not way stated in comments below


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -