翻翻git之---"有趣效果"的自定义View EasyArcLoading
来源:互联网 发布:vb.net mediaplayer 编辑:程序博客网 时间:2024/05/06 14:12
转载请注明出处:王亟亟的大牛之路
早上写了一个关于MD的文章,下午给编译器调了个色,感觉要上天了,所以为了试颜色就出了这篇文章,让大家一起瞎一下
好了废话不说,这一片给大家介绍一个当做Dialog作用的自定义View
效果图:
How to use?
Gradle
dependencies { com.camnter.easyarcloading:easyarcloading:1.0}
Eclipse:
把实现类和资源文件copy进去就好了
使用的话就直接XML加载,像这样
<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="sample.wjj.easyarcloadingdemo.MainActivity"> <com.camnter.easyarcloading.EasyArcLoading android:id="@+id/DialogDemo1" app:eastArcExternalColor="#ACA" app:eastArcInternalColor="#AC111A" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <com.camnter.easyarcloading.EasyArcLoading android:id="@+id/DialogDemo2" android:layout_below="@id/DialogDemo1" app:eastArcExternalColor="#BBA" app:eastArcInternalColor="#FFBB1A" app:eastArcInternalWidth="2dp" android:layout_width="80dp" android:layout_height="80dp" /></RelativeLayout>
初始化的操作可以放在XML里也可以直接Java代码里一连串set 比较简单就不分开介绍了
这边再贴下自定义标签
<declare-styleable name="EasyArcLoading"> <attr name="easyArcPadding" format="dimension" /> //Padding值 <attr name="eastArcExternalColor" format="color" />//外圈颜色 <attr name="eastArcInternalColor" format="color" />//内圈颜色 <attr name="eastArcExternalWidth" format="dimension" />//外圈笔触大小 <attr name="eastArcInternalWidth" format="dimension" />//内圈笔触大小</declare-styleable>
实现这篇就不教讲了,之前有太多的自定义Dialog的内容,下次可以考虑把类似的都做到一个Git项目里。
项目git:https://github.com/ddwhan0123/EasyArcLoading
例子源码地址:https://github.com/ddwhan0123/EasyArcLoading
3 0
- 翻翻git之---"有趣效果"的自定义View EasyArcLoading
- 翻翻git之---自定义View实现水位上涨效果 WaveProgressView
- 翻翻git之---炫酷的自定义翻滚View TagCloudView
- 翻翻git之---溜的飞起的加载效果AVLoadingIndicatorView
- 翻翻git之---实用的进度类自定义控件LoadingDrawable
- 翻翻git之---可以收缩伸展的自定义LinearLayout ExpandableLinearLayout
- 翻翻git之---利用RecyclerView实现折叠效果 SectionedExpandableGridRecyclerView
- 翻翻git之---实现Material Bottom Navigation的自定义控件 LuseenBottomNavigation
- 翻翻git之---实现QQ空间点赞部分实现的自定义控件 EasyLikeArea
- 翻翻git之---不靠画全靠“演”,好看的自定义TextView translucent-android
- 翻翻git之---可用作课程表/排班表的自定义table库ScrollTableView
- 翻翻git之---可用作课程表/排班表的自定义table库ScrollTableView
- 翻翻git之---效果鲜明的类ViewPager库 ConvenientBanner(对图片加载部分进行修改)
- 翻翻git之---好看的卡片切换库 Swipecards
- 翻翻git之---一个丰富的通知工具类 NotifyUtil
- 翻翻git之---闪烁动画的TextView RevealTextView
- 翻翻git之---实用的欢迎页开源库 AppIntro
- 翻翻git之---偏向iOS风格的Switch ToggleSwitch
- ACE_Message_Block类 使用小结
- 秒杀系统架构分析与实战
- 【iOS】星星评分控件HGDQStars
- 《Java 2 实用教程》读书笔记(四)
- 重装python idle打不开解决方案
- 翻翻git之---"有趣效果"的自定义View EasyArcLoading
- 嵌入式开发板iTOP-4412开发板移植CAN模块
- new balance 996 bhmd lmcr qdpr
- LD说明文档--2.LD命令行命令翻译
- iOS进阶之研究开源项目
- 控制小数点后的位数
- iOS判断是否有网络
- gradle学习(一)
- 职场心得(2016-02-08)