Well, I looked, and the answer is: it is difficult.
You can rotate the button using the old animation environment, for example. eg:
Button button = (Button) findViewById(R.id.button);
// rotation from 0 to 90 degrees here
RotateAnimation a = new RotateAnimation(0, 90);
a.setFillAfter(true);
a.setDuration(0);
button.startAnimation(a);
The problem is that the button looks to rotate, but it cannot be clicked correctly. The coordinates that trigger the click event are those areas in which the button was before the rotation.
, , Button onDraw(). onMeasure(). . , .
, , . "".
user658042