user1368606
user1368606

Reputation: 165

Rotate My EditText 90 Degrees in Android

I have an EditText in Android. Want to rotate that 90 degrees.I konw it can be done by Animation class. Please spot me how to do that?

Upvotes: 0

Views: 1233

Answers (1)

Antony
Antony

Reputation: 603

There are many method to Rotate a view. Using Animation is one option.

    EditText et = (EditText) findViewById(R.id.editText1);        
    Animation an = new RotateAnimation(0.0f, 90.0f, 100, 100);
    an.setDuration(90);             
    an.setRepeatCount(0);               
    an.setFillAfter(true);               // keep rotation after animation
    et.setAnimation(an);                 //apply animation to EditText

Upvotes: 2

Related Questions