Commit 2b518366 by huahua

修改

parent ba759519
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -31,6 +31,8 @@ public class DialogEnterBackDialog extends Dialog {
public Dialog dialog;
private Context context;
public interface OnClickSaveListener {
void OnClickSaveButton();
}
......@@ -39,8 +41,6 @@ public class DialogEnterBackDialog extends Dialog {
this.onClickSaveListener = onClickSaveListener;
}
private Context context;
public DialogEnterBackDialog(@NonNull Activity context) {
super(context);
this.context = context;
......
......@@ -58,9 +58,6 @@ public class ProcessActivity extends BaseActivity {
@BindView(R.id.activity_process_diy_image_brush)
ImageView activity_process_diy_image_brush;
@BindView(R.id.activity_process_top_le)
RelativeLayout activity_process_top_le;
@BindView(R.id.activity_process_online_image_one)
ImageView activity_process_online_image_one;
......@@ -70,9 +67,6 @@ public class ProcessActivity extends BaseActivity {
@BindView(R.id.activity_process_online_image_three)
ImageView activity_process_online_image_three;
@BindView(R.id.activity_proces_diy_image_white)
ImageView activity_proces_diy_image_white;
@BindView(R.id.activity_process_print_fireworks)
ImageView activity_process_print_fireworks;
......@@ -249,8 +243,6 @@ public class ProcessActivity extends BaseActivity {
}
//进入完成页面
private void comeInComplete() {
//完成动画
......@@ -283,14 +275,12 @@ public class ProcessActivity extends BaseActivity {
}
}
@Override
public void onDestroy() {
super.onDestroy();//销毁
clearBitmapView();
}
//0:等待出料,1:生产中 , 2: 生产完成待取货, 3:取消生产,4:出料中,5: 等待取料 6:等待入货,7:取货完成',
//根据状态选择对应颜色
private void selctStatus(int status) {
......@@ -320,14 +310,11 @@ public class ProcessActivity extends BaseActivity {
if (statusText.contains("排队中") && status == 1 && (position - 1) >= 0) {
position = position - 1;
if (position > 0) {
//statProcessOnLineImage();
onLineShowAndHide(2);
int width = ScreenUtils.dip2px(this, 235);
int height = ScreenUtils.dip2px(this, 436);
activity_proces_diy_image.starNoDrawBitmapImage(width, height);
MediaPlayerHelper.getInstance().playAssetMusic(CustomApplication.getContext(), "mp3/works_queuing_up.mp3");
activity_process_status_text_content.setText("还有" + position + "个手机壳正在打印中,请稍等...");
} else {
initDataStatusTimeOver();
......@@ -368,8 +355,6 @@ public class ProcessActivity extends BaseActivity {
case 1:
initDataStatus();
break;
case 2:
break;
case 7: //取货完成
activity_process_diy_image_back_le.setVisibility(View.GONE);
activity_process_diy_image_back_le.setVisibility(View.GONE);
......@@ -391,8 +376,6 @@ public class ProcessActivity extends BaseActivity {
//开始刷子
private void startBrushImage() {
//测试
//SPUtils.putIntValue("initMinX", 650);
//RxBrushTime.getInstance(this).count=2;
int width = ScreenUtils.dip2px(ProcessActivity.this, 225);
int height = ScreenUtils.dip2px(ProcessActivity.this, 450);
width = SPUtils.getIntValue("covewidth", width);
......@@ -537,7 +520,6 @@ public class ProcessActivity extends BaseActivity {
} else {
onLineShowAndHide(3);
//作品正在打印
MediaPlayerHelper.getInstance().playAssetMusic(CustomApplication.getContext(), "mp3/work_height_production.mp3");
activity_process_status_text.setVisibility(View.VISIBLE);
activity_process_status_text.setText("打印中");
......@@ -630,7 +612,6 @@ public class ProcessActivity extends BaseActivity {
//选择之前初始化信息
private void initSelectData() {
activity_process_diy_image_back_le.setVisibility(View.GONE);
int status = XYDClient.getInstance(this).processStatus;
}
......
package live.nodiyphoneshell.cend.view.process;
import android.content.Context;
import android.text.TextUtils;
import com.zhy.http.okhttp.OkHttpUtils;
import live.nodiyphoneshell.cend.BasePresenter;
import live.nodiyphoneshell.cend.config.Config;
import live.nodiyphoneshell.cend.utils.CommonUtil;
import live.nodiyphoneshell.cend.utils.MyStringCallback;
import okhttp3.Call;
/**
* Created by MaYangHua on 2020/7/03.
* email : 295965650@qq.com
......@@ -23,7 +19,6 @@ public class ProcessPresenter extends BasePresenter implements ProcessContract.P
this.context = context;
}
@Override
public void getBanner(String partner_id, String ad_position_key) {
showLoad(context);
......
......@@ -88,7 +88,6 @@ public class ProcessCompleteActivity extends BaseActivity {
@Override
public void onAnimationEnd(Animator animator) {
activity_process_complete_diy_image_back_le.setVisibility(View.VISIBLE);
//activity_process_complete_back_le.setVisibility(View.VISIBLE);
activity_complete_proces_diy_image_white.setVisibility(View.VISIBLE);
ObjectAnimator y = ObjectAnimator.ofFloat(activity_process_complete_diy_image_back_le, "translationY", ScreenUtils.getScreenHeight(ProcessCompleteActivity.this) - ScreenUtils.dip2px(ProcessCompleteActivity.this, 100));
AnimatorSet animatorSet = new AnimatorSet();
......@@ -241,5 +240,4 @@ public class ProcessCompleteActivity extends BaseActivity {
}
}
}
......@@ -13,11 +13,9 @@ public class CustomViewPager extends ViewPager {
public CustomViewPager(Context context) {
super(context);
}
public CustomViewPager(Context context, AttributeSet attrs) {
super(context, attrs);
}
/**
* 设置其是否能滑动换页
* @param isCanScroll false 不能换页, true 可以滑动换页
......@@ -41,5 +39,4 @@ public class CustomViewPager extends ViewPager {
super.setCurrentItem(item,false);
}
}
package live.nodiyphoneshell.cend.widget;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
/**
* @author MaYnaghua
* @version 1.0.0
......@@ -36,7 +33,6 @@ public class DragScaleView extends View implements View.OnTouchListener {
private static final int CENTER = 0x19;
private int offset = 20;
protected Paint paint = new Paint();
/**
* 初始化获取屏幕宽高
*/
......
......@@ -10,7 +10,6 @@ import android.graphics.Rect;
import android.graphics.RectF;
import android.os.Build;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
import androidx.annotation.RequiresApi;
import live.nodiyphoneshell.cend.R;
......@@ -49,36 +48,29 @@ public class HProgressBar extends View {
public HProgressBar(Context context) {
super(context);
//Log.d(TAG, "HProgressBar: 1");
}
public HProgressBar(Context context, AttributeSet attrs) {
super(context, attrs);
this.context = context;
//Log.d(TAG, "HProgressBar: 2");
initDefStyleAttr(attrs);
mOutLinePaint = new Paint();
mOutLinePaint.setColor(mProgress_outline_color);
mOutLinePaint.setAntiAlias(true);
mOutLinePaint.setStrokeWidth(2);
mOutLinePaint.setStyle(Paint.Style.STROKE);
mProgressPaint = new Paint();
mProgressPaint.setColor(mProgress_color);
mProgressPaint.setAntiAlias(true);
noMProgressPaint = new Paint();
noMProgressPaint.setColor(noMProgress_color);
noMProgressPaint.setAntiAlias(true);
mCirClePaint = new Paint();
mCirClePaint.setColor(mProgress_circle_color);
mCirClePaint.setAntiAlias(true);
mTextBgPain = new Paint();
mTextBgPain.setColor(mProgress_text_bg_color);
mTextBgPain.setAntiAlias(true);
mTextPain = new Paint();
mTextPain.setColor(mProgress_text_color);
mTextPain.setAntiAlias(true);
......@@ -87,12 +79,10 @@ public class HProgressBar extends View {
mTextPain.setTextSize(mProgress_text_size);
}
public HProgressBar(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
public HProgressBar(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
......@@ -116,7 +106,6 @@ public class HProgressBar extends View {
mMaxProgress = attributes.getInteger(R.styleable.HProgress_hProgress_maxProgress, (int) mMaxProgress);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
......@@ -124,7 +113,6 @@ public class HProgressBar extends View {
setMeasuredDimension(mProgressWidth + ScreenUtils.dip2px(context, 10), (int) (mProgress_text_height + mProgress_circle_height));
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
......@@ -153,25 +141,6 @@ public class HProgressBar extends View {
canvas.setDrawFilter(new PaintFlagsDrawFilter(0, Paint.ANTI_ALIAS_FLAG | Paint.FILTER_BITMAP_FLAG));
}
/*//画圆canvas.drawCircle(circleX,
mProgress_circle_height / 2,
mProgress_circle_height / 2, mCirClePaint);*/
/*//画progressBar 外边
RectF rectF = new RectF(progressMargin, spaceA,mProgressWidth - progressMargin, mProgress_height + spaceA);
canvas.drawRoundRect(rectF, mProgress_height / 2, mProgress_height / 2, mOutLinePaint);
//画progressBar 内进度条
RectF rectF1 = new RectF(startPoint,
spaceA + spaceB,
startPoint + mProgress_bar_height + changeRange * getProgress()/mMaxProgress,
mProgress_bar_height + spaceB + spaceA);
canvas.drawRoundRect(rectF1, mProgress_bar_height / 2, mProgress_bar_height / 2, mProgressPaint);
//画圆
canvas.drawCircle(circleX,
mProgress_circle_height / 2,
mProgress_circle_height / 2, mCirClePaint);*/
public float getProgress() {
return mProgress_progress_bar;
}
......
package live.nodiyphoneshell.cend.widget;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
......@@ -10,7 +9,6 @@ import android.graphics.Paint;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import live.nodiyphoneshell.cend.R;
public class MainView extends View {
......
......@@ -32,14 +32,11 @@ public class MaskImage extends androidx.appcompat.widget.AppCompatImageView {
Bitmap mask = Bitmap.createBitmap(maskRes, 0, 0, width, height, m, false);
Bitmap result = Bitmap.createBitmap(mask.getWidth(), mask.getHeight(), Bitmap.Config.ARGB_8888);
//将遮罩层的图片放到画布中
//Canvas mCanvas = new Canvas(result);
//mCanvas.drawColor(Color.parseColor("#282932"));
mCanvas.setBitmap(result);
mCanvas.setDensity(targetDensityDpi);
Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
//设置两张图片相交时的模式
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_IN));
//paint.setColor(Color.parseColor("#282932"));
mCanvas.drawBitmap(original, 0, 0, null);
mCanvas.drawBitmap(mask, 0, 0, paint);
paint.setXfermode(null);
......@@ -49,5 +46,4 @@ public class MaskImage extends androidx.appcompat.widget.AppCompatImageView {
setVisibility(VISIBLE);
}
}
\ No newline at end of file
package live.nodiyphoneshell.cend.widget;
import android.view.View;
import androidx.recyclerview.widget.RecyclerView;
public class MyAutoLayoutManager extends RecyclerView.LayoutManager {
public MyAutoLayoutManager() {
setAutoMeasureEnabled(true);//layoutmanager必须调用此方法设为true才能在onMesure时自动布局
}
@Override
public RecyclerView.LayoutParams generateDefaultLayoutParams() {
return new RecyclerView.LayoutParams(
......
......@@ -83,9 +83,7 @@ public class MyBitmapViewAnother extends View {
//绘制蒙版的画笔
mPaintRect = new Paint();
mPaintRect.setAntiAlias(true);
//mPaintRect.setColor(Color.LTGRAY);
mPaintRect.setColor(Color.WHITE);
//mPaintRect.setColor(Color.TRANSPARENT);
//路径记录滑动屏幕的路径。
mPath = new Path();
}
......@@ -137,7 +135,6 @@ public class MyBitmapViewAnother extends View {
invalidate();
}
//刷子全部刷完成
public void hasBrushAllComplete() {
hasComplete = true;
......
......@@ -29,19 +29,15 @@ public class MyCropMoveView extends View {
init();
}
public MyCropMoveView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
private void init() {
//mBitmap = BitmapFactory.decodeResource(getResources(), R.mipmap.index_listattachment);
width = mBitmap.getWidth();
height = mBitmap.getHeight();
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
......@@ -75,58 +71,6 @@ public class MyCropMoveView extends View {
canvas.drawBitmap(bitmap, matrix, null); //绘制新位图
}
//重置
/*textView1= (TextView) findViewById(R.id.activity_myview_textview1);
textView1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
myViews.setMethod(0);
}
});
//左倾
textView2= (TextView) findViewById(R.id.activity_myview_textview2);
textView2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
myViews.setMethod(1);
}
});
//右倾
textView3= (TextView) findViewById(R.id.activity_myview_textview3);
textView3.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
myViews.setMethod(2);
}
});
//放大
textView4= (TextView) findViewById(R.id.activity_myview_textview4);
textView4.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
myViews.setMethod(3);
}
});
//缩小
textView5= (TextView) findViewById(R.id.activity_myview_textview5);
textView5.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
myViews.setMethod(4);
}
});*/
public void setMethod(int i) {
method = i;
postInvalidate();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment