Android scale animation on view

前端 未结 7 973
轮回少年
轮回少年 2020-11-28 04:10

I want to use ScaleAnimation (programmatically not in xml) to change height to view from 0 to 60% of parent height. Width of view is constant and is 50px. View is empty onl

相关标签:
7条回答
  • 2020-11-28 04:53

    try this code to create Scale animation without using xml

    ScaleAnimation animation = new ScaleAnimation(fromXscale, toXscale, fromYscale, toYscale, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
    
    0 讨论(0)
提交回复
热议问题