Hello all i want background of a layout as follows.
Now what i am doing is follows,
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:drawable="@color/blue_new">
</item>
<item>
<rotate
android:fromDegrees="45"
android:toDegrees="0"
android:pivotX="0%"
android:pivotY="100%" >
<shape
android:shape="rectangle">
<solid android:color="@color/white" />
</shape>
</rotate>
</item>
<item>
<rotate
android:fromDegrees="-45"
android:toDegrees="0"
android:pivotX="130%"
android:pivotY="0%" >
<shape
android:shape="rectangle">
<solid android:color="@color/white" />
</shape>
</rotate>
</item>
</layer-list>
Now i am partially getting what i want. If i remove third item, the rectangle is not reaching another end. Is there any other way to do it? Other then 9patch image? Can i dynamically calculate the pivotX and pivoty values of the second and third item? Or is there any other method to do so.
Thanks.