Custom rotated EditText view with working selection, cursor location, etc

后端 未结 5 1347
感情败类
感情败类 2020-12-09 17:06

What I want to do

I want to make a rotated and flipped EditText view that has all of the properties of a normal EditText view.

My problem

I have

5条回答
  •  情歌与酒
    2020-12-09 17:25

    Things are much more simplier. Everything you need is already buit-in View class: http://developer.android.com/reference/android/view/View.html#setRotation(float) A bit more complicated solution if previous one would not works for you by some reason is: http://developer.android.com/reference/android/view/animation/RotateAnimation.html It also using for rotation of views (but animated in most cases however you could use it with zero transition duration).

    Please let me know in the case you have some additional questions (guess no - there is self-explaing method and class).

    Rotating just a canvas - you rotating only image on the screen. setRotation also handles all events, layout flow etc so it should works just fine in your case!

    Hope it would helps!

提交回复
热议问题