├── .gitattributes ├── .gitignore ├── .gradle └── 2.4 │ └── taskArtifacts │ ├── cache.properties │ ├── cache.properties.lock │ ├── fileHashes.bin │ ├── fileSnapshots.bin │ ├── outputFileStates.bin │ └── taskArtifacts.bin ├── .idea ├── .name ├── compiler.xml ├── copyright │ └── profiles_settings.xml ├── dictionaries │ └── zhangzhenzhong1.xml ├── encodings.xml ├── gradle.xml ├── libraries │ ├── appcompat_v7_22_2_1.xml │ ├── nineoldandroids_2_4_0.xml │ ├── support_annotations_22_2_1.xml │ └── support_v4_22_2_1.xml ├── misc.xml ├── modules.xml ├── runConfigurations.xml └── workspace.xml ├── DiscView-master.iml ├── DiscView.iml ├── README.md ├── app ├── .gitignore ├── app.iml ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── xinlan │ │ └── circleviewdemo │ │ ├── MainActivity.java │ │ └── SubFragment.java │ └── res │ ├── drawable-hdpi │ ├── arrow.png │ └── indicator.png │ ├── layout │ ├── activity_main.xml │ ├── fragment_1.xml │ ├── fragment_2.xml │ ├── fragment_3.xml │ └── fragment_4.xml │ ├── menu │ └── menu_main.xml │ ├── mipmap-hdpi │ └── ic_launcher.png │ ├── mipmap-mdpi │ └── ic_launcher.png │ ├── mipmap-xhdpi │ └── ic_launcher.png │ ├── mipmap-xxhdpi │ └── ic_launcher.png │ ├── values-w820dp │ └── dimens.xml │ └── values │ ├── dimens.xml │ ├── strings.xml │ └── styles.xml ├── build.gradle ├── build └── intermediates │ └── dex-cache │ └── cache.xml ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── library ├── .gitignore ├── build.gradle ├── library.iml ├── libs │ └── nineoldandroids-2.4.0.jar ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── xinlan │ │ └── discview │ │ ├── CircleView.java │ │ ├── DiscView.java │ │ └── DiscViewUtils.java │ └── res │ ├── anim │ └── scale_animation.xml │ ├── layout │ └── view_disc_layout.xml │ └── values │ ├── attr.xml │ └── strings.xml ├── local.properties ├── screens ├── 1.png ├── 2.png ├── 3.png ├── 4.png └── show.gif └── settings.gradle /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear in the root of a volume 35 | .DocumentRevisions-V100 36 | .fseventsd 37 | .Spotlight-V100 38 | .TemporaryItems 39 | .Trashes 40 | .VolumeIcon.icns 41 | 42 | # Directories potentially created on remote AFP share 43 | .AppleDB 44 | .AppleDesktop 45 | Network Trash Folder 46 | Temporary Items 47 | .apdisk 48 | -------------------------------------------------------------------------------- /.gradle/2.4/taskArtifacts/cache.properties: -------------------------------------------------------------------------------- 1 | #Wed Apr 13 12:04:11 CST 2016 2 | -------------------------------------------------------------------------------- /.gradle/2.4/taskArtifacts/cache.properties.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiangyunwan/DiscView-master/dfd07341eeaab1e83e72875421d3f007e2b19ed7/.gradle/2.4/taskArtifacts/cache.properties.lock -------------------------------------------------------------------------------- /.gradle/2.4/taskArtifacts/fileHashes.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiangyunwan/DiscView-master/dfd07341eeaab1e83e72875421d3f007e2b19ed7/.gradle/2.4/taskArtifacts/fileHashes.bin -------------------------------------------------------------------------------- /.gradle/2.4/taskArtifacts/fileSnapshots.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiangyunwan/DiscView-master/dfd07341eeaab1e83e72875421d3f007e2b19ed7/.gradle/2.4/taskArtifacts/fileSnapshots.bin -------------------------------------------------------------------------------- /.gradle/2.4/taskArtifacts/outputFileStates.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiangyunwan/DiscView-master/dfd07341eeaab1e83e72875421d3f007e2b19ed7/.gradle/2.4/taskArtifacts/outputFileStates.bin -------------------------------------------------------------------------------- /.gradle/2.4/taskArtifacts/taskArtifacts.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiangyunwan/DiscView-master/dfd07341eeaab1e83e72875421d3f007e2b19ed7/.gradle/2.4/taskArtifacts/taskArtifacts.bin -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | DiscView-master -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/dictionaries/zhangzhenzhong1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 26 | 27 | -------------------------------------------------------------------------------- /.idea/libraries/appcompat_v7_22_2_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/nineoldandroids_2_4_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/support_annotations_22_2_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/support_v4_22_2_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | 23 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | Android Lint 43 | 44 | 45 | Compiler issuesJava 46 | 47 | 48 | GPath inspectionsGroovy 49 | 50 | 51 | Groovy 52 | 53 | 54 | Internationalization issuesJava 55 | 56 | 57 | JSON 58 | 59 | 60 | Java 61 | 62 | 63 | Performance issuesJava 64 | 65 | 66 | Properties Files 67 | 68 | 69 | Properties FilesJava 70 | 71 | 72 | 73 | 74 | Android 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 96 | 97 | 98 | 99 | 100 | 101 | 106 | 107 | 108 | 109 | 110 | 111 | 1.7 112 | 113 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 129 | 130 | 131 | 132 | 133 | 134 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /DiscView-master.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /DiscView.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 圆盘显示控件 动画展示数据 2 |
3 | 4 | 5 |
6 | 7 |
8 | 9 |
10 | 11 |
12 | 13 |
14 | 15 | 使用方式: 16 | 17 | xml布局:
18 | 《com.xinlan.discview.DiscView
19 | xmlns:app="http://schemas.android.com/apk/res-auto"
20 | app:dvStrokenWidth="10dp"

21 | app:dvStrokenColor="#000000"

22 | app:dvOuterCircleShow="true"

23 | app:dvOuterCirclePad="5dp"

25 | app:dvInnerCirclePad="4dp"

26 | app:dvBottomCircleIsShow="true"

27 | app:dvIndicatorDraw="@drawable/icon"

28 | app:dvStartRotateAngle="10"

29 | app:dvAngleRotateSpan="320"

30 | app:dvCircleMode="dot"

31 | android:layout_width="fill_parent"
32 | android:layout_height="220dp" />
33 |
34 | code:
35 | mDiscView.setValue(int value);//设置数值 36 | 37 | 38 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/app.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 22 5 | buildToolsVersion "23.0.1" 6 | 7 | defaultConfig { 8 | applicationId "com.xinlan.circleviewdemo" 9 | minSdkVersion 9 10 | targetSdkVersion 22 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(dir: 'libs', include: ['*.jar']) 24 | compile 'com.android.support:appcompat-v7:22.2.1' 25 | compile project(':library') 26 | } 27 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in D:\android\android-sdk-windows/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/xinlan/circleviewdemo/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.xinlan.circleviewdemo; 2 | 3 | import android.os.Bundle; 4 | import android.support.v4.app.Fragment; 5 | import android.support.v4.app.FragmentManager; 6 | import android.support.v4.app.FragmentStatePagerAdapter; 7 | import android.support.v4.view.ViewPager; 8 | import android.support.v7.app.AppCompatActivity; 9 | 10 | public class MainActivity extends AppCompatActivity { 11 | int[] layouts = {R.layout.fragment_1, R.layout.fragment_2, R.layout.fragment_3, R.layout.fragment_4}; 12 | private ViewPager mGallery; 13 | 14 | @Override 15 | protected void onCreate(Bundle savedInstanceState) { 16 | super.onCreate(savedInstanceState); 17 | setContentView(R.layout.activity_main); 18 | mGallery = (ViewPager) findViewById(R.id.gallery); 19 | mGallery.setOffscreenPageLimit(4); 20 | mGallery.setAdapter(new GalleryAdapter(this.getSupportFragmentManager())); 21 | } 22 | 23 | private final class GalleryAdapter extends FragmentStatePagerAdapter { 24 | 25 | public GalleryAdapter(FragmentManager fm) { 26 | super(fm); 27 | } 28 | 29 | @Override 30 | public Fragment getItem(int position) { 31 | return SubFragment.newInstance(layouts[position]); 32 | } 33 | 34 | @Override 35 | public int getCount() { 36 | return layouts.length; 37 | } 38 | }//end inner class 39 | }//end class 40 | -------------------------------------------------------------------------------- /app/src/main/java/com/xinlan/circleviewdemo/SubFragment.java: -------------------------------------------------------------------------------- 1 | package com.xinlan.circleviewdemo; 2 | 3 | import android.os.Bundle; 4 | import android.support.v4.app.Fragment; 5 | import android.view.LayoutInflater; 6 | import android.view.View; 7 | import android.view.ViewGroup; 8 | import android.widget.Button; 9 | 10 | import com.xinlan.discview.DiscView; 11 | 12 | /** 13 | * Created by panyi on 2015/8/6. 14 | */ 15 | public class SubFragment extends Fragment implements View.OnClickListener { 16 | 17 | private int mLayoutId; 18 | private Button testBtn; 19 | private DiscView mDiscView; 20 | 21 | public static SubFragment newInstance(int layoutId) { 22 | SubFragment frg = new SubFragment(); 23 | frg.mLayoutId = layoutId; 24 | return frg; 25 | } 26 | 27 | @Override 28 | public void onCreate(Bundle savedInstanceState) { 29 | super.onCreate(savedInstanceState); 30 | } 31 | 32 | @Override 33 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { 34 | View mainView = inflater.inflate(mLayoutId,null); 35 | testBtn = (Button)mainView.findViewById(R.id.btn); 36 | mDiscView = (DiscView)mainView.findViewById(R.id.disc_view); 37 | testBtn.setOnClickListener(this); 38 | return mainView; 39 | } 40 | 41 | @Override 42 | public void onClick(View v) { 43 | mDiscView.setValue(330); 44 | } 45 | }//end class 46 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiangyunwan/DiscView-master/dfd07341eeaab1e83e72875421d3f007e2b19ed7/app/src/main/res/drawable-hdpi/arrow.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/indicator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiangyunwan/DiscView-master/dfd07341eeaab1e83e72875421d3f007e2b19ed7/app/src/main/res/drawable-hdpi/indicator.png -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_1.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 14 | 15 |