圆圈里面是个叉号

 1 <FrameLayout
 2         android:id="@+id/error_frame"
 3         android:layout_width="53dp"
 4         android:layout_height="53dp"
 5         android:layout_marginTop="5dp" >
 7         <View
 8             android:layout_width="match_parent"
 9             android:layout_height="match_parent"
10             android:background="@drawable/error_circle" />
12         <ImageView
13             android:id="@+id/error_x"
14             android:layout_width="match_parent"
15             android:layout_height="match_parent"
16             android:contentDescription="@string/app_name"
17             android:scaleType="center"
18             android:src="@drawable/error_center_x" />
19     </FrameLayout>

error_circle.xml

1 <?xml version="1.0" encoding="utf-8"?>
2 <shape
3     android:shape="oval"
4     xmlns:android="http://schemas.android.com/apk/res/android">
5     <solid android:color="@android:color/transparent" />
6     <stroke
7         android:color="@color/error_stroke_color"
8         android:width="3dp" />
9 </shape>

error_center_x.xml

 

 1 <?xml version="1.0" encoding="utf-8"?>
 2 <layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
 3 
 4     <item>
 5         <rotate
 6             android:fromDegrees="45"
 7             android:pivotX="50%"
 8             android:pivotY="50%"
 9             android:toDegrees="45" >
10             <shape android:shape="rectangle" >
11                 <solid android:color="@color/error_stroke_color" />
12                 <corners android:radius="4dp" />
13                 <size
14                     android:height="3dp"
15                     android:width="28dp" />
16             </shape>
17         </rotate>
18     </item>
19 
20     <item>
21         <rotate
22             android:fromDegrees="315"
23             android:pivotX="50%"
24             android:pivotY="50%"
25             android:toDegrees="315" >
26             <shape android:shape="rectangle" >
27                 <solid android:color="@color/error_stroke_color" />
28 
29                 <corners android:radius="4dp" />
30 
31                 <size
32                     android:height="3dp"
33                     android:width="28dp" />
34             </shape>
35         </rotate>
36     </item>
37 
38 </layer-list>

 

转载于:https://www.cnblogs.com/androidsj/p/4459629.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值