You can achieve this by using 9-patch images as background.
Here is a nice tool you can use online Simple Nine-patch Generator
Here is how you would achieve it
I implemented it using layer-list. Anyone needs to see the code.. Message me.
<!-- Colored rectangle -->
<item>
<shape android:shape="rectangle" >
<stroke android:color="@color/color_black" />
<solid android:color="@color/col_gray_light" />
</shape>
</item>
<item
android:bottom="50dp"
android:left="-25dp"
android:right="-105dp"
android:top="-120dp">
<rotate android:fromDegrees="45" >
<shape android:shape="rectangle" >
<solid android:color="@color/color_white" />
</shape>
</rotate>
</item>
<item
android:bottom="63dp"
android:right="-15dp"
android:top="-40dp">
<rotate android:fromDegrees="45" >
<shape android:shape="rectangle" >
<solid android:color="@color/color_white" />
</shape>
</rotate>
</item>
<item
android:bottom="-40dp"
android:right="-20dp"
android:top="60dp">
<rotate android:fromDegrees="-45" >
<shape android:shape="rectangle" >
<solid android:color="@color/color_white" />
</shape>
</rotate>
</item>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.