android - How to ScaleAnimation to a specific size -


i have view starting size (width1 , height1). want create animation change size end size (width2 , height2). have been reading scaleanimation cannot understand scaling factor.

could please tell me values a, b, c & d constructor:

scaleanimation scaleanimation = new scaleanimation(a, b, c, d); 

thanks

parameters of 4-floats scaleanimation constructor following:

fromx   horizontal scaling factor apply @ start of animation tox     horizontal scaling factor apply @ end of animation fromy   vertical scaling factor apply @ start of animation toy     vertical scaling factor apply @ end of animation  

all values float--they represent not sizes in pixels, relative scaling factors. scale width1 width2 , height1 height2 need set:

scaleanimation scaleanimation =     new scaleanimation(1f, 1f * width2 / width1, 1f, 1f * height2 / height1); 

Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -