首页 > 其他 > 详细

圆圈里面是个叉号

时间:2015-04-27 12:52:01      阅读:342      评论:0      收藏:0      [点我收藏+]

技术分享

 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>

 

圆圈里面是个叉号

原文:http://www.cnblogs.com/androidsj/p/4459629.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!