├── .gitignore
├── README.md
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── allenliu
│ │ └── circlemenuview
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── allenliu
│ │ │ └── circlemenuview
│ │ │ ├── CircleMenuView.java
│ │ │ └── MainActivity.java
│ └── res
│ │ ├── layout
│ │ └── activity_main.xml
│ │ ├── mipmap-hdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxxhdpi
│ │ └── ic_launcher.png
│ │ ├── values-w820dp
│ │ └── dimens.xml
│ │ └── values
│ │ ├── attrs.xml
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── allenliu
│ └── circlemenuview
│ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── img
├── Screenshot_2016-09-29-10-26-15-762.png
├── Screenshot_2016-09-29-13-12-57-427_com.allenliu.c.png
├── Screenshot_2016-09-29-13-15-10-260_com.allenliu.c.png
└── Screenshot_2016-09-29-15-36-22-379_com.allenliu.c.png
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | # AndroidStudioGitIgnore
2 | Android Studio .gitignore
3 |
4 | #built application files
5 | *.apk
6 | *.ap_
7 |
8 | # files for the dex VM
9 | *.dex
10 |
11 | # Java class files
12 | *.class
13 |
14 | # generated files
15 | bin/
16 | gen/
17 | out/
18 | build/
19 | /*/build/
20 |
21 | # Local configuration file (sdk path, etc)
22 | local.properties
23 |
24 | # Windows thumbnail db
25 | Thumbs.db
26 |
27 | # OSX files
28 | .DS_Store
29 |
30 | # Eclipse project files
31 | .classpath
32 | .project
33 |
34 | # Android Studio
35 | *.iml
36 | .idea
37 |
38 | # Local IDEA workspace
39 | .idea/workspace.xml
40 |
41 | # Gradle cache
42 | .gradle
43 |
44 | #NDK
45 | obj/
46 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # CircleMenuView
2 | CircleMenuView that have many custom functions
3 |
4 | 之前公司项目需求的一个自定义圆形菜单,现封装并开源出来,供大家学习,一个可以定制的原型菜单,直接上图:
5 |
6 | 
7 | 
8 | 
9 | 
10 | ## 如何使用
11 | ### 导入
12 |
13 | gradle
14 |
15 | compile 'com.allenliu:CircleMenuView:1.0.0'
16 |
17 | ### 使用
18 | #### xml使用
19 | //宽高如果不一致 取小的
37 |
38 | ### 代码直接实例化
39 | new CircleMenuView(this)
40 | .setWidthAndHeight(300, 300)
41 | .setCenterText()
42 | .setCenterIcon()
43 | .setGapColor()
44 | .setGapSize()
45 | .setMenuIcons()
46 | .setMenuTexts()
47 | .setMenuTextColor()
48 | .setMenuTextSize()
49 | .setMenuItemBackground()
50 | .setInsideCircleRadius()
51 | .setStrokeColor()
52 | .setStrokeWidth()
53 | .setOnClickListener();//设置每个盘块点击事件
54 |
55 | ## License
56 | Copyright 2016 AllenLiu.
57 |
58 | Licensed to the Apache Software Foundation (ASF) under one or more contributor
59 | license agreements. See the NOTICE file distributed with this work for
60 | additional information regarding copyright ownership. The ASF licenses this
61 | file to you under the Apache License, Version 2.0 (the "License"); you may not
62 | use this file except in compliance with the License. You may obtain a copy of
63 | the License at
64 |
65 | http://www.apache.org/licenses/LICENSE-2.0
66 |
67 | Unless required by applicable law or agreed to in writing, software
68 | distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
69 | WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
70 | License for the specific language governing permissions and limitations under
71 | the License.
72 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 24
5 | buildToolsVersion "24.0.2"
6 | defaultConfig {
7 | applicationId "com.allenliu.circlemenuview"
8 | minSdkVersion 19
9 | targetSdkVersion 24
10 | versionCode 1
11 | versionName "1.0"
12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
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 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
25 | exclude group: 'com.android.support', module: 'support-annotations'
26 | })
27 | compile 'com.android.support:appcompat-v7:24.2.0'
28 | testCompile 'junit:junit:4.12'
29 | }
30 |
--------------------------------------------------------------------------------
/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:\Eclipse\android-sdk/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/androidTest/java/com/allenliu/circlemenuview/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.allenliu.circlemenuview;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.allenliu.circlemenuview", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/java/com/allenliu/circlemenuview/CircleMenuView.java:
--------------------------------------------------------------------------------
1 |
2 | package com.allenliu.circlemenuview;
3 |
4 | import android.content.Context;
5 | import android.content.res.TypedArray;
6 | import android.graphics.Bitmap;
7 | import android.graphics.BitmapFactory;
8 | import android.graphics.Canvas;
9 | import android.graphics.Color;
10 | import android.graphics.Paint;
11 | import android.graphics.Path;
12 | import android.graphics.PixelFormat;
13 | import android.graphics.PorterDuff;
14 | import android.graphics.PorterDuff.Mode;
15 | import android.graphics.PorterDuffXfermode;
16 | import android.graphics.Rect;
17 | import android.graphics.RectF;
18 | import android.graphics.Region;
19 | import android.graphics.drawable.BitmapDrawable;
20 | import android.graphics.drawable.Drawable;
21 | import android.util.AttributeSet;
22 | import android.util.Log;
23 | import android.view.MotionEvent;
24 | import android.view.SurfaceHolder;
25 | import android.view.View;
26 | import android.view.ViewGroup;
27 |
28 | import static android.R.attr.path;
29 | import static android.os.Build.VERSION_CODES.M;
30 |
31 |
32 | public class CircleMenuView extends View {
33 | private Canvas cancas;
34 | /**
35 | * 绘制图片的paint
36 | */
37 | private Paint textPaint;
38 | /**
39 | * 绘制内圆的画笔
40 | */
41 | private Paint mCirclePaint;
42 | /**
43 | * 绘制外圆的画笔
44 | */
45 | private Paint mWaiCirclePaint;
46 | /**
47 | * 最外层园的半径
48 | */
49 | private int radius;
50 | /**
51 | * 外圆半径
52 | */
53 | private int waiRaidus;
54 | /**
55 | * 内圆半径
56 | */
57 | private int neiRadius;
58 | /**
59 | * 弧形的开始角度
60 | */
61 | private int startangle = 0;
62 |
63 | /**
64 | * 盘块的个数
65 | */
66 | private int mcount = 6;
67 | /**
68 | * 角度增量
69 | */
70 | private int deltaAngle = 60;
71 | /**
72 | * 盘块的范围
73 | */
74 | RectF range;
75 | /**
76 | * 边距
77 | */
78 | private int minpadding;
79 | /**
80 | * 绘制弧形的画笔
81 | */
82 | private Paint mArcPaint;
83 | /**
84 | * 背景图
85 | */
86 | /**
87 | * 绘制分割矩形
88 | */
89 | private float textsize = sp2px(getContext(), 12);
90 | /**
91 | * 分割矩形的画笔
92 | */
93 | private Paint rectPaint;
94 | /**
95 | * 中心点X,Y坐标
96 | */
97 | private int x;
98 | private int y;
99 | private int bitMap[];
100 | private CharSequence text[];
101 | /**
102 | * 分割的偏移量
103 | */
104 | private int deltaPadding = dip2px(getContext(), 10);
105 | /**
106 | * 画布宽度
107 | */
108 | private int width;
109 | /**
110 | * 扫边画笔
111 | *
112 | * @param context
113 | * @param attrs
114 | */
115 | private Paint strokePaint;
116 | /**
117 | * 每个盘块的背景色
118 | */
119 | private int menuItemBackground;
120 | /**
121 | * 扫边颜色
122 | */
123 | private int strokeColor;
124 | /**
125 | * 空隙背景颜色
126 | */
127 | private int gapColor;
128 | /**
129 | * 扫边宽度
130 | */
131 | private float strokeWidth;
132 | private String centerText;
133 | private Drawable centerIcon;
134 | /**
135 | * 菜单字体颜色
136 | */
137 | private int menuTextColor;
138 | private onYuanPanClickListener listener;
139 |
140 | // 回调用两參构造
141 | public CircleMenuView(Context context, AttributeSet attrs) {
142 | super(context, attrs);
143 | // TODO 自动生成的构造函数存根
144 | setFocusable(true);
145 | setFocusableInTouchMode(true);
146 | setKeepScreenOn(true);
147 | initAttrs(context, attrs);
148 | }
149 |
150 | private void initAttrs(Context context, AttributeSet attrs) {
151 | if(attrs!=null) {
152 | TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.CircleMenuView);
153 | menuItemBackground = typedArray.getColor(R.styleable.CircleMenuView_menu_item_background, getResources().getColor(android.R.color.white));
154 | strokeColor = typedArray.getColor(R.styleable.CircleMenuView_stroke_color, getResources().getColor(R.color.default_stroke_color));
155 | gapColor = typedArray.getColor(R.styleable.CircleMenuView_gap_color, getResources().getColor(R.color.default_backgrouncolor));
156 | strokeWidth = typedArray.getDimension(R.styleable.CircleMenuView_stroke_width, 3);
157 | textsize = typedArray.getDimension(R.styleable.CircleMenuView_menu_text_size, sp2px(getContext(), 12));
158 | text = typedArray.getTextArray(R.styleable.CircleMenuView_menu_text);
159 | centerText = typedArray.getString(R.styleable.CircleMenuView_center_text);
160 | centerIcon = typedArray.getDrawable(R.styleable.CircleMenuView_center_icon);
161 | neiRadius = (int) typedArray.getDimension(R.styleable.CircleMenuView_inside_cirle_radius, 0);
162 | menuTextColor = typedArray.getColor(R.styleable.CircleMenuView_menu_text_color, getResources().getColor(android.R.color.black));
163 | deltaPadding = (int) typedArray.getDimension(R.styleable.CircleMenuView_gap_size, dip2px(getContext(), 10));
164 | TypedArray ar = getResources().obtainTypedArray(typedArray.getResourceId(R.styleable.CircleMenuView_menu_icon, 0));
165 | int len = ar.length();
166 | bitMap = new int[len];
167 | for (int i = 0; i < len; i++)
168 | bitMap[i] = ar.getResourceId(i, 0);
169 | typedArray.recycle();
170 | ar.recycle();
171 | }else{
172 | menuItemBackground= getResources().getColor(android.R.color.white);
173 | strokeColor=getResources().getColor(R.color.default_stroke_color);
174 | gapColor=getResources().getColor(R.color.default_backgrouncolor);
175 | strokeWidth=3;
176 | textsize=12;
177 | centerText="";
178 | centerIcon=getResources().getDrawable(R.mipmap.ic_launcher);
179 | neiRadius=0;
180 | menuTextColor= getResources().getColor(android.R.color.black);
181 | deltaPadding= dip2px(getContext(), 10);
182 | }
183 |
184 | }
185 |
186 | public CircleMenuView(Context context) {
187 | super(context, null);
188 | // TODO 自动生成的构造函数存根
189 | setFocusable(true);
190 | setFocusableInTouchMode(true);
191 | setKeepScreenOn(true);
192 | initAttrs(context, null);
193 | }
194 |
195 |
196 | private void initSomeThing() {
197 | // TODO 自动生成的方法存根
198 | //图片和文字数组不一致 取小的
199 | int length = bitMap.length > text.length ? text.length : bitMap.length;
200 | mcount = length;
201 | deltaAngle = 360 / mcount;
202 | mArcPaint = new Paint();
203 | mArcPaint.setAntiAlias(true);
204 | mArcPaint.setDither(true);
205 | mArcPaint.setColor(menuItemBackground);
206 | mArcPaint.setStyle(Paint.Style.FILL);// 设置画笔为填充
207 | range = new RectF(minpadding, minpadding, minpadding + radius,
208 | minpadding + radius);
209 |
210 | // 初始化内圆画笔
211 |
212 | // 初始化外圆画笔
213 | mWaiCirclePaint = new Paint();
214 | mWaiCirclePaint.setAntiAlias(true);
215 | mWaiCirclePaint.setDither(true);
216 | mWaiCirclePaint.setColor(gapColor);
217 | mWaiCirclePaint.setStyle(Paint.Style.FILL);
218 | // mWaiCirclePaint.setXfermode(new PorterDuffXfermode(
219 | // PorterDuff.Mode.CLEAR));
220 |
221 | // 绘制内圆
222 | mCirclePaint = new Paint();
223 | mCirclePaint.setAntiAlias(true);
224 | mCirclePaint.setDither(true);
225 | mCirclePaint.setColor(menuItemBackground);
226 | mCirclePaint.setStyle(Paint.Style.FILL);
227 | mCirclePaint
228 | .setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));
229 |
230 | // 初始化分割矩形
231 | rectPaint = new Paint();
232 | rectPaint.setAntiAlias(true);
233 | rectPaint.setDither(true);
234 | rectPaint.setColor(gapColor);
235 | rectPaint.setStyle(Paint.Style.FILL);
236 | rectPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));
237 | // 初始化绘制图片的paint
238 | textPaint = new Paint();
239 | textPaint.setAntiAlias(true);
240 | textPaint.setDither(true);
241 | textPaint.setColor(menuTextColor);
242 | textPaint.setStyle(Paint.Style.FILL);
243 | textPaint.setTextSize(textsize);
244 | textPaint.setTextAlign(Paint.Align.CENTER);
245 | /**
246 | * 初始化扫边画笔
247 | */
248 | strokePaint = new Paint();
249 | strokePaint.setAntiAlias(true);
250 | strokePaint.setDither(true);
251 | strokePaint.setStyle(Paint.Style.STROKE);
252 | strokePaint.setStrokeWidth(strokeWidth);
253 | strokePaint.setColor(strokeColor);
254 | }
255 |
256 | /**
257 | * 绘制操作
258 | */
259 | private void adraw(Canvas cancas) {
260 | // dosomething
261 | this.cancas = cancas;
262 | cancas.drawColor(gapColor);
263 | drawCircle();
264 | drawWaiCicrle();
265 | drawNeiCicle();
266 | drawStrokeLine();
267 | drawRects();
268 | drawIcon();
269 | }
270 |
271 | /**
272 | * 绘制icon
273 | */
274 | private void drawIcon() {
275 | // TODO 自动生成的方法存根
276 | // 将旋转之后的画布恢复
277 | cancas.restore();
278 | for (int i = 0; i < mcount; i++) {
279 | int imgWidth = radius / 5;
280 | Bitmap bitmap = BitmapFactory.decodeResource(getResources(),
281 | bitMap[i]);
282 | float angle = (float) ((startangle + 360 / mcount / 2) * Math.PI / 180);
283 | int x = (int) (width / 2 + radius * 3 / 4 * Math.cos(angle));
284 | int y = (int) (width / 2 + radius * 3 / 4 * Math.sin(angle));
285 | int offset = dip2px(getContext(), 5);
286 | Rect rect = new Rect(x - imgWidth / 2 + offset, y - imgWidth / 2 + offset - dip2px(getContext(), 10), x
287 | + imgWidth / 2 - offset, y + imgWidth / 2 - offset - dip2px(getContext(), 10));
288 | Paint p = new Paint();
289 | p.setAntiAlias(true);
290 | p.setDither(true);
291 | cancas.drawBitmap(bitmap, null, rect, p);
292 | Paint.FontMetrics fontMetrics = textPaint.getFontMetrics();
293 | float textW = fontMetrics.descent - fontMetrics.top;
294 | cancas.drawText(String.valueOf(text[i]), x, (float) (y + textW * 1.5), textPaint);
295 | startangle = startangle + deltaAngle;
296 | }
297 | // 绘制内圆图片
298 | int imgwidth = radius / 5;
299 | Rect rects = new Rect(width / 2 - imgwidth / 2, width / 2 - imgwidth,
300 | width / 2 + imgwidth / 2, width / 2);
301 |
302 | cancas.drawBitmap(
303 | ((BitmapDrawable) centerIcon).getBitmap(), null,
304 | rects, null);
305 | Paint.FontMetrics fontMetrics = textPaint.getFontMetrics();
306 | float textW = fontMetrics.descent - fontMetrics.top;
307 | cancas.drawText(centerText,
308 | x, y + textW
309 | ,
310 | textPaint);
311 | }
312 |
313 | private void drawStrokeLine() {
314 | cancas.drawCircle(x, y, radius, strokePaint);
315 | cancas.drawCircle(x, y, neiRadius, strokePaint);
316 | cancas.drawCircle(x, y, waiRaidus, strokePaint);
317 |
318 | }
319 | /**
320 | *
321 | */
322 | /**
323 | * 绘制 圆形
324 | */
325 | private void drawCircle() {
326 | cancas.drawCircle(x, y, radius, mArcPaint);
327 | }
328 |
329 | /**
330 | * 绘制内圆
331 | */
332 | private void drawNeiCicle() {
333 | cancas.drawCircle(x, y, neiRadius, mCirclePaint);
334 |
335 | }
336 |
337 | /**
338 | * 绘制外圆 透明色
339 | */
340 | private void drawWaiCicrle() {
341 | cancas.drawCircle(x, y, waiRaidus, mWaiCirclePaint);
342 | }
343 |
344 | /**
345 | * 绘制分割矩形
346 | */
347 | private void drawRects() {
348 | // 绘制左边分割矩形
349 | cancas.save();
350 | Paint paint = new Paint();
351 | paint.setAntiAlias(false);
352 | paint.setDither(true);
353 | paint.setStyle(Paint.Style.FILL);
354 | paint.setColor(gapColor);
355 | paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));
356 | int size = mcount / 2;
357 | for (int i = 0; i < size; i++) {
358 | RectF ff = new RectF(minpadding - 4, (y - deltaPadding / 2) + 2, radius
359 | - waiRaidus + minpadding + 4, (y + deltaPadding / 2) - 2);
360 |
361 | RectF f = new RectF(minpadding, y - deltaPadding / 2, radius
362 | - waiRaidus + minpadding, y + deltaPadding / 2);
363 |
364 | cancas.drawRect(f, rectPaint);
365 | cancas.drawRect(f, strokePaint);
366 | cancas.drawRect(ff, paint);
367 | // 绘制右边分割矩形
368 | RectF ff2 = new RectF(x + waiRaidus - 4, y - deltaPadding / 2 + 2, width
369 | - minpadding + 4, y + deltaPadding / 2 - 2);
370 | RectF f2 = new RectF(x + waiRaidus, y - deltaPadding / 2, width
371 | - minpadding, y + deltaPadding / 2);
372 | cancas.drawRect(f2, rectPaint);
373 | cancas.drawRect(f2, strokePaint);
374 | cancas.drawRect(ff2, paint);
375 | // 将画布旋转60在绘制
376 | if (i != size - 1)
377 | cancas.rotate(deltaAngle, x, y);
378 | }
379 |
380 |
381 | }
382 |
383 | @Override
384 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
385 | // TODO 自动生成的方法存根
386 | super.onMeasure(widthMeasureSpec, heightMeasureSpec);
387 | //将画布设为正方形
388 | int mWidth = getMeasuredWidth();
389 | int mHeight = getMeasuredHeight();
390 | if (mWidth > mHeight) {
391 | mWidth = mHeight;
392 | }
393 | width = mWidth;
394 | minpadding = getPaddingLeft();
395 | // 半径
396 | radius = (width - minpadding * 2) / 2;
397 | x = width / 2;
398 | y = x;
399 | if (neiRadius == 0) {
400 | waiRaidus = radius / 3 + deltaPadding;
401 | neiRadius = waiRaidus - deltaPadding;
402 | } else {
403 | waiRaidus = neiRadius + deltaPadding;
404 | }
405 | // 设置画布宽高
406 | setMeasuredDimension(width, width - minpadding + 3
407 | );
408 | }
409 |
410 | @Override
411 | public boolean onTouchEvent(MotionEvent event) {
412 | // 计算坐标范围,判断坐标在那个范围内
413 |
414 | switch (event.getAction()) {
415 | case MotionEvent.ACTION_DOWN:
416 | // 内圆点击事件
417 |
418 | return true;
419 | case MotionEvent.ACTION_MOVE:
420 |
421 | return true;
422 | case MotionEvent.ACTION_UP:
423 |
424 | float delta = (float) (Math.PI * deltaAngle / 180);
425 |
426 | Region[] regions = new Region[mcount + 1];
427 | float startAngele = 0;
428 | for (int i = 0; i < mcount + 1; i++) {
429 | Region re = new Region();
430 | Path path = new Path();
431 | if (i != 0) {
432 | path.moveTo((float) (x - waiRaidus * Math.cos(startAngele)), (float) (y - waiRaidus * Math.sin(startAngele)));
433 | path.lineTo((float) (x - waiRaidus * Math.cos(startAngele + delta)), (float) (y - waiRaidus * Math.sin(startAngele + delta)));
434 | path.lineTo((float) (x - radius * Math.cos(startAngele + delta)), (float) (y - radius * Math.sin(startAngele + delta)));
435 | path.lineTo((float) (x - radius * Math.cos(startAngele)), (float) (y - radius * Math.sin(startAngele)));
436 | path.close();
437 | } else {
438 | path.addCircle(x, y, neiRadius, Path.Direction.CW);
439 | }
440 | //构造一个区域对象,左闭右开的。
441 | RectF r = new RectF();
442 | //计算控制点的边界
443 | path.computeBounds(r, true);
444 | //设置区域路径和剪辑描述的区域
445 | re.setPath(path, new Region((int) r.left, (int) r.top, (int) r.right, (int) r.bottom));
446 | regions[i] = re;
447 | startAngele = startAngele + delta;
448 | }
449 | float x = event.getX();
450 | float y = event.getY();
451 | for (int i = 0; i < regions.length; i++) {
452 | if (regions[i].contains((int) x, (int) y)) {
453 | if (listener != null) {
454 | listener.onClick(this, i);
455 | }
456 | //Toast.makeText(getContext(), "" + i, 0).show();
457 | }
458 | }
459 | return true;
460 | }
461 | return true;
462 | }
463 |
464 | public void setOnClickListener(onYuanPanClickListener l) {
465 | listener = l;
466 | }
467 |
468 | public interface onYuanPanClickListener {
469 | void onClick(View v, int position);
470 | }
471 |
472 | /* (非 Javadoc)
473 | * @see android.view.View#onDraw(android.graphics.Canvas)
474 | */
475 | @Override
476 | protected void onDraw(Canvas canvas) {
477 | // TODO 自动生成的方法存根
478 | super.onDraw(canvas);
479 | initSomeThing();
480 | adraw(canvas);
481 | }
482 |
483 | /**
484 | * 根据手机的分辨率从 dp 的单位 转成为 px(像素)
485 | */
486 | private int dip2px(Context context, float dpValue) {
487 | final float scale = context.getResources().getDisplayMetrics().density;
488 | return (int) (dpValue * scale + 0.5f);
489 | }
490 |
491 | private int sp2px(Context context, float spValue) {
492 | final float fontScale = context.getResources().getDisplayMetrics().scaledDensity;
493 | return (int) (spValue * fontScale + 0.5f);
494 | }
495 |
496 | public int getInsideCircleRadius() {
497 | return neiRadius;
498 | }
499 |
500 | public CircleMenuView setInsideCircleRadius(int neiRadius) {
501 | this.neiRadius = neiRadius;
502 | postInvalidate();
503 | return this;
504 | }
505 |
506 | public float getMenuTextSize() {
507 | return textsize;
508 | }
509 |
510 | public CircleMenuView setMenuTextSize(float textsize) {
511 | this.textsize = textsize;
512 | postInvalidate();
513 | return this;
514 | }
515 |
516 | public int[] getMenuIcons() {
517 | return bitMap;
518 | }
519 |
520 | public CircleMenuView setMenuIcons(int[] bitMap) {
521 | this.bitMap = bitMap;
522 | postInvalidate();
523 | return this;
524 | }
525 |
526 | public CharSequence[] getMenuTexts() {
527 | return text;
528 | }
529 |
530 | public CircleMenuView setMenuTexts(CharSequence[] text) {
531 | this.text = text;
532 | postInvalidate();
533 | return this;
534 | }
535 |
536 | public int getGapSize() {
537 | return deltaPadding;
538 | }
539 |
540 | public CircleMenuView setGapSize(int deltaPadding) {
541 | this.deltaPadding = deltaPadding;
542 | postInvalidate();
543 | return this;
544 | }
545 |
546 | public int getMenuItemBackground() {
547 | return menuItemBackground;
548 | }
549 |
550 | public CircleMenuView setMenuItemBackground(int menuItemBackground) {
551 | this.menuItemBackground = menuItemBackground;
552 | postInvalidate();
553 | return this;
554 | }
555 |
556 | public int getStrokeColor() {
557 | return strokeColor;
558 | }
559 |
560 | public CircleMenuView setStrokeColor(int strokeColor) {
561 | this.strokeColor = strokeColor;
562 | postInvalidate();
563 | return this;
564 | }
565 |
566 | public int getGapColor() {
567 | return gapColor;
568 | }
569 |
570 | public CircleMenuView setGapColor(int gapColor) {
571 | this.gapColor = gapColor;
572 | postInvalidate();
573 | return this;
574 | }
575 |
576 | public float getStrokeWidth() {
577 | return strokeWidth;
578 | }
579 |
580 | public CircleMenuView setStrokeWidth(float strokeWidth) {
581 | this.strokeWidth = strokeWidth;
582 | postInvalidate();
583 | return this;
584 | }
585 |
586 | public String getCenterText() {
587 | return centerText;
588 | }
589 |
590 | public CircleMenuView setCenterText(String centerText) {
591 | this.centerText = centerText;
592 | postInvalidate();
593 | return this;
594 | }
595 |
596 | public Drawable getCenterIcon() {
597 | return centerIcon;
598 | }
599 |
600 | public CircleMenuView setCenterIcon(Drawable centerIcon) {
601 | this.centerIcon = centerIcon;
602 | postInvalidate();
603 | return this;
604 | }
605 |
606 | public int getMenuTextColor() {
607 | return menuTextColor;
608 | }
609 |
610 | public CircleMenuView setMenuTextColor(int menuTextColor) {
611 | this.menuTextColor = menuTextColor;
612 | postInvalidate();
613 | return this;
614 | }
615 | public CircleMenuView setWidthAndHeight(int w,int h){
616 | ViewGroup.LayoutParams params=new ViewGroup.LayoutParams(w,h);
617 | setLayoutParams(params);
618 | postInvalidate();
619 | return this;
620 | }
621 | }
622 |
623 |
624 |
625 |
--------------------------------------------------------------------------------
/app/src/main/java/com/allenliu/circlemenuview/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.allenliu.circlemenuview;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.widget.Toast;
8 |
9 | public class MainActivity extends AppCompatActivity {
10 |
11 | @Override
12 | protected void onCreate(Bundle savedInstanceState) {
13 | super.onCreate(savedInstanceState);
14 | setContentView(R.layout.activity_main);
15 | CircleMenuView circleMenuView = (CircleMenuView) findViewById(R.id.view);
16 | circleMenuView.setOnClickListener(new CircleMenuView.onYuanPanClickListener() {
17 | @Override
18 | public void onClick(View v, int position) {
19 | Toast.makeText(MainActivity.this, position + "", Toast.LENGTH_SHORT).show();
20 | }
21 | });
22 | // new CircleMenuView(this)
23 | // .setWidthAndHeight(300, 300)
24 | // .setCenterText()
25 | // .setCenterIcon()
26 | // .setGapColor()
27 | // .setGapSize()
28 | // .setMenuIcons()
29 | // .setMenuTexts()
30 | // .setMenuTextColor()
31 | // .setMenuTextSize()
32 | // .setMenuItemBackground()
33 | // .setInsideCircleRadius()
34 | // .setStrokeColor()
35 | // .setStrokeWidth()
36 | // .setOnClickListener();
37 |
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AlexLiuSheng/CircleMenuView/4356f454a8b5db29071794a075ec2df2d6976d66/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AlexLiuSheng/CircleMenuView/4356f454a8b5db29071794a075ec2df2d6976d66/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AlexLiuSheng/CircleMenuView/4356f454a8b5db29071794a075ec2df2d6976d66/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AlexLiuSheng/CircleMenuView/4356f454a8b5db29071794a075ec2df2d6976d66/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AlexLiuSheng/CircleMenuView/4356f454a8b5db29071794a075ec2df2d6976d66/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 | #dddddd
7 | #f8f8f8
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | CircleMenuView
3 |
4 | - 厉害了
5 | - 我的哥
6 | - 厉害了
7 | - 我的哥
8 | - 厉害了
9 | - 我的哥
10 | - 厉害了
11 | - 我的哥
12 | - 厉害了
13 | - 我的哥
14 |
15 |
16 | - @mipmap/ic_launcher
17 | - @mipmap/ic_launcher
18 | - @mipmap/ic_launcher
19 | - @mipmap/ic_launcher
20 | - @mipmap/ic_launcher
21 | - @mipmap/ic_launcher
22 | - @mipmap/ic_launcher
23 | - @mipmap/ic_launcher
24 | - @mipmap/ic_launcher
25 | - @mipmap/ic_launcher
26 |
27 |
28 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/test/java/com/allenliu/circlemenuview/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.allenliu.circlemenuview;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.2.0'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
21 | task clean(type: Delete) {
22 | delete rootProject.buildDir
23 | }
24 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AlexLiuSheng/CircleMenuView/4356f454a8b5db29071794a075ec2df2d6976d66/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Dec 28 10:00:20 PST 2015
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/img/Screenshot_2016-09-29-10-26-15-762.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AlexLiuSheng/CircleMenuView/4356f454a8b5db29071794a075ec2df2d6976d66/img/Screenshot_2016-09-29-10-26-15-762.png
--------------------------------------------------------------------------------
/img/Screenshot_2016-09-29-13-12-57-427_com.allenliu.c.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AlexLiuSheng/CircleMenuView/4356f454a8b5db29071794a075ec2df2d6976d66/img/Screenshot_2016-09-29-13-12-57-427_com.allenliu.c.png
--------------------------------------------------------------------------------
/img/Screenshot_2016-09-29-13-15-10-260_com.allenliu.c.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AlexLiuSheng/CircleMenuView/4356f454a8b5db29071794a075ec2df2d6976d66/img/Screenshot_2016-09-29-13-15-10-260_com.allenliu.c.png
--------------------------------------------------------------------------------
/img/Screenshot_2016-09-29-15-36-22-379_com.allenliu.c.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AlexLiuSheng/CircleMenuView/4356f454a8b5db29071794a075ec2df2d6976d66/img/Screenshot_2016-09-29-15-36-22-379_com.allenliu.c.png
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------