How does android:rotationX and android:rotationY in XML actually work?

Viewed 5231

The function's parameters are float as stated in the android documentation but then why does the following not work:

<LinearLayout
        android:orientation="vertical"
        android:layout_width="4sp"
        android:layout_height="280sp"
        android:background="#F44336"
        android:rotationX="45.0"
        android:id="@+id/Dstrike1"/>

This just displays the original line in the centre of the parent view. Screenshot of the display

Although to obtain a diagonal line on the screen android.animation can be used, is there a simpler method?

1 Answers
Related