android - can only perform rotation of image view without holding it -


hi guys uses code below perform rotation rotates 1 time , goes original position, how let image stay @ rotated position?

 <?xml version="1.0" encoding="utf-8"?> <rotate xmlns:android="http://schemas.android.com/apk/res/android" android:fromdegrees="0" android:todegrees="90" android:pivotx="50%" android:pivoty="50%" android:duration="1000" android:startoffset="0" /> 

xml file of code

 animation rotation = animationutils.loadanimation(this, r.anim.rotate);     a.startanimation(rotation); 

use:

anim.setfillafter(true); 

if fillafter true, transformation animation performed persist when finished. defaults false if not set. note applies individual animations , when using animationset chain animations.


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -