问题
https://drive.google.com/file/d/0B0vP0ppNf8G3MFdBRmF5WkJEZ3c/view?usp=sharing
I want to create shape as above. How do you create this using xml?
回答1:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:right="-100dp">
<rotate
android:fromDegrees="-5"
android:pivotX="0%"
android:pivotY="100%">
<shape android:shape="rectangle">
<solid android:color="#f9c" />
</shape>
</rotate>
</item>
</layer-list>
来源:https://stackoverflow.com/questions/30635406/make-a-view-with-rectangle-shape-using-xml-definitions-drawable-in-android