Step 1. Add the JitPack repository to your build file
Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Step 2. Add the dependency
dependencies {
compile 'com.github.kongqw:AndroidRadarScanView:1.0.1'
}
效果图
XML
<com.kongqw.radarscanviewlibrary.RadarScanView
android:id="@+id/radarScanView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
初始化
radarScanView = (RadarScanView) findViewById(R.id.radarScanView);
设置属性
XML
xmlns:app="http://schemas.android.com/apk/res-auto"
<com.kongqw.radarscanviewlibrary.RadarScanView
android:id="@+id/radarScanView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
app:radarBackgroundColor="@color/colorAccent"
app:radarBackgroundLinesColor="@color/colorPrimaryDark"
app:radarBackgroundLinesNumber="3"
app:radarBackgroundLinesWidth="5.5"
app:radarScanAlpha="0x33"
app:radarScanColor="#FF000000"
app:radarScanTime="5000" />
| 属性 | 类型 | 描述 |
| — | — | — |
| radarScanTime | integer | 设置雷达扫描一圈时间 |
| radarBackgroundLinesNumber | integer | 设置雷达背景圆圈数量 |
| radarBackgroundLinesWidth | float | 设置雷达背景圆圈宽度 |
| radarBackgroundLinesColor | color | 设置雷达背景圆圈颜色 |
| radarBackgroundColor | color | 设置雷达背景颜色 |
| radarScanColor | color | 设置雷达扫描颜色 |
| radarScanAlpha | integer | 设置雷达扫描透明度 |
Java
最后
这里我希望可以帮助到大家提升进阶。
内容包含:Android学习PDF+架构视频+面试文档+源码笔记,高级架构技术进阶脑图、Android开发面试专题资料,高级进阶架构资料 这几块的内容。非常适合近期有面试和想在技术道路上继续精进的朋友。
喜欢本文的话,不妨给我点个小赞、评论区留言或者转发支持一下呗~
网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!