如何制作自定义Edittext,使其看起来像在android中旋转45度,并且应该可编辑,以便用户可以在旋转的Edittext上输入文本。我尝试过。但我没有得到任何解决方案它。请给出一些想法来做到这一点。
最佳答案
您可以尝试像这样重写 EditText onDraw 方法...
@Override
protected void onDraw(Canvas canvas) {
canvas.save();
canvas.rotate(45.0f,xpivot,ypivot); //rotate around (x,y) pivot point
super.onDraw(canvas);
canvas.restore();
}
我还没有测试过这个,但我认为它应该有效。
关于android - 如何制作自定义Edittext,使其看起来像在android中旋转45度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11105207/