I\'m trying to draw a diagonal line in an Android app with the XML, but it is not working. It simply draws a horizontal line.
main.xml:
You really only needed one number change to get it to work. Just Change the fromDegrees to 45:
-
The rotate drawable http://developer.android.com/reference/android/graphics/drawable/RotateDrawable.html
actually uses the Property Animation format http://developer.android.com/guide/topics/resources/animation-resource.html
Whereas you are making a non-animating diagonal line, you want it to start out at 45 degrees, and end up at 45 degrees also. So setting them both to 45 is the norm.