Compare commits

..

57 Commits

Author SHA1 Message Date
李雨轩 c3dd751538 Read me
3 years ago
py2o9prfx fd6174bd7f Delete 'doc/~$_软件需求规格说明书-航吃hang吃.docx'
3 years ago
李雨轩 29b56c34b9 Merge branch 'master' of https://bdgit.educoder.net/py2o9prfx/liyuxuan_gitProject
3 years ago
李雨轩 5ec0c87bad update again
3 years ago
py2o9prfx 2130f943d0 Delete 'README.md'
3 years ago
李雨轩 4a93322a27 try
3 years ago
李雨轩 9a7a489e6a model
3 years ago
李雨轩 f24cd9e3b7 Server
3 years ago
py2o9prfx c11ef672bb Delete 'model/leitu.png'
3 years ago
李雨轩 0ec5a4bdc8 07
3 years ago
李雨轩 30d357b73d Merge branch 'master' of https://bdgit.educoder.net/py2o9prfx/liyuxuan_gitProject
3 years ago
李雨轩 d693c2346f update
3 years ago
李雨轩 800de84f74 doc update
3 years ago
py2o9prfx 3096656414 Delete 'src/order-master/README.md'
3 years ago
李雨轩 29a3eae881 doc/01_软件系统的需求构思及描述--航吃hang吃..docx
3 years ago
李雨轩 ae62bc12e7 Merge branch 'master' of https://bdgit.educoder.net/py2o9prfx/liyuxuan_gitProject
3 years ago
李雨轩 0a0be0754f update
3 years ago
李雨轩 0f5615f6ec update
3 years ago
py2o9prfx 94c48a2668 Delete 'src/build.gradle'
3 years ago
py2o9prfx f0bc487443 Delete 'src/README.md'
3 years ago
py2o9prfx 92556ab78c Delete 'src/.gitignore'
3 years ago
py2o9prfx 3ecb9e49a6 Delete 'AutoPollRecyclerViewDemo/.idea/runConfigurations.xml'
3 years ago
py2o9prfx ff2e65a359 Delete 'activity_main.xml'
3 years ago
py2o9prfx 897bec4095 Delete 'TurnTableActivity.java'
3 years ago
py2o9prfx d99da999b4 Delete 'README.md'
3 years ago
py2o9prfx 57501c8938 Delete 'LuckyView.java'
3 years ago
py2o9prfx 27cfb56b37 Delete 'AutoPollRecyclerViewDemo/.gitignore'
3 years ago
py2o9prfx 0672ad72d9 Delete '1/turntable.png'
3 years ago
py2o9prfx 45794624c5 Delete '1/ninglibrary.jpg'
3 years ago
py2o9prfx a68ebdd7ea Delete '1/bg_turntableright.xml'
3 years ago
py2o9prfx b1b2e16a8c Delete '1/bg_turntableleft.xml'
3 years ago
py2o9prfx fe238dae3c Delete '1/activity_turntable.xml'
3 years ago
py2o9prfx 5f878b92b5 Delete '1/activity_tmain.xml'
3 years ago
py2o9prfx aafc456dab Delete '1/TmainActivity.java'
3 years ago
py2o9prfx 0d78fa5b7f Delete '1/MyApplication.java'
3 years ago
py2o9prfx 31427d3d8c Delete '1/MainActivity.java'
3 years ago
pbmpu4aic 169266210c Delete '11.txt'
3 years ago
pbmpu4aic d89c29ac0c ADD file via upload
3 years ago
pbmpu4aic 11e6190c77 ADD file via upload
3 years ago
pbmpu4aic 08288c1fd9 ADD file via upload
3 years ago
pbmpu4aic a0b85c6fdc ADD file via upload
3 years ago
ZhangMengyao 3d84080de4 comment
3 years ago
qianjingLi 0f4d6cb26f new nutrition
3 years ago
李雨轩 2920d17894 About Comment
3 years ago
qyj 0331bbd5a0 转盘
3 years ago
qyj d3ed34b25c turntable
3 years ago
qyj a4d58078ba Merge branch 'master' of https://bdgit.educoder.net/py2o9prfx/liyuxuan_gitProject into Branch_QYJ
3 years ago
qyj 48b13e6249 自动滚动效果
3 years ago
qyj cf1830fced 1
3 years ago
qyj a413354785 11
3 years ago
李雨轩 d6000bd5ce new
3 years ago
李雨轩 3f35a227f0 add
3 years ago
李雨轩 cf314c638b siles
3 years ago
李雨轩 1f681c800c flies
3 years ago
李雨轩 213b2fecce doc/航吃hang吃_需求分析v3.0.docx
3 years ago
李雨轩 5144c81b13 add
3 years ago
李雨轩 bde6239735 doc
3 years ago

@ -1,2 +0,0 @@
1111
222

@ -1,2 +0,0 @@
# liyuxuan_gitProject

@ -1,191 +0,0 @@
package practice.csy.com.customprogress.view;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.RectF;
import android.support.annotation.NonNull;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.widget.ProgressBar;
import practice.csy.com.customprogress.R;
/**
* Created by user on 2017-8-8.
*
* ProgressBar
*
*
*/
public class RoundlProgresWithNum extends CustomHorizontalProgresNoNum{
private static final int DEAFUALT_PROGRESS_RADIO = 50;//圆的半径
private static final int DEAFUALT_PROGRESS_UNREACH_PAINT_STROKEN = 2;//未走完进度的宽度
private static final int DEAFUALT_PROGRESS_REACH_PAINT_STROKEN = 5;//走完进度的宽度
private static final int DEAFUALT_PROGRESS_REACH_START_DGREE = 0;//走完进度 圆弧 默认从多少度开始
private static final int DEAFUALT_PROGRESS_REACH_END_DGREE = 360;
private static final boolean DEAFUALT_PROGRESS_HAS_NUM = false;//是否带进度数字显示
private int mCustomCircleRadio ;//圆的半径
private int mCustomCircleUnReachPaintStroken ;//走完进度的
private int mCustomCircleReachPaintStroken ;//走完进度的画笔宽度
private int mCustomUnReachEnd;
private int mCustomUnReachStart;
private boolean mCustomHasNum;
private RectF mRectFOval;
public RoundlProgresWithNum(Context context) {
this(context,null);
}
public RoundlProgresWithNum(Context context, AttributeSet attrs) {
this(context,attrs,0);
}
public RoundlProgresWithNum(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
mPaint.setTextSize(HorizontalProgresTextSize);//设置画笔文字大小,便于后面测量文字宽高
mPaint.setColor(HorizontalProgresTextColor);
}
@Override
protected void getStyleabletAttr(AttributeSet attrs) {
super.getStyleabletAttr(attrs);
TypedArray typedArray = getContext().obtainStyledAttributes(attrs, R.styleable.CustomCircleProgresStyle);
mCustomCircleRadio = (int) typedArray.getDimension(R.styleable.CustomCircleProgresStyle_CustomCircleRadio,dp2px(getContext(),DEAFUALT_PROGRESS_RADIO));
mCustomCircleUnReachPaintStroken = (int) typedArray.getDimension(R.styleable.CustomCircleProgresStyle_CustomUnReachPaintStroken,dp2px(getContext(),DEAFUALT_PROGRESS_UNREACH_PAINT_STROKEN));
mCustomCircleReachPaintStroken = (int) typedArray.getDimension(R.styleable.CustomCircleProgresStyle_CustomReachPaintStroken,dp2px(getContext(),DEAFUALT_PROGRESS_REACH_PAINT_STROKEN));
mCustomUnReachStart = typedArray.getInteger(R.styleable.CustomCircleProgresStyle_CustomUnReachStart,DEAFUALT_PROGRESS_REACH_START_DGREE);
mCustomUnReachEnd = typedArray.getInteger(R.styleable.CustomCircleProgresStyle_CustomUnReachEnd,DEAFUALT_PROGRESS_REACH_END_DGREE);
mCustomHasNum = typedArray.getBoolean(R.styleable.CustomCircleProgresStyle_CustomHasProgressNum,DEAFUALT_PROGRESS_HAS_NUM);
typedArray.recycle();//记得加这句
}
/**
*
*/
@Override
protected synchronized void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
int width = measureWidth(widthMeasureSpec);//计算宽高
int height = measureHeight(heightMeasureSpec);
width = height = Math.min(width,height);//取宽高的最小值
if (mCustomCircleRadio>width/2){
mCustomCircleRadio = width/2;
}
mCustomCircleRadio = mCustomCircleRadio - mCustomCircleReachPaintStroken/2;//还要减去画笔的宽度
setMeasuredDimension(width,height);//设置宽高
}
@Override
protected synchronized void onDraw(Canvas canvas) {
//super.onDraw(canvas);//不需要父类里面的代码
mPaint.setAntiAlias(true);
mPaint.setStyle(Paint.Style.STROKE);
//移动画布,减少后续画图换算
int centerX = getWidth()/2;
int centerY = getHeight()/2;
canvas.save();//save、restore 图层的保存和回滚相关的方法 详见 http://blog.csdn.net/tianjian4592/article/details/45234419
canvas.translate(centerX,centerY);//移动图层到垂直居中位置
//draw unreach circle
mPaint.setColor(HorizontalProgresUnReachColor);
mPaint.setStrokeWidth(mCustomCircleUnReachPaintStroken);
canvas.drawCircle(0,0,mCustomCircleRadio,mPaint);
//draw reach circle
mPaint.setColor(HorizontalProgresReachColor);
mPaint.setStrokeWidth(mCustomCircleReachPaintStroken);
int progress = (int) ((getProgress()*1.0f/getMax())*360);//圆弧度数
int mTotalProgress = Math.abs(mCustomUnReachStart) + Math.abs(mCustomUnReachEnd);
if (progress<=mTotalProgress){
if (mRectFOval==null){//只创建一次,减少内存的创建与回收
mRectFOval = new RectF(-mCustomCircleRadio,-mCustomCircleRadio,mCustomCircleRadio,mCustomCircleRadio);//float left, float top, float right, float bottom
}
canvas.drawArc(mRectFOval,mCustomUnReachStart,progress,false,mPaint);////false绘制圆弧不含圆心 @NonNull RectF oval, float startAngle, float sweepAngle, boolean useCenter, @NonNull Paint paint
} else{
if (mRectFOval==null){//只创建一次,减少内存的创建与回收
mRectFOval = new RectF(-mCustomCircleRadio,-mCustomCircleRadio,mCustomCircleRadio,mCustomCircleRadio);//float left, float top, float right, float bottom
}
canvas.drawArc(mRectFOval,mCustomUnReachStart,mTotalProgress,false,mPaint);////false绘制圆弧不含圆心 @NonNull RectF oval, float startAngle, float sweepAngle, boolean useCenter, @NonNull Paint paint
}
//draw Text
if (mCustomHasNum){
mPaint.setColor(HorizontalProgresTextColor);
mPaint.setTextSize(HorizontalProgresTextSize);
mPaint.setStyle(Paint.Style.FILL);
String currentProgress = getProgress()+"%";
Rect mRectF = new Rect();
mPaint.getTextBounds(currentProgress,0,currentProgress.length(),mRectF);
//canvas.drawText(currentProgress,mRectF.width(),mRectF.height(),mPaint);
canvas.drawText(currentProgress,0 - mRectF.width()/2,0+mRectF.height()/2,mPaint);
}
canvas.restore();
}
/**
* Determines the width of this view
* @param measureSpec A measureSpec packed into an int
* @return The width of the view, honoring constraints from measureSpec
*/
protected int measureWidth(int measureSpec) {
int result = 0;
int specMode = MeasureSpec.getMode(measureSpec);
int specSize = MeasureSpec.getSize(measureSpec);
if (specMode == MeasureSpec.EXACTLY) {
// We were told how big to be
result = Math.min(specSize,mCustomCircleRadio*2);
} else {
// Measure the text
result = dp2px(getContext(),2*mCustomCircleRadio);//
if (specMode == MeasureSpec.AT_MOST) {
// Respect AT_MOST value if that was what is called for by measureSpec
result = Math.min(result, specSize);
}
}
return result;
}
/**
* Determines the height of this view
* @param measureSpec A measureSpec packed into an int
* @return The height of the view, honoring constraints from measureSpec
*/
protected int measureHeight(int measureSpec) {
int result = 0;
int specMode = MeasureSpec.getMode(measureSpec);
int specSize = MeasureSpec.getSize(measureSpec);
if (specMode == MeasureSpec.EXACTLY) {
// We were told how big to be
result = specSize;
} else {
// Measure the text (beware: ascent is a negative number)
//此处高度为走完的进度高度和未走完的机大以及文字的高度的最大值
result = 2*mCustomCircleRadio + getPaddingTop()
+ getPaddingBottom();
if (specMode == MeasureSpec.AT_MOST) {
// Respect AT_MOST value if that was what is called for by measureSpec
result = Math.min(result, specSize);
}
}
return result;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

@ -0,0 +1,2 @@
#Fri Oct 21 23:04:16 GMT+08:00 2022
gradle.version=6.4.1

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save