Category Hierarchy

如何创建如下所示的按钮:

\--------------\
  \              \
    \   MY-        \
    /   BUTTON     /
  /              /
/--------------/

我设法为右侧创建了箭头样式,但似乎无法设计按钮的左侧站点……

<?xml version="1.0" encoding="utf-8" ?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
  <item>
    <shape android:shape="rectangle">
      <size
          android:width="200dp"
          android:height="150dp" />
      <solid android:color="#5EB888" />
      <corners android:radius="10dp"/>
    </shape>
  </item>
  <item
      android:top="-40dp"
      android:bottom="65dp"
      android:right="-250dp">
    <rotate
        android:fromDegrees="45">
      <shape android:shape="rectangle">
        <solid android:color="#3F51B5" />
      </shape>
    </rotate>
  </item>
  <item
      android:top="65dp"
      android:bottom="-40dp"
      android:right="-250dp">
    <rotate
        android:fromDegrees="-45">
      <shape android:shape="rectangle">
        <solid android:color="#3F51B5" />
      </shape>
    </rotate>
  </item>
</layer-list>

希望你们能帮助我:)

干杯!

转载请注明出处:http://www.xjzhisheng.com/article/20230304/2267788.html