# RadarScanView **Repository Path**: freetryMyleft/RadarScanView ## Basic Information - **Project Name**: RadarScanView - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-01-14 - **Last Updated**: 2021-01-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # RadarScanView Android RadarScanView , An easy-to-use view, can be used for any scanning operation view. 雷达扫描视图 [![](https://jitpack.io/v/Pillarzx/RadarScanView.svg)](https://jitpack.io/#Pillarzx/RadarScanView) # Preview # How to To get a Git project into your build: **Step 1.** Add the JitPack repository to your build file Add it in your root build.gradle at the end of repositories: ```groovy allprojects { repositories { ... maven { url 'https://jitpack.io' } } } ``` **Step 2.** Add the dependency ```groovy dependencies { implementation 'com.github.Pillarzx:RadarScanView:1.2.0' } ``` # Usage **XML**: ```xml ``` | Name | Value | | :------------: | :------------------------------------: | | circleColor | color for radar circle | | circleWidth | width for radar circle | | tailColor | tail color for scan line | | radarColor | center color for radar | | innerRingAlpha | Alpha for the first ring out of radar | | outerRingAlpha | Alpha for the second ring out of radar | | innerRingWidth | width for the first ring out of radar | | outerRingWidth | width for the second ring out of radar | | commonSpeed | speed for scan line | | ringSpeed | speed for ring | **Java**: ```java RadarScanView radarScanView = findViewById(R.id.radar_scan); radarScanView.setCanClickToStart(true); //Is it possible to start the animation by clicking the view radarScanView.getScanState(); //Get the scan state of the animation radarScanView.startScan(); //Start to scan radarScanView.stopScan(); //Stop to scan radarScanView.setOnScanClickListener(view -> { /*TODO*/ }) radarScanView.setRingSpeed(5); //set ring speed(recommend range 1-30) radarScanView.setCommonSpeed(3); //set scan line speed(recommend range 1-30) radarScanView .setCircleColor("#FFCDDC39") .setCircleWidth(2) .setTailColor("#FFF3DB0F") .setRadarColor("#FFCDDC39") .setInnerRingStrokeWidth(6) .setInnerRingStrokeAlpha(94) .setOuterRingStrokeWidth(5) .setOuterRingStrokeAlpha(94) .build(); ``` # Change log - **V1.0.0** 2020.11.20 Release the first edition - **V1.1.0** 2020.11.24 1. Add some new XML attrbutes. 2. Add new methods for the class. - **V1.2.0** 2020.11.27 1. Add speed attributes 2. Adjust animation logic