Android自定义View实现扫描效果
程序员文章站
2022-03-23 09:53:30
本文实例为大家分享了android自定义view实现扫描效果的具体代码,供大家参考,具体内容如下演示效果如下:实现内容:1、控制动画是竖向或者横向2、控制动画初始是从底部/左边开始,或者从上边/右边开...
本文实例为大家分享了android自定义view实现扫描效果的具体代码,供大家参考,具体内容如下
演示效果如下:
实现内容:
1、控制动画是竖向或者横向
2、控制动画初始是从底部/左边开始,或者从上边/右边开始
3、控制动画的时常
4、可以自定义动画素材
具体实现:
自定义属性:
<declare-styleable name="scanview" tools:ignore="resourcename"> <!--扫描的图片--> <attr name="unit_scan_img" format="reference" /> <!--动画时长--> <attr name="anim_duration" format="integer" /> </declare-styleable>
自定义 view:
实现原理,就是对 bitmap 做 translate、prescale 转换,然后不断的 draw bitmap。其中 translate 是为了实现位移效果,prescale 则是为了来回转换方向。
class scanview : view { /** * 扫描的图片drawable */ private var scanimg: drawable? = null private lateinit var paint: paint /** * 控件的宽 */ private var viewwidth: int = 0 /** * 控件的高 */ private var viewheight: int = 0 private var bitmapmatrix = matrix() private var scanbitmap: bitmap? = null /** * 扫描图片需要显示的高度 */ private var showbitmapheight: float = 0f /** * 控制动画是竖向或者横向 */ private var isvertical = true /** * 控制动画初始是从底部/左边开始(true),或者从上边/右边开始(false) */ private var isstartfrombottom = true private var ispositive = true fun setvertical(isvertical: boolean) { this.isvertical = isvertical stopscananimandreset() setscanbitmap() } fun setstartfrombootom(isfrombottom: boolean) { this.isstartfrombottom = isfrombottom stopscananimandreset() } /** * 属性动画 */ private var valueanimator: valueanimator? = null /** * 动画时长 */ private var animduration: long = 1000l constructor(context: context) : this(context, null) constructor(context: context, attrs: attributeset?) : this(context, attrs, 0) constructor(context: context, attrs: attributeset?, defstyleattr: int) : super(context, attrs, defstyleattr) { initattribute(context, attrs) init() } private fun initattribute(context: context, attrs: attributeset?) { attrs?.let { val typedarray = context.obtainstyledattributes(attrs, r.styleable.scanview) scanimg = typedarray.getdrawable(r.styleable.scanview_unit_scan_img) animduration = typedarray.getint(r.styleable.scanview_anim_duration, 1000).tolong() typedarray.recycle() } } fun setanimduration(time: long) { animduration = time } private fun init() { paint = paint(paint.anti_alias_flag) paint.style = paint.style.fill } private fun getbitmapfromdrawable(drawable: drawable): bitmap? { var unitimgbitmap = drawable.tobitmap() if (unitimgbitmap.isrecycled) { return null } if (unitimgbitmap.isrecycled) { return null } // 处理横置的时候图片的旋转(因为视觉给的图一般是一个竖向的图,因此在横置的时候,手动将图片同步横置) if (!isvertical) { val matrix = matrix() matrix.postrotate(90f) val resizedbitmap = bitmap.createbitmap(unitimgbitmap, 0, 0, unitimgbitmap.width, unitimgbitmap.height, matrix, true) if (resizedbitmap != unitimgbitmap && unitimgbitmap != null && !unitimgbitmap.isrecycled) { unitimgbitmap.recycle() unitimgbitmap = resizedbitmap } } var realwidth: int val finalbitmap: bitmap val realunitimgwidth: float if (isvertical) { realwidth = viewwidth finalbitmap = bitmap.createbitmap(realwidth, unitimgbitmap.height, bitmap.config.argb_8888) realunitimgwidth = unitimgbitmap.width.tofloat() } else { realwidth = viewheight finalbitmap = bitmap.createbitmap(unitimgbitmap.width, realwidth, bitmap.config.argb_8888) realunitimgwidth = unitimgbitmap.height.tofloat() } val canvas = canvas(finalbitmap) // 向上取整 val count = ceil(realwidth / realunitimgwidth).toint() // 为了解决适配问题,因为不同手机宽度不同,如果 ui 只提供了一个尺寸的素材,则可能会出现拉伸 // 导致视觉效果不好的问题。这里换一种解决思路,即不将图片进行缩放,而是根据时机的宽度, // 去重复拼凑 unitimgbitmap,使其转换为一个充满宽度的整图,从而避免缩放导致的拉伸问题。 // 需要注意的是,此时需要跟视觉协商,只需要给最小单元的图片素材即可。 if (isvertical) { for (i in 0 until count) { canvas.drawbitmap(unitimgbitmap,i * realunitimgwidth, 0f, paint) } } else { for (i in 0 until count) { canvas.drawbitmap(unitimgbitmap,0f, i * realunitimgwidth, paint) } } return finalbitmap } override fun ondraw(canvas: canvas) { super.ondraw(canvas) scanbitmap?.let { canvas.drawbitmap(it, bitmapmatrix, paint) } } /** * 开始做属性动画 */ fun startscananim() { valueanimator?.takeif { it.isrunning }?.let { it.cancel() } val value = if(isvertical) viewheight.tofloat() else viewwidth.tofloat() valueanimator = if (isstartfrombottom) { valueanimator.offloat(value + showbitmapheight, -showbitmapheight) } else { valueanimator.offloat(-showbitmapheight, value + showbitmapheight) } valueanimator?.apply { // 使得扫描动画在横竖状态下都是相同的速度 duration = if (isvertical) animduration else (animduration * 1.0f / viewwidth * viewheight).tolong() repeatcount = -1 repeatmode = valueanimator.reverse addupdatelistener(getupdatelistener()) addlistener(object : animatorlisteneradapter() { override fun onanimationrepeat(animation: animator) { // 用于控制 scan img 动画来回时的方向 ispositive = !ispositive } }) start() } } // 通过直接返回对应的 valueanimator.animatorupdatelistener, // 而不是在 valueanimator.animatorupdatelistener 回调中做 if 判断,提高性能 private fun getupdatelistener(): valueanimator.animatorupdatelistener { return if (isvertical) { if (isstartfrombottom) { valueanimator.animatorupdatelistener { animation -> val value = animation.animatedvalue as? float ?: return@animatorupdatelistener bitmapmatrix.settranslate(0f, value) // 使得 bitmap 来回动画的时候,方向是相对的 bitmapmatrix.prescale(1.0f, if (ispositive) -1.0f else 1.0f) invalidate() } } else { valueanimator.animatorupdatelistener { animation -> val value = animation.animatedvalue as? float ?: return@animatorupdatelistener bitmapmatrix.settranslate(0f, value) // 使得 bitmap 来回动画的时候,方向是相对的 bitmapmatrix.prescale(1.0f, if (ispositive) 1.0f else -1.0f) invalidate() } } } else { if (isstartfrombottom) { valueanimator.animatorupdatelistener { animation -> val value = animation.animatedvalue as? float ?: return@animatorupdatelistener bitmapmatrix.settranslate(value, 0f) bitmapmatrix.prescale(if (ispositive) 1.0f else -1.0f, 1.0f) invalidate() } } else { valueanimator.animatorupdatelistener { animation -> val value = animation.animatedvalue as? float ?: return@animatorupdatelistener bitmapmatrix.settranslate(value, 0f) bitmapmatrix.prescale(if (ispositive) -1.0f else 1.0f, 1.0f) invalidate() } } } } /** * 停止属性动画 */ fun stopscananimandreset() { valueanimator?.takeif { it.isrunning }?.cancel() reset(true) } /** * 重置为初始状态 */ private fun reset(isinvalidate: boolean) { bitmapmatrix.reset() ispositive = true if (isvertical) { if (isstartfrombottom) { bitmapmatrix.settranslate(0f, viewheight + showbitmapheight) bitmapmatrix.prescale(1.0f, if (ispositive) -1.0f else 1.0f) } else { bitmapmatrix.settranslate(0f, -showbitmapheight) bitmapmatrix.prescale(1.0f, if (ispositive) 1.0f else -1.0f) } } else { if (isstartfrombottom) { bitmapmatrix.settranslate(viewwidth + showbitmapheight, 0f) bitmapmatrix.prescale(if (ispositive) 1.0f else -1.0f, 1.0f) } else { bitmapmatrix.settranslate(-showbitmapheight, 0f) bitmapmatrix.prescale(if (ispositive) -1.0f else 1.0f, 1.0f) } } if (isinvalidate) { invalidate() } } private fun setscanbitmap() { if (scanimg == null || viewwidth <= 0 || viewheight <= 0) { return } val bitmap = getbitmapfromdrawable(scanimg!!) ?: return scanbitmap = bitmap showbitmapheight = if (isvertical) bitmap.height.tofloat() else bitmap.width.tofloat() reset(false) } override fun onsizechanged(w: int, h: int, oldw: int, oldh: int) { super.onsizechanged(w, h, oldw, oldh) viewwidth = w viewheight = h setscanbitmap() } override fun ondetachedfromwindow() { super.ondetachedfromwindow() stopscananimandreset() } }
需要注意,上述代码的实现,有一个暂时还没有思路解决的问题,即比如动画从上扫描到底部,然后转换方向再从底部往上的时候,这里其实是有一段时间间隔的,并不是会马上从底部露出来。 只不过如果设置的动画时间比较短的话,感官上不会那么明显。
另外,上述代码中用到了系统提供的扩展方法 drawable.tobitmap() 。
// androidx.core:core-ktx:1.3.2 fun drawable.tobitmap( @px width: int = intrinsicwidth, @px height: int = intrinsicheight, config: config? = null ): bitmap { if (this is bitmapdrawable) { if (config == null || bitmap.config == config) { // fast-path to return original. bitmap.createscaledbitmap will do this check, but it // involves allocation and two jumps into native code so we perform the check ourselves. if (width == intrinsicwidth && height == intrinsicheight) { return bitmap } return bitmap.createscaledbitmap(bitmap, width, height, true) } } val (oldleft, oldtop, oldright, oldbottom) = bounds val bitmap = bitmap.createbitmap(width, height, config ?: config.argb_8888) setbounds(0, 0, width, height) draw(canvas(bitmap)) setbounds(oldleft, oldtop, oldright, oldbottom) return bitmap }
最后附带本身使用的动画图片素材(是一张矢量图):
<vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt" android:width="108dp" android:height="61dp" android:viewportwidth="108" android:viewportheight="61"> <path android:pathdata="m108,0v1l106,1v3l108,3v4h106v6h108v7h106v9h108v10h106v12h108v13h106v15h108v16h106v18h108v19h106v21h108v22h106v24h108v25h106v27h108v28h106v30h108v31h106v33h108v34h106v36h108v37h106v39h108v40h106v42h108v43h106v45h108v46h106v48h108v49h106v51h108v52h106v54h108v55h106v57h108v58h106v60h108v61l106,61h105h103h102h100h99h97h96h94h93h91h90h88h87h85h84h82h81h79h78h76h75h73h72h70h69h67h66h64h63h61h60h58h57h55h54h52h51h49h48h46h45h43h42h40h39h37h36h34h33h31h30h28h27h25h24h22h21h19h18h16h15h13h12h10h9h7h6h4h3h1h0v60v58v57v55v54v52v51v49v48v46v45v43v42v40v39v37v36v34v33v31v30v28v27v25v24v22v21v19v18v16v15v13v12v10v9v7v6v4v3v1v0l1,0h3h4h6h7h9h10h12h13h15h16h18h19h21h22h24h25h27h28h30h31h33h34h36h37h39h40h42h43h45h46h48h49h51h52h54h55h57h58h60h61h63h64h66h67h69h70h72h73h75h76h78h79h81h82h84h85h87h88h90h91h93h94h96h97h99h100h102h103h105h106h108zm1,1v3l3,3v1l1,1zm4,1v3l6,3v1l4,1zm7,1v3l9,3v1l7,1zm10,1v3h12v1l10,1zm13,1v3h15v1l13,1zm16,1v3h18v1l16,1zm19,1v3h21v1l19,1zm22,1v3h24v1l22,1zm25,1v3l27,3v1l25,1zm28,1v3l30,3v1l28,1zm31,1v3l33,3v1l31,1zm34,1v3l36,3v1l34,1zm37,1v3l39,3v1l37,1zm40,1v3l42,3v1l40,1zm43,1v3l45,3v1l43,1zm46,1v3l48,3v1l46,1zm49,1v3l51,3v1l49,1zm52,1v3l54,3v1l52,1zm55,1v3l57,3v1l55,1zm58,1v3l60,3v1l58,1zm61,1v3l63,3v1l61,1zm64,1v3h66v1l64,1zm67,1v3h69v1l67,1zm70,1v3h72v1l70,1zm73,1v3h75v1l73,1zm76,1v3h78v1l76,1zm79,1v3h81v1l79,1zm82,1v3l84,3v1l82,1zm85,1v3l87,3v1l85,1zm88,1v3l90,3v1l88,1zm91,1v3l93,3v1l91,1zm94,1v3l96,3v1l94,1zm97,1v3l99,3v1l97,1zm100,1v3l102,3v1l100,1zm103,1v3l105,3v1l103,1zm105,4h103v6h105v4zm105,7h103v9h105v7zm105,10h103v12h105v10zm105,13h103v15h105v13zm105,16h103v18h105v16zm105,19h103v21h105v19zm105,22h103v24h105v22zm105,25h103v27h105v25zm105,28h103v30h105v28zm105,31h103v33h105v31zm105,34h103v36h105v34zm105,37h103v39h105v37zm105,40h103v42h105v40zm105,43h103v45h105v43zm105,46h103v48h105v46zm105,49h103v51h105v49zm105,52h103v54h105v52zm102,51v49h100v51h102zm100,52h102v54h100v52zm99,51v49h97v51h99zm97,52h99v54h97v52zm96,51v49h94v51h96zm94,52h96v54h94v52zm93,51v49h91v51h93zm91,52h93v54h91v52zm90,51v49h88v51h90zm88,52h90v54h88v52zm87,51v49h85v51h87zm85,52h87v54h85v52zm84,51v49h82v51h84zm82,52h84v54h82v52zm81,51v49l79,49v51l81,51zm79,52l81,52v54l79,54v52zm78,51v49h76v51h78zm76,52h78v54h76v52zm75,51v49h73v51h75zm73,52h75v54h73v52zm72,51v49h70v51h72zm70,52h72v54h70v52zm69,51v49h67v51h69zm67,52h69v54h67v52zm66,51v49h64v51h66zm64,52h66v54h64v52zm63,51v49h61v51h63zm61,52h63v54h61v52zm60,51v49h58v51h60zm58,52h60v54h58v52zm57,51v49h55v51h57zm55,52h57v54h55v52zm54,51v49h52v51h54zm52,52h54v54h52v52zm51,51v49h49v51h51zm49,52h51v54h49v52zm48,51v49h46v51h48zm46,52h48v54h46v52zm45,51v49h43v51h45zm43,52h45v54h43v52zm42,51v49h40v51h42zm40,52h42v54h40v52zm39,51v49h37v51h39zm37,52h39v54h37v52zm36,51v49h34v51h36zm34,52h36v54h34v52zm33,51v49h31v51h33zm31,52h33v54h31v52zm30,51v49h28v51h30zm28,52h30v54h28v52zm27,51v49h25v51h27zm25,52h27v54h25v52zm24,51v49h22v51h24zm22,52h24v54h22v52zm21,51v49h19v51h21zm19,52h21v54h19v52zm18,51v49h16v51h18zm16,52h18v54h16v52zm15,51v49h13v51h15zm13,52h15v54h13v52zm12,51v49h10v51h12zm10,52h12v54h10v52zm9,51v49h7v51h9zm7,52h9v54h7v52zm6,51v49h4v51h6zm4,52h6v54h4v52zm3,51v49h1v51h3zm1,52h3v54h1v52zm1,48h3v46h1v48zm1,45h3v43h1v45zm1,42h3v40h1v42zm1,39h3v37h1v39zm1,36h3v34h1v36zm1,33h3v31h1v33zm1,30h3v28h1v30zm1,27h3v25h1v27zm1,24h3v22h1v24zm1,21h3v19h1v21zm1,18h3v16h1v18zm1,15h3v13h1v15zm1,12h3v10h1v12zm1,9h3v7l1,7v9zm1,6l3,6v4l1,4v6zm4,4v6h6v4h4zm7,4v6l9,6v4l7,4zm10,4v6h12v4h10zm13,4v6l15,6v4l13,4zm16,4v6h18v4h16zm19,4v6l21,6v4l19,4zm22,4v6h24v4h22zm25,4v6l27,6v4l25,4zm28,4v6h30v4h28zm31,4v6l33,6v4l31,4zm34,4v6h36v4h34zm37,4v6h39v4h37zm40,4v6h42v4h40zm43,4v6h45v4h43zm46,4v6h48v4h46zm49,4v6h51v4h49zm52,4v6l54,6v4h52zm55,4v6h57v4h55zm58,4v6l60,6v4l58,4zm61,4v6h63v4h61zm64,4v6l66,6v4l64,4zm67,4v6h69v4h67zm70,4v6l72,6v4l70,4zm73,4v6h75v4h73zm76,4v6l78,6v4l76,4zm79,4v6h81v4h79zm82,4v6l84,6v4l82,4zm85,4v6h87v4h85zm88,4v6l90,6v4l88,4zm91,4v6h93v4h91zm94,4v6h96v4h94zm97,4v6h99v4h97zm100,4v6h102v4h100zm102,7h100v9h102v7zm102,10h100v12h102v10zm102,13h100v15h102v13zm102,16h100v18h102v16zm102,19h100v21h102v19zm102,22h100v24h102v22zm102,25h100v27h102v25zm102,28h100v30h102v28zm102,31h100v33h102v31zm102,34h100v36h102v34zm102,37h100v39h102v37zm102,40h100v42h102v40zm102,43h100v45h102v43zm102,46h100v48h102v46zm99,48v46h97v48h99zm96,48v46h94v48h96zm93,48v46h91v48h93zm90,48v46h88v48h90zm87,48v46h85v48h87zm84,48v46h82v48h84zm81,48v46l79,46v48l81,48zm78,48v46h76v48h78zm75,48v46h73v48h75zm72,48v46h70v48h72zm69,48v46h67v48h69zm66,48v46h64v48h66zm63,48v46h61v48h63zm60,48v46h58v48h60zm57,48v46h55v48h57zm54,48v46h52v48h54zm51,48v46h49v48h51zm48,48v46h46v48h48zm45,48v46h43v48h45zm42,48v46h40v48h42zm39,48v46h37v48h39zm36,48v46h34v48h36zm33,48v46h31v48h33zm30,48v46h28v48h30zm27,48v46h25v48h27zm24,48v46h22v48h24zm21,48v46h19v48h21zm18,48v46h16v48h18zm15,48v46h13v48h15zm12,48v46h10v48h12zm9,48v46h7v48h9zm6,48v46h4v48h6zm4,45h6v43h4v45zm4,42h6v40h4v42zm4,39h6v37h4v39zm4,36h6v34h4v36zm4,33h6v31h4v33zm4,30h6v28h4v30zm4,27h6v25h4v27zm4,24h6v22h4v24zm4,21h6v19h4v21zm4,18h6v16h4v18zm4,15l6,15v13l4,13v15zm4,12l6,12v10l4,10v12zm4,9l6,9v7h4v9zm7,7v9h9v7l7,7zm10,7v9h12v7h10zm13,7v9h15v7l13,7zm16,7v9l18,9v7h16zm19,7v9h21v7l19,7zm22,7v9h24v7h22zm25,7v9h27v7l25,7zm28,7v9h30v7h28zm31,7v9h33v7l31,7zm34,7v9h36v7h34zm37,7v9l39,9v7h37zm40,7v9h42v7h40zm43,7v9h45v7h43zm46,7v9h48v7h46zm49,7v9h51v7h49zm52,7v9h54v7h52zm55,7v9h57v7h55zm58,7v9l60,9v7l58,7zm61,7v9h63v7h61zm64,7v9h66v7l64,7zm67,7v9h69v7h67zm70,7v9l72,9v7l70,7zm73,7v9h75v7h73zm76,7v9h78v7l76,7zm79,7v9l81,9v7h79zm82,7v9h84v7l82,7zm85,7v9h87v7h85zm88,7v9h90v7l88,7zm91,7v9l93,9v7h91zm94,7v9h96v7h94zm97,7v9h99v7h97zm99,10h97v12h99v10zm99,13h97v15h99v13zm99,16l97,16v18l99,18v16zm99,19l97,19v21l99,21v19zm99,22l97,22v24l99,24v22zm99,25l97,25v27l99,27v25zm99,28l97,28v30l99,30v28zm99,31l97,31v33h99v31zm99,34h97v36h99v34zm99,37h97v39h99v37zm99,40h97v42h99v40zm99,43h97v45h99v43zm96,45v43h94v45h96zm93,45v43h91v45h93zm90,45v43h88v45h90zm87,45v43h85v45h87zm84,45v43h82v45h84zm81,45v43l79,43v45l81,45zm78,45v43h76v45h78zm75,45v43h73v45h75zm72,45v43h70v45h72zm69,45v43h67v45h69zm66,45v43h64v45h66zm63,45v43h61v45h63zm60,45v43h58v45h60zm57,45v43h55v45h57zm54,45v43h52v45h54zm51,45v43h49v45h51zm48,45v43h46v45h48zm45,45v43h43v45h45zm42,45v43h40v45h42zm39,45v43h37v45h39zm36,45v43h34v45h36zm33,45v43h31v45h33zm30,45v43h28v45h30zm27,45v43h25v45h27zm24,45v43h22v45h24zm21,45v43h19v45h21zm18,45v43h16v45h18zm15,45v43h13v45h15zm12,45v43h10v45h12zm9,45v43h7v45h9zm7,42h9v40h7v42zm7,39h9v37h7v39zm7,36h9v34h7v36zm7,33h9v31h7v33zm7,30h9v28h7v30zm7,27h9v25h7v27zm7,24h9v22h7v24zm7,21h9v19h7v21zm7,18h9v16h7v18zm7,15h9v13h7v15zm7,12h9v10h7v12zm10,10v12h12v10h10zm13,10v12h15v10h13zm16,10v12l18,12v10l16,10zm19,10v12h21v10h19zm22,10v12h24v10h22zm25,10v12h27v10h25zm28,10v12h30v10h28zm31,10v12h33v10h31zm34,10v12h36v10h34zm37,10v12l39,12v10l37,10zm40,10v12h42v10h40zm43,10v12h45v10h43zm46,10v12h48v10h46zm49,10v12h51v10h49zm52,10v12h54v10h52zm55,10v12h57v10h55zm58,10v12l60,12v10l58,10zm61,10v12h63v10h61zm64,10v12h66v10h64zm67,10v12h69v10h67zm70,10v12l72,12v10l70,10zm73,10v12h75v10h73zm76,10v12h78v10h76zm79,10v12l81,12v10l79,10zm82,10v12h84v10h82zm85,10v12h87v10h85zm88,10v12h90v10h88zm91,10v12l93,12v10l91,10zm94,10v12h96v10h94zm96,13h94v15h96v13zm96,16h94v18h96v16zm96,19h94v21h96v19zm96,22h94v24h96v22zm96,25h94v27h96v25zm96,28h94v30h96v28zm96,31h94v33h96v31zm96,34h94v36h96v34zm96,37h94v39h96v37zm96,40h94v42h96v40zm93,42v40h91v42h93zm90,42v40h88v42h90zm87,42v40h85v42h87zm84,42v40h82v42h84zm81,42v40l79,40v42l81,42zm78,42v40h76v42h78zm75,42v40h73v42h75zm72,42v40h70v42h72zm69,42v40h67v42h69zm66,42v40h64v42h66zm63,42v40h61v42h63zm60,42v40h58v42h60zm57,42v40h55v42h57zm54,42v40h52v42h54zm51,42v40h49v42h51zm48,42v40h46v42h48zm45,42v40h43v42h45zm42,42v40h40v42h42zm39,42v40h37v42h39zm36,42v40h34v42h36zm33,42v40h31v42h33zm30,42v40h28v42h30zm27,42v40h25v42h27zm24,42v40h22v42h24zm21,42v40h19v42h21zm18,42v40h16v42h18zm15,42v40h13v42h15zm12,42v40h10v42h12zm10,39h12v37h10v39zm10,36h12v34h10v36zm10,33h12v31l10,31v33zm10,30l12,30v28l10,28v30zm10,27l12,27v25l10,25v27zm10,24l12,24v22l10,22v24zm10,21l12,21v19l10,19v21zm10,18l12,18v16l10,16v18zm10,15h12v13h10v15zm13,13v15h15v13h13zm16,13v15l18,15v13l16,13zm19,13v15h21v13h19zm22,13v15h24v13h22zm25,13v15h27v13h25zm28,13v15h30v13h28zm31,13v15h33v13h31zm34,13v15h36v13h34zm37,13v15l39,15v13l37,13zm40,13v15h42v13h40zm43,13v15h45v13h43zm46,13v15h48v13h46zm49,13v15h51v13h49zm52,13v15h54v13h52zm55,13v15h57v13h55zm58,13v15l60,15v13l58,13zm61,13v15h63v13h61zm64,13v15h66v13h64zm67,13v15h69v13h67zm70,13v15l72,15v13l70,13zm73,13v15h75v13h73zm76,13v15h78v13h76zm79,13v15l81,15v13l79,13zm82,13v15h84v13h82zm85,13v15h87v13h85zm88,13v15h90v13h88zm91,13v15l93,15v13l91,13zm93,16h91v18h93v16zm93,19h91v21h93v19zm93,22h91v24h93v22zm93,25h91v27h93v25zm93,28h91v30h93v28zm93,31h91v33h93v31zm93,34h91v36h93v34zm93,37h91v39h93v37zm90,39v37h88v39h90zm87,39v37h85v39h87zm84,39v37h82v39h84zm81,39v37l79,37v39l81,39zm78,39v37h76v39h78zm75,39v37h73v39h75zm72,39v37h70v39h72zm69,39v37h67v39h69zm66,39v37h64v39h66zm63,39v37h61v39h63zm60,39v37h58v39h60zm57,39v37h55v39h57zm54,39v37h52v39h54zm51,39v37h49v39h51zm48,39v37h46v39h48zm45,39v37h43v39h45zm42,39v37h40v39h42zm39,39v37h37v39h39zm36,39v37h34v39h36zm33,39v37h31v39h33zm30,39v37h28v39h30zm27,39v37h25v39h27zm24,39v37h22v39h24zm21,39v37h19v39h21zm18,39v37h16v39h18zm15,39v37h13v39h15zm13,36h15v34h13v36zm13,33h15v31h13v33zm13,30h15v28h13v30zm13,27h15v25h13v27zm13,24h15v22h13v24zm13,21h15v19h13v21zm13,18h15v16h13v18zm16,16v18h18v16h16zm19,16v18h21v16h19zm22,16v18h24v16h22zm25,16v18h27v16h25zm28,16v18h30v16h28zm31,16v18l33,18v16l31,16zm34,16v18h36v16h34zm37,16v18h39v16h37zm40,16v18h42v16h40zm43,16v18h45v16h43zm46,16v18h48v16h46zm49,16v18h51v16h49zm52,16v18h54v16l52,16zm55,16v18h57v16h55zm58,16v18h60v16h58zm61,16v18h63v16h61zm64,16v18h66v16h64zm67,16v18h69v16h67zm70,16v18h72v16h70zm73,16v18h75v16h73zm76,16v18h78v16h76zm79,16v18h81v16h79zm82,16v18h84v16h82zm85,16v18h87v16h85zm88,16v18h90v16h88zm90,19h88v21h90v19zm90,22h88v24h90v22zm90,25h88v27h90v25zm90,28h88v30h90v28zm90,31h88v33h90v31zm90,34h88v36h90v34zm87,36v34h85v36h87zm84,36v34h82v36h84zm81,36v34l79,34v36l81,36zm78,36v34h76v36h78zm75,36v34h73v36h75zm72,36v34h70v36h72zm69,36v34h67v36h69zm66,36v34h64v36h66zm63,36v34h61v36h63zm60,36v34h58v36h60zm57,36v34h55v36h57zm54,36v34h52v36h54zm51,36v34h49v36h51zm48,36v34h46v36h48zm45,36v34h43v36h45zm42,36v34h40v36h42zm39,36v34h37v36h39zm36,36v34h34v36h36zm33,36v34h31v36h33zm30,36v34h28v36h30zm27,36v34h25v36h27zm24,36v34h22v36h24zm21,36v34h19v36h21zm18,36v34h16v36h18zm16,33h18v31h16v33zm16,30h18v28h16v30zm16,27h18v25h16v27zm16,24h18v22h16v24zm16,21h18v19h16v21zm19,19v21h21v19h19zm22,19v21h24v19h22zm25,19v21h27v19h25zm28,19v21h30v19h28zm31,19v21l33,21v19l31,19zm34,19v21h36v19h34zm37,19v21h39v19h37zm40,19v21h42v19h40zm43,19v21h45v19h43zm46,19v21h48v19h46zm49,19v21h51v19h49zm52,19v21h54v19l52,19zm55,19v21h57v19h55zm58,19v21h60v19h58zm61,19v21h63v19h61zm64,19v21h66v19h64zm67,19v21h69v19h67zm70,19v21h72v19h70zm73,19v21h75v19h73zm76,19v21h78v19h76zm79,19v21h81v19h79zm82,19v21h84v19h82zm85,19v21h87v19h85zm87,22h85v24h87v22zm87,25h85v27h87v25zm87,28h85v30h87v28zm87,31h85v33h87v31zm84,33v31h82v33h84zm81,33v31h79v33l81,33zm78,33v31h76v33h78zm75,33v31h73v33h75zm72,33v31h70v33h72zm69,33v31h67v33h69zm66,33v31h64v33h66zm63,33v31h61v33h63zm60,33v31h58v33h60zm57,33v31h55v33h57zm54,33v31h52v33h54zm51,33v31h49v33h51zm48,33v31h46v33h48zm45,33v31h43v33h45zm42,33v31h40v33h42zm39,33v31h37v33h39zm36,33v31h34v33h36zm33,33v31l31,31v33h33zm30,33v31h28v33h30zm27,33v31h25v33h27zm24,33v31h22v33h24zm21,33v31h19v33h21zm19,30h21v28h19v30zm19,27h21v25h19v27zm19,24h21v22h19v24zm22,22v24h24v22h22zm25,22v24h27v22h25zm28,22v24h30v22h28zm31,22v24l33,24v22l31,22zm34,22v24h36v22h34zm37,22v24h39v22h37zm40,22v24h42v22h40zm43,22v24h45v22h43zm46,22v24h48v22h46zm49,22v24h51v22h49zm52,22v24h54v22l52,22zm55,22v24h57v22h55zm58,22v24h60v22h58zm61,22v24h63v22h61zm64,22v24h66v22h64zm67,22v24h69v22h67zm70,22v24h72v22h70zm73,22v24h75v22h73zm76,22v24h78v22h76zm79,22v24h81v22h79zm82,22v24h84v22h82zm84,25h82v27h84v25zm84,28h82v30h84v28zm81,30v28h79v30h81zm78,30v28h76v30h78zm75,30v28h73v30h75zm72,30v28h70v30h72zm69,30v28h67v30h69zm66,30v28h64v30h66zm63,30v28h61v30h63zm60,30v28h58v30h60zm57,30v28h55v30h57zm54,30v28h52v30l54,30zm51,30v28h49v30h51zm48,30v28h46v30h48zm45,30v28h43v30h45zm42,30v28h40v30h42zm39,30v28h37v30h39zm36,30v28h34v30h36zm33,30v28l31,28v30l33,30zm30,30v28h28v30h30zm27,30v28h25v30h27zm24,30v28h22v30h24zm22,27h24v25h22v27zm25,25v27h27v25h25zm28,25v27h30v25h28zm31,25v27l33,27v25l31,25zm34,25v27h36v25h34zm37,25v27h39v25h37zm40,25v27h42v25h40zm43,25v27h45v25h43zm46,25v27h48v25h46zm49,25v27h51v25h49zm52,25v27l54,27v25l52,25zm55,25v27h57v25h55zm58,25v27h60v25h58zm61,25v27h63v25h61zm64,25v27h66v25h64zm67,25v27h69v25h67zm70,25v27h72v25h70zm73,25v27h75v25h73zm76,25v27h78v25h76zm79,25v27h81v25h79zm1,57v55h3v57h1zm4,57v55h6v57h4zm7,57v55h9v57h7zm10,57v55h12v57h10zm13,57v55h15v57h13zm16,57v55h18v57h16zm19,57v55h21v57h19zm22,57v55h24v57h22zm25,57v55h27v57h25zm28,57v55h30v57h28zm31,57v55h33v57h31zm34,57v55h36v57h34zm37,57v55h39v57h37zm40,57v55h42v57h40zm43,57v55h45v57h43zm46,57v55h48v57h46zm49,57v55h51v57h49zm52,57v55h54v57h52zm55,57v55h57v57h55zm58,57v55h60v57h58zm61,57v55h63v57h61zm64,57v55h66v57h64zm67,57v55h69v57h67zm70,57v55h72v57h70zm73,57v55h75v57h73zm76,57v55h78v57h76zm79,57v55l81,55v57l79,57zm82,57v55h84v57h82zm85,57v55h87v57h85zm88,57v55h90v57h88zm91,57v55h93v57h91zm94,57v55h96v57h94zm97,57v55h99v57h97zm100,57v55h102v57h100zm103,57v55h105v57h103zm1,58v60h3v58h1zm4,58v60h6v58h4zm7,58v60h9v58h7zm10,58v60h12v58h10zm13,58v60h15v58h13zm16,58v60h18v58h16zm19,58v60h21v58h19zm22,58v60h24v58h22zm25,58v60h27v58h25zm28,58v60h30v58h28zm31,58v60h33v58h31zm34,58v60h36v58h34zm37,58v60h39v58h37zm40,58v60h42v58h40zm43,58v60h45v58h43zm46,58v60h48v58h46zm49,58v60h51v58h49zm52,58v60h54v58h52zm55,58v60h57v58h55zm58,58v60h60v58h58zm61,58v60h63v58h61zm64,58v60h66v58h64zm67,58v60h69v58h67zm70,58v60h72v58h70zm73,58v60h75v58h73zm76,58v60h78v58h76zm79,58v60l81,60v58l79,58zm82,58v60h84v58h82zm85,58v60h87v58h85zm88,58v60h90v58h88zm91,58v60h93v58h91zm94,58v60h96v58h94zm97,58v60h99v58h97zm100,58v60h102v58h100zm103,58v60h105v58h103z" android:filltype="evenodd"> <aapt:attr name="android:fillcolor"> <gradient android:starty="61" android:startx="55" android:endy="-1.6146e-7" android:endx="55" android:type="linear"> <item android:offset="0" android:color="#721984ff"/> <item android:offset="0.476488" android:color="#191984ff"/> <item android:offset="1" android:color="#051984ff"/> </gradient> </aapt:attr> </path> </vector>
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。