I want to make a diamond as a resource file, so I rotate the square to do this. The problem is that the corners seem to be cropped, instead a hexagon is formed. Just like a note, I would like to stretch it vertically, if possible.
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item> <rotate android:fromDegrees="45" android:pivotX="50%" android:pivotY="50%" android:toDegrees="45" > <shape android:shape="rectangle"> <size android:height="40dp" android:width="40dp" /> <solid android:color="@color/level_1_color" /> </shape> </rotate> </item>

android xml android-xml graphics
uesports135 Oct 26 '14 at 19:22 2014-10-26 19:22
source share