Skip to content Skip to sidebar Skip to footer

Rotate Text On A Button

Hy! I've created a button on android in which the text looks like this: http://i51.tinypic.com/2u4oaww.png It looks like this because the activity is in landscape mode.What I want

Solution 1:

This should fix the problem.

<?xml version="1.0" encoding="utf-8"?><rotatexmlns:android="http://schemas.android.com/apk/res/android"android:fromDegrees="0"android:toDegrees="-90"android:pivotX="50%"android:pivotY="50%"android:duration="0" />

First of all it seems you want to rotate it 90 ccw instead of 180. Also if you set the duration to something significant like 4 seconds, you'll see that in your code the button will pivot outside the container becoming invisible, that's why you'll have to pivot in the center of the button.

Post a Comment for "Rotate Text On A Button"