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
<RelativeLayoutxmlns:android="http://schemas.android.com/apk/res/android"xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"android:layout_height="match_parent"android:paddingBottom="@dimen/activity_vertical_margin"android:paddingLeft="@dimen/activity_horizontal_margin"android:paddingRight="@dimen/activity_horizontal_margin"android:paddingTop="@dimen/activity_vertical_margin"tools:context=".TestActivity";><RelativeLayoutandroid:layout_width="match_parent"android:layout_height="match_parent"android:layout_alignParentLeft="true"android:layout_alignParentTop="true"style="@style/diagonalStyle"></RelativeLayout></RelativeLayout>
styles.xml
<resourcesxmlns:android="http://schemas.android.com/apk/res/android";><stylename="diagonalStyle"><item
 name="android:background">@drawable/background</item></style></resources>
background.xml
<?xml 
version="1.0"encoding="utf-8"?><layer-listxmlns:android="http://schemas.android.com/apk/res/android";><item><rotateandroid:fromDegrees="0"android:toDegrees="45"android:pivotX="50%"android:pivotY="50%"><shapeandroid:shape="line"android:top="1dip"><strokeandroid:width="1dip"android:color="#FF0000"/></shape></rotate></item></layer-list>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to