写在前面的:
倒三角的图标应用场景挺多,如:地图覆盖物方向标识等。一般这种图标UI会给出切图,当然这种方式也是比较简单的实现方式,但是多多少少也是增加了安装包的大小,在这里看看代码中怎么实现。
效果图:
代码实现:![](https://img-blog.csdn.net/20180303225245607)
<TextView
android:id="@+id/textView"
android:layout_width="80dp"
android:layout_height="80dp"
android:background="@drawable/xxxx" />
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<!-- 倒三角 -->
<rotate
android:fromDegrees="