java - Center view during simple scale animation -
I am trying to scale / in animation for activity / frigate transition
here Two animations:
& Lt; / Set & gt; -
& lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Set xmlns: Android = "http://schemas.android.com/apk/res/android" Android: Period = "500" Android: Interpolator = "@Android: Anime / Accelerate_Desiret_Inporator" & gt; & Lt; Android translate: fromXDelta = "100%" Android: fromYDelta = "0" Android: toXDelta = "0" Android: toYDelta = "0" /> & Lt; / Set & gt; Use this as:
Override pending transition (R.anim.slide_in_right, R.anim.slide_to_behind); The problem is that the activity is not low in the center of the screen, it is the top / left stick of the screen
Any thoughts what I miss in WM ? Or are you doing wrong? Add a pivot in your scale animation Add it to your XML: Android: PUTx = "50%"
Android: Pivat Y = "50%"
Your level should look like this:
& lt; Android: toXScale = "100%" Android: fromYScale = "100%" Android: pivotX = "50%" Android: pivotY = "50%" Android: toXScale = "80%" Android: ToyScale = "80%" / & Gt;
Comments
Post a Comment