安利一波androidView视觉开源控件 每个都值得学习哦
<p>啊哈!情人节又到了.简直是虐狗节好不好?</p> <p style="text-align: center;"><img src="https://simg.open-open.com/show/1d9a44377a4b7013344f53d4124cb139.jpg"></p> <p>要想生活过得去,还得多学新东西.老铁没毛病! 下面我们就发车吧!!!</p> <p style="text-align: center;"><img src="https://simg.open-open.com/show/13b8bfc86720ba037539b2ce31635a96.jpg"></p> <h2>本篇包含了那些?</h2> <ul> <li><a href="/misc/goto?guid=4959737186339541058" rel="nofollow,noindex">ZuiMeiTAG</a></li> <li><a href="/misc/goto?guid=4959737186456452607" rel="nofollow,noindex">XyzInfo</a></li> <li><a href="/misc/goto?guid=4959737186574169155" rel="nofollow,noindex">ToDoList</a></li> <li><a href="/misc/goto?guid=4959723988431936815" rel="nofollow,noindex">FloatingView</a></li> <li><a href="/misc/goto?guid=4959717561334456589" rel="nofollow,noindex">CouponView</a></li> <li><a href="/misc/goto?guid=4959721129509232233" rel="nofollow,noindex">FiftyShadesOf</a></li> <li><a href="/misc/goto?guid=4959737186798500748" rel="nofollow,noindex">CircularAnim</a></li> </ul> <h2><a href="/misc/goto?guid=4959737186339541058" rel="nofollow,noindex">ZuiMeiTAG</a></h2> <p>用recyclerView实现最美应用底栏 效果如下图.</p> <p>作者的简书说明地址是: <a href="/misc/goto?guid=4959737186919697559" rel="nofollow,noindex">http://www.jianshu.com/p/7202416974f6</a></p> <p style="text-align: center;"><img src="https://simg.open-open.com/show/a48746e650d84c7c78a99dccd1f820f2.gif"></p> <h2><a href="/misc/goto?guid=4959737186574169155" rel="nofollow,noindex">ToDoList</a></h2> <p>平滑的To-Do List添加,删除和排序动画效果。</p> <p style="text-align: center;"><img src="https://simg.open-open.com/show/b758d36040034cdd9541fb49a8762458.gif"></p> <h2><a href="/misc/goto?guid=4959723988431936815" rel="nofollow,noindex">FloatingView</a></h2> <p>能够让View执行漂亮的漂浮动画的库。</p> <p style="text-align: center;"><img src="https://simg.open-open.com/show/0298896ec7643beb644c56778fdba539.gif"></p> <h2><a href="/misc/goto?guid=4959717561334456589" rel="nofollow,noindex">CouponView</a></h2> <p>半圆锯齿背景虚线边框组合实现简单优惠券效果</p> <p>简书地址: <a href="/misc/goto?guid=4959737187062172607" rel="nofollow,noindex">http://www.jianshu.com/p/b27d0f9b3856</a></p> <p style="text-align: center;"><img src="https://simg.open-open.com/show/39dce75a1b59fa1a957fd84f09f83a01.gif"></p> <h2>支持属性</h2> <table> <thead> <tr> <th>自定义属性</th> <th>格式</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td>cv_dash_line_color</td> <td>color</td> <td>虚线的颜色</td> </tr> <tr> <td>cv_dash_line_gap</td> <td>dimension</td> <td>虚线的间隔</td> </tr> <tr> <td>cv_dash_line_height</td> <td>dimension</td> <td>虚线的高度</td> </tr> <tr> <td>cv_dash_line_length</td> <td>dimension</td> <td>虚线的长度</td> </tr> <tr> <td>cv_semicircle_color</td> <td>color</td> <td>半圆的颜色,一般需要和背景色一致</td> </tr> <tr> <td>cv_semicircle_gap</td> <td>dimension</td> <td>半圆之前的间隔</td> </tr> <tr> <td>cv_semicircle_radius</td> <td>dimension</td> <td>半圆的半径</td> </tr> <tr> <td>cv_is_semicircle_top</td> <td>boolean</td> <td>是否绘制顶部半圆锯齿</td> </tr> <tr> <td>cv_is_semicircle_bottom</td> <td>boolean</td> <td>是否绘制底部半圆锯齿</td> </tr> <tr> <td>cv_is_semicircle_left</td> <td>boolean</td> <td>是否绘制左侧半圆锯齿</td> </tr> <tr> <td>cv_is_semicircle_right</td> <td>boolean</td> <td>是否绘制右侧半圆锯齿</td> </tr> <tr> <td>cv_is_dash_line_top</td> <td>boolean</td> <td>是否绘制顶部虚线</td> </tr> <tr> <td>cv_is_dash_line_bottom</td> <td>boolean</td> <td>是否绘制底部虚线</td> </tr> <tr> <td>cv_is_dash_line_left</td> <td>boolean</td> <td>是否绘制左侧虚线</td> </tr> <tr> <td>cv_is_dash_line_right</td> <td>boolean</td> <td>是否绘制右侧虚线</td> </tr> <tr> <td>cv_dash_line_margin_top</td> <td>dimension</td> <td>顶部虚线距离View顶部的距离</td> </tr> <tr> <td>cv_dash_line_margin_bottom</td> <td>dimension</td> <td>底部虚线距离View底部的距离</td> </tr> <tr> <td>cv_dash_line_margin_left</td> <td>dimension</td> <td>左侧虚线距离View左侧的距离</td> </tr> <tr> <td>cv_dash_line_margin_right</td> <td>dimension</td> <td>右侧虚线距离View右侧的距离</td> </tr> </tbody> </table> <h2><a href="/misc/goto?guid=4959721129509232233" rel="nofollow,noindex">FiftyShadesOf</a></h2> <p>一个android加载View模糊loding效果,优点类似非死book的加载</p> <p style="text-align: center;"><img src="https://simg.open-open.com/show/5ec2c7102bc87ccf6b6042019032dd1b.gif"></p> <h2><a href="/misc/goto?guid=4959737186798500748" rel="nofollow,noindex">CircularAnim</a></h2> <p>Android水波动画帮助类,一行代码实现View显示/隐藏/startActivity特效。(对 ViewAnimationUtils.createCircularReveal() 方法的封装)</p> <p style="text-align: center;"><img src="https://simg.open-open.com/show/efea020dbba14e1aed7d81c3ad108cdc.gif"></p> <p style="text-align: center;"><img src="https://simg.open-open.com/show/85066b503f97214e3faac43098e6af67.gif"></p> <h2>使用说明</h2> <p>为了使用起来简单,我将动画封装成CircularAnimUtil.</p> <ul> <li>现在,让按钮收缩只需一行代码,如下: <pre> CircularAnimUtil.hide(mChangeBtn);</pre> </li> <li>同理,让按钮伸展开: <pre> CircularAnimUtil.show(mChangeBtn);</pre> </li> <li>水波般铺满指定颜色并启动一个Activity: <pre> CircularAnimUtil.startActivity(MainActivity.this, EmptyActivity.class, view, R.color.colorPrimary);</pre> </li> <li>这里,你还可以放图片: <pre> CircularAnimUtil.startActivity(MainActivity.this, EmptyActivity.class, view, R.mipmap.img_huoer_black);</pre> </li> <li>也许在显示或隐藏视图时,你想要设置半径和时长,你可以调用这个方法: <pre> 显示:show(View myView, float startRadius, long durationMills) 隐藏:hide(final View myView, float endRadius, long durationMills)</pre> </li> <li>以及,你可以在startActivity时带上Intent: <pre> startActivity(Activity thisActivity, Intent intent, View triggerView, int colorOrImageRes)</pre> </li> <li>还可以startActivityForResult: <pre> startActivityForResult(Activity thisActivity, Intent intent, Integer requestCode, View triggerView, int colorOrImageRes)</pre> 同理,startActivity同样可以设置时长。<br> 用起来非常的方便,一切逻辑性的东西都由帮助类搞定。</li> </ul> <h2><a href="/misc/goto?guid=4959737186456452607" rel="nofollow,noindex">XyzInfo</a></h2> <p>自定义Switch 和 Ruler控件</p> <p style="text-align: center;"><img src="https://simg.open-open.com/show/3b56b2ca173ee7678a03667c68beac79.gif"></p> <h2>介绍</h2> <table> <thead> <tr> <th>xSwitch</th> <th>xRuler</th> </tr> </thead> <tbody> <tr> <td>支持背与滑块颜色自定义</td> <td>支持两种显示模式</td> </tr> <tr> <td>支持颜色过渡动画</td> <td>支持上下两种刻度</td> </tr> <tr> <td>支持自定义圆角弧度</td> <td>支持自定义指示器颜色大小</td> </tr> <tr> <td>支持自定义宽高比</td> <td>支持自定义刻度之间像素数目(间距)</td> </tr> <tr> <td>支持自定义滑块与背景大小比例</td> <td>支持自定义刻度线宽度</td> </tr> <tr> <td>支持自定义图片(建议灰色)以及大小</td> <td>支持自定义刻度基本单位(最小刻度单位)</td> </tr> <tr> <td>支持自定义滑动时间</td> <td>支持自定义起止范围</td> </tr> <tr> <td> </td> <td>支持自定义字体颜色大小</td> </tr> <tr> <td> </td> <td>支持自定义最小滑动速率</td> </tr> <tr> <td> </td> <td>支持自定义刻度与文字之间距离</td> </tr> <tr> <td> </td> <td>支持边界回弹动画</td> </tr> <tr> <td> </td> <td>支持Fling滑动</td> </tr> <tr> <td> </td> <td>支持设置默认值</td> </tr> <tr> <td> </td> <td>支持自定义设置回弹动画基本时间</td> </tr> </tbody> </table> <h2>属性介绍</h2> <table> <thead> <tr> <th>属性</th> <th>介绍</th> <th>类型</th> <th>默认</th> <th>是否必须</th> </tr> </thead> <tbody> <tr> <td>xRadian</td> <td>圆角弧度</td> <td>dimension</td> <td>45</td> <td>否</td> </tr> <tr> <td>xASPECTRATIO</td> <td>宽高比</td> <td>float</td> <td>0.37f</td> <td>否</td> </tr> <tr> <td>xASPEERRATIO</td> <td>滑块与背景宽度比</td> <td>float</td> <td>0.56f</td> <td>否</td> </tr> <tr> <td>xIconWidth</td> <td>图片宽度</td> <td>dimension</td> <td>80</td> <td>否</td> </tr> <tr> <td>xIconHeight</td> <td>图片高度</td> <td>dimension</td> <td>80</td> <td>否</td> </tr> <tr> <td>xBackgroundFromColor</td> <td>背景起始颜色</td> <td>color</td> <td>0xff443c6f</td> <td>否</td> </tr> <tr> <td>xBackgroundToColor</td> <td>背景终止颜色</td> <td>color</td> <td>0xffff5a73</td> <td>否</td> </tr> <tr> <td>xSliderFromColor</td> <td>滑块起始颜色</td> <td>color</td> <td>0xffff5a73</td> <td>否</td> </tr> <tr> <td>xSliderToColor</td> <td>滑块终止颜色</td> <td>color</td> <td>0xff443c6f</td> <td>否</td> </tr> <tr> <td>xChangedTime</td> <td>滑块滑动时间</td> <td>int</td> <td>300</td> <td>否</td> </tr> <tr> <td>xLeftIcon</td> <td>左侧图片</td> <td>reference</td> <td>null</td> <td>是</td> </tr> <tr> <td>xRightIcon</td> <td>右侧图片</td> <td>reference</td> <td>null</td> <td>是</td> </tr> </tbody> </table> <pre> compile 'com.xyz.xruler:xruler:1.0.3'</pre> <h2> </h2> <p>来自:http://www.jianshu.com/p/30909296ac01</p> <p> </p>
本文由用户 ChrScarbrou 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
转载本站原创文章,请注明出处,并保留原始链接、图片水印。
本站是一个以用户分享为主的开源技术平台,欢迎各类分享!