Android - Resizing View programmatically using animation library -


im trying resize imageview using animations (0,0) (mlayout.getwidth()/5,mlayout.getheight()/5) , align in center of screen have tried doing changing layout params of imageview until width , height correct uses way process power , memory ! have tried doing using scaleanimation cant understand how resize height , width 0 (let's say) 150 keeping image strictly in center of screen ,using constructor:

 public scaleanimation (float fromx, float tox, float fromy, float toy, int pivotxtype, float pivotxvalue, int pivotytype, float pivotyvalue) 

more cant understand values should give variables : fromx,tox,froy,toy,pivotxvalue,pivotyvalue. code far :

import android.view.view; import android.view.animation.animation; import android.view.animation.scaleanimation; import android.view.animation.transformation;  public class resizeanimation extends animation {  public animation scaleanimation(int fromx, int tox,int fromy,int toy,int pivotxvalue,int pivotyvalue,int time) {     animation scale = new scaleanimation(           fromx,           tox,           fromy,           toy,           absolute,           pivotxvalue,           absolute,           pivotyvalue     );      scale.setduration(time);        return scale; } 

}

thank help


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -