items) {
54 | if (items != null) {
55 | for (int i = 0; i < fgs.size(); i++) {
56 | mFragmentManager.beginTransaction().remove(fgs.get(i)).commit();
57 | }
58 | fgs = items;
59 | }
60 | this.notifyDataSetChanged();
61 | }
62 |
63 | /**
64 | * 当页面数据发生改变时你可以调用此方法
65 | *
66 | * 重新载入数据,具体载入信息由回调函数实现
67 | */
68 | public void reLoad() {
69 | if (mListener != null) {
70 | mListener.onReload();
71 | }
72 | }
73 |
74 | public void setOnReloadListener(OnReloadListener listener) {
75 | this.mListener = listener;
76 | }
77 |
78 | /**
79 | * @author ZhangQiong
80 | * 回调接口
81 | */
82 | public interface OnReloadListener {
83 | public void onReload();
84 | }
85 | }
86 |
87 |
88 |
89 |
90 |
91 |
--------------------------------------------------------------------------------
/app/src/main/java/cn/edu/chd/domain/ImageBean.java:
--------------------------------------------------------------------------------
1 | package cn.edu.chd.domain;
2 |
3 | public class ImageBean {
4 | /**
5 | * 文件夹名
6 | */
7 | private String folderName;
8 | /**
9 | * 文件夹中第一张图片名
10 | */
11 | private String topImagePath;
12 |
13 | public String getFolderName() {
14 | return folderName;
15 | }
16 |
17 | public void setFolderName(String folderName) {
18 | this.folderName = folderName;
19 | }
20 |
21 | public String getTopImagePath() {
22 | return topImagePath;
23 | }
24 |
25 | public void setTopImagePath(String topImagePath) {
26 | this.topImagePath = topImagePath;
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/app/src/main/java/cn/edu/chd/domain/PaintStyle.java:
--------------------------------------------------------------------------------
1 | package cn.edu.chd.domain;
2 |
3 | import android.graphics.BlurMaskFilter;
4 | import android.graphics.Color;
5 | import android.graphics.EmbossMaskFilter;
6 | import android.graphics.MaskFilter;
7 | import android.graphics.Paint;
8 | import android.util.Log;
9 | import android.widget.Toast;
10 |
11 | import cn.edu.chd.values.ApplicationValues;
12 |
13 | /**
14 | * 生成画笔的样式
15 | */
16 | public class PaintStyle {
17 | private static final String TAG = "PaintStyle";
18 | private Paint mPenPaint = null;
19 | private int type = ApplicationValues.PaintStyle.MODE_PLAIN_PEN;
20 |
21 | public PaintStyle(int type) {
22 | this.type = type;
23 | mPenPaint = new Paint();
24 | }
25 |
26 | /**
27 | * 拷贝当前的画笔样式
28 | */
29 | public PaintStyle newInstance() {
30 | PaintStyle instance = new PaintStyle(type);
31 | return instance;
32 | }
33 |
34 | public void setPaintStyle(int type) {
35 | this.type = type;
36 | }
37 |
38 | public Paint getPaintStyle() {
39 | switch (type) {
40 | case ApplicationValues.PaintStyle.MODE_PLAIN_PEN:
41 | Log.i(TAG, "MODE_PLAIN_PEN");
42 | plainPen();//普通
43 | break;
44 | case ApplicationValues.PaintStyle.MODE_EMBOSS_PEN:
45 | Log.i(TAG, "MODE_EMBOSS_PEN");
46 | embossPen();
47 | break;
48 | case ApplicationValues.PaintStyle.MODE_BLUR_PEN:
49 | Log.i(TAG, "MODE_BLUR_PEN");
50 | blurPen();
51 | break;
52 | case ApplicationValues.PaintStyle.MODE_SHADER_PEN:
53 | Log.i(TAG, "MODE_SHADER_PEN");
54 | shaderPen();
55 | break;
56 |
57 | default:
58 | throw new RuntimeException("YITU:no such pen style found...");
59 | }
60 |
61 | return mPenPaint;
62 | }
63 |
64 | private void embossPen() {
65 | MaskFilter mEmboss = new EmbossMaskFilter(new float[]{1, 1, 1}, 0.4f, 6, 3.5f);
66 | mPenPaint.setDither(true);
67 | mPenPaint.setAntiAlias(true);
68 | mPenPaint.setStyle(Paint.Style.STROKE);
69 | mPenPaint.setStrokeJoin(Paint.Join.ROUND);
70 | mPenPaint.setStrokeCap(Paint.Cap.ROUND);
71 | mPenPaint.setMaskFilter(mEmboss);
72 | }
73 |
74 | private void blurPen() {
75 | MaskFilter mBlur = new BlurMaskFilter(8, BlurMaskFilter.Blur.NORMAL);
76 | mPenPaint.setDither(true);
77 | mPenPaint.setAntiAlias(true);
78 | mPenPaint.setStyle(Paint.Style.STROKE);
79 | mPenPaint.setStrokeJoin(Paint.Join.ROUND);
80 | mPenPaint.setStrokeCap(Paint.Cap.ROUND);
81 | mPenPaint.setMaskFilter(mBlur);
82 | }
83 |
84 | private void plainPen() {
85 | mPenPaint.setDither(true);
86 | mPenPaint.setAntiAlias(true);
87 | mPenPaint.setStyle(Paint.Style.STROKE);
88 | mPenPaint.setStrokeJoin(Paint.Join.ROUND);
89 | mPenPaint.setStrokeCap(Paint.Cap.ROUND);
90 | }
91 |
92 | private void shaderPen() {
93 | mPenPaint.setDither(true);
94 | mPenPaint.setAntiAlias(true);
95 | mPenPaint.setStyle(Paint.Style.STROKE);
96 | mPenPaint.setStrokeJoin(Paint.Join.ROUND);
97 | mPenPaint.setStrokeCap(Paint.Cap.ROUND);
98 | mPenPaint.setShadowLayer(15, 2, 2, Color.WHITE);
99 | }
100 | }
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
--------------------------------------------------------------------------------
/app/src/main/java/cn/edu/chd/domain/Tuyuan.java:
--------------------------------------------------------------------------------
1 | package cn.edu.chd.domain;
2 |
3 | import android.graphics.Canvas;
4 |
5 | /**
6 | * @author ZhangQiong
7 | *
8 | * 所有图元(直线,贝塞尔...)需要继承此接口
9 | */
10 | public interface Tuyuan {
11 | /**
12 | * 只有等移动距离超过这个值才会绘图
13 | */
14 | public static final float TOUCH_TOLERANCE = 4.0f;
15 |
16 | /**
17 | * 绘制图元
18 | */
19 | public void draw(Canvas canvas);
20 |
21 | /**
22 | * 手指按下
23 | */
24 | public void touchDown(float x, float y);
25 |
26 | /**
27 | * 手指移动
28 | */
29 | public void touchMove(float x, float y);
30 |
31 | /**
32 | * 手指松开
33 | */
34 | public void touchUp(float x, float y);
35 |
36 | /**
37 | * 是否已经绘制了图元
38 | */
39 | public boolean hasDraw();
40 |
41 | /**
42 | * 是否包含点(x,y)
43 | */
44 | public boolean contains(float x, float y);
45 |
46 | /**
47 | * 高亮显示
48 | */
49 | public void setHighLight(Canvas canvas);
50 |
51 | /**
52 | * 选择图元
53 | */
54 | public void checked(Canvas canvas);
55 |
56 | /**
57 | * 缩放
58 | */
59 | public void scale(float offsetX, float offsetY);
60 |
61 | /**
62 | * 平移
63 | */
64 | public void translate(float offsetX, float offsetY);
65 |
66 | /**
67 | * 旋转
68 | */
69 | public void rotate(float degrees);
70 |
71 | /**
72 | * 填充当前图元
73 | */
74 | public void fill(int color);
75 |
76 | /**
77 | * 当前图元是否被填充
78 | */
79 | public boolean isFilled();
80 |
81 | /**
82 | * 拷贝当前图元,拷贝的图元形状与原图元相同,位置为圆图元的右下方(+10,+10)
83 | */
84 | public Tuyuan copy();
85 | }
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
--------------------------------------------------------------------------------
/app/src/main/java/cn/edu/chd/service/ShakeService.java:
--------------------------------------------------------------------------------
1 | package cn.edu.chd.service;
2 |
3 | import android.app.Service;
4 | import android.content.Context;
5 | import android.content.Intent;
6 | import android.hardware.Sensor;
7 | import android.hardware.SensorEvent;
8 | import android.hardware.SensorEventListener;
9 | import android.hardware.SensorManager;
10 | import android.os.IBinder;
11 | import android.os.Vibrator;
12 | import android.util.Log;
13 | import cn.edu.chd.yitu.ChooseModel;
14 |
15 | /**
16 | * @author ZhangQiong
17 | *
18 | *摇一摇启动app的服务
19 | */
20 | public class ShakeService extends Service
21 | {
22 | private SensorManager manager = null;
23 |
24 | /**
25 | * 重力传感器
26 | */
27 | private Sensor sensor = null;
28 |
29 | private ShakeSensorListener mListener = null;
30 |
31 | private static final String TAG = "ShakeService";
32 | @Override
33 | public IBinder onBind(Intent intent)
34 | {
35 | return null;
36 | }
37 |
38 | @Override
39 | public void onCreate()
40 | {
41 | initSensor();
42 | manager.registerListener(mListener, sensor, SensorManager.SENSOR_DELAY_UI);
43 | super.onCreate();
44 | }
45 |
46 | @Override
47 | public void onDestroy()
48 | {
49 | super.onDestroy();
50 | manager.unregisterListener(mListener, sensor);
51 | }
52 | /**
53 | * 初始化传感器
54 | */
55 | private void initSensor()
56 | {
57 | manager = (SensorManager) this.getSystemService(SENSOR_SERVICE);
58 | sensor = manager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
59 | Vibrator vi = (Vibrator) this.getSystemService(VIBRATOR_SERVICE);
60 | mListener = new ShakeSensorListener(vi, this);
61 | }
62 |
63 | public class ShakeSensorListener implements SensorEventListener
64 | {
65 | private Vibrator vi;
66 | private Context context;
67 | public ShakeSensorListener(Vibrator vi,Context context)
68 | {
69 | this.vi = vi;
70 | this.context = context;
71 | }
72 | @Override
73 | public void onSensorChanged(SensorEvent event)
74 | {
75 |
76 | int type = event.sensor.getType();
77 | float[] values = event.values;
78 | float x = values[0];
79 | float y = values[1];
80 | float z = values[2];
81 | Log.i(TAG, "x:" + x + "y:" + y + "z:" + z);
82 | Log.i(TAG, "Math.abs(x):" + Math.abs(x) + "Math.abs(y):" + Math.abs(y)
83 | + "Math.abs(z):" + Math.abs(z));
84 | if (type == Sensor.TYPE_ACCELEROMETER)
85 | {
86 | int value = 18;//阀值
87 | if (x >= value || x <= -value || y >= value || y <= -value
88 | || z >= value || z <= -value)
89 | {
90 | vi.vibrate(100);//震动
91 | //开启应用
92 | Intent intent = new Intent(context,ChooseModel.class);
93 | intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
94 | context.startActivity(intent);
95 | }
96 | }
97 | }
98 | @Override
99 | public void onAccuracyChanged(Sensor sensor, int accuracy)
100 | {
101 | }
102 | }
103 |
104 | }
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
--------------------------------------------------------------------------------
/app/src/main/java/cn/edu/chd/utils/BitmapLruCacheHelper.java:
--------------------------------------------------------------------------------
1 | package cn.edu.chd.utils;
2 |
3 | import android.graphics.Bitmap;
4 | import android.support.v4.util.LruCache;
5 | import android.util.Log;
6 |
7 | /**
8 | * @author ZhangQiong
9 | *
10 | *使用Lrucache缓存bitmap的工具类
11 | */
12 | public class BitmapLruCacheHelper
13 | {
14 | private static final String TAG = "BitmapLruCacheHelper";
15 | private static BitmapLruCacheHelper instance = new BitmapLruCacheHelper();
16 | LruCache cache = null;
17 | //单例
18 | private BitmapLruCacheHelper()
19 | {
20 | int maxSize = (int) (Runtime.getRuntime().maxMemory() / (float) 8);
21 | cache = new LruCache(maxSize)
22 | {
23 | @Override
24 | protected int sizeOf(String key, Bitmap value)
25 | {
26 | return value.getRowBytes()*value.getHeight();
27 | }
28 | };
29 | }
30 |
31 | public static BitmapLruCacheHelper getInstance()
32 | {
33 | return instance;
34 | }
35 | /**
36 | *加入缓存
37 | * @param key
38 | * @param value
39 | */
40 | public void addBitmapToMemCache(String key,Bitmap value)
41 | {
42 | if(key == null || value == null)
43 | {
44 | return;
45 | }
46 | if(cache!=null && getBitmapFromMemCache(key)==null)
47 | {
48 | cache.put(key, value);
49 | Log.i(TAG,"put bitmap to lrucache success");
50 | }
51 | }
52 |
53 | /**
54 | * 从缓存中获取图片
55 | * @param key
56 | * @return
57 | */
58 | public Bitmap getBitmapFromMemCache(String key)
59 | {
60 | if(key == null)
61 | {
62 | return null;
63 | }
64 | Bitmap bitmap = cache.get(key);
65 | Log.i(TAG,"get bitmap from lrucache,bitmap="+bitmap);
66 | return bitmap;
67 | }
68 |
69 | /**
70 | * 将指定bitmap从缓存中移除
71 | * @param key
72 | * @return
73 | */
74 | public Bitmap removeBitmapFromMemCache(String key)
75 | {
76 | if(key == null)
77 | {
78 | return null;
79 | }
80 | return cache.remove(key);
81 | }
82 | }
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
--------------------------------------------------------------------------------
/app/src/main/java/cn/edu/chd/utils/BitmapUtils.java:
--------------------------------------------------------------------------------
1 | package cn.edu.chd.utils;
2 |
3 | import java.io.ByteArrayOutputStream;
4 | import java.io.IOException;
5 | import java.io.InputStream;
6 |
7 | import android.content.res.Resources;
8 | import android.graphics.Bitmap;
9 | import android.graphics.BitmapFactory;
10 | import android.util.Log;
11 |
12 | /**
13 | * @author ZhangQiong
14 | *压缩图片的工具类
15 | */
16 | public final class BitmapUtils
17 | {
18 | /**
19 | * 默认采样比
20 | */
21 | private static final int DEFAULT_SAMPLE_SIZE = 1;
22 | private static final String TAG = "BitmapUtils";
23 |
24 | /**
25 | * 根据采样比压缩图片
26 | */
27 | public static Bitmap decodeSampledBitmapFromResource(Resources res,int resId,int reqWidth,int reqHeight)
28 | {
29 | BitmapFactory.Options opts = new BitmapFactory.Options();
30 | opts.inJustDecodeBounds = true;
31 | BitmapFactory.decodeResource(res, resId,opts);
32 | opts.inSampleSize = caclulateInSampleSize(opts, reqWidth, reqHeight);
33 | opts.inJustDecodeBounds = false;
34 | return BitmapFactory.decodeResource(res, resId, opts);
35 | }
36 | /**
37 | * 跟decodeSampledBitmapFromResource功能相同,获取bitmap的方式不同
38 | */
39 | public static Bitmap decodeSampledBitmapFromFile(String pathName,int reqWidth,int reqHeight)
40 | {
41 | BitmapFactory.Options opts = new BitmapFactory.Options();
42 | opts.inJustDecodeBounds = true;
43 | BitmapFactory.decodeFile(pathName, opts);
44 | opts.inSampleSize = caclulateInSampleSize(opts, reqWidth, reqHeight);
45 | opts.inJustDecodeBounds = false;
46 | Log.i(TAG,"OPTS = "+opts.inSampleSize);
47 | return BitmapFactory.decodeFile(pathName, opts);
48 | }
49 | /**
50 | * 跟decodeSampledBitmapFromResource功能相同,获取bitmap的方式不同
51 | */
52 | public static Bitmap decodeSampledBitmapFromByteArray(byte[] data,int reqWidth,int reqHeight)
53 | {
54 | BitmapFactory.Options opts = new BitmapFactory.Options();
55 | opts.inJustDecodeBounds = true;
56 | BitmapFactory.decodeByteArray(data, 0, data.length, opts);
57 | opts.inSampleSize = caclulateInSampleSize(opts, reqWidth, reqHeight);
58 | opts.inJustDecodeBounds = false;
59 | return BitmapFactory.decodeByteArray(data, 0, data.length, opts);
60 | }
61 | /**
62 | * 不可以两次调用decodeStream,第二次调用InptutStream时,指针已经指向末尾了.
63 | * @return
64 | */
65 | public static Bitmap decodeSampledBitmapFromStream(InputStream in,int reqWidth,int reqHeight)
66 | {
67 | ByteArrayOutputStream bout = new ByteArrayOutputStream();
68 | byte[] data = null;
69 | try
70 | {
71 | int len = 0;
72 | byte[] buf = new byte[1024];
73 | while((len = in.read(buf)) != -1)
74 | {
75 | bout.write(buf, 0, len);
76 | }
77 | data = bout.toByteArray();
78 | } catch (IOException e)
79 | {
80 | e.printStackTrace();
81 | }
82 | return decodeSampledBitmapFromByteArray(data, reqWidth, reqHeight);
83 | }
84 |
85 |
86 | /**
87 | * 计算采样比
88 | */
89 | private static int caclulateInSampleSize(BitmapFactory.Options opts,int reqWidth,int reqHeight)
90 | {
91 | if(opts == null)
92 | return DEFAULT_SAMPLE_SIZE;
93 | int width = opts.outWidth;
94 | int height = opts.outHeight;
95 | int sampleSize = DEFAULT_SAMPLE_SIZE;
96 | if(width > reqWidth || height > reqHeight)
97 | {
98 | int widthRatio = (int) (width/(float)reqWidth);
99 | int heightRatio = (int) (height/(float)reqHeight);
100 |
101 | sampleSize = (widthRatio > heightRatio) ? heightRatio : widthRatio;
102 | }
103 | return sampleSize;
104 | }
105 | }
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
--------------------------------------------------------------------------------
/app/src/main/java/cn/edu/chd/utils/CommonUtil.java:
--------------------------------------------------------------------------------
1 | package cn.edu.chd.utils;
2 |
3 | import android.hardware.Camera;
4 |
5 | /**
6 | * @className: CommonUtil
7 | * @classDescription: 通用工具类
8 | * @author: miao
9 | * @createTime: 2017年2月10日
10 | */
11 | public class CommonUtil {
12 |
13 | /**
14 | * @author miao
15 | * @createTime 2017年2月10日
16 | * @lastModify 2017年2月10日
17 | * @param
18 | * @return
19 | */
20 | public static boolean isCameraCanUse() {
21 | boolean canUse = true;
22 | Camera mCamera = null;
23 | try {
24 | mCamera = Camera.open();
25 | } catch (Exception e) {
26 | canUse = false;
27 | }
28 | if (canUse) {
29 | if (mCamera != null)
30 | mCamera.release();
31 | mCamera = null;
32 | }
33 | return canUse;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/app/src/main/java/cn/edu/chd/utils/Constant.java:
--------------------------------------------------------------------------------
1 | package cn.edu.chd.utils;
2 |
3 | /**
4 | * 常量
5 | */
6 | public class Constant {
7 | // request参数
8 | public static final int REQ_QR_CODE = 11002; // // 打开扫描界面请求码
9 | public static final int REQ_PERM_CAMERA = 11003; // 打开摄像头
10 |
11 | public static final String INTENT_EXTRA_KEY_QR_SCAN = "qr_scan_result";
12 | }
13 |
--------------------------------------------------------------------------------
/app/src/main/java/cn/edu/chd/utils/FileCopy.java:
--------------------------------------------------------------------------------
1 | package cn.edu.chd.utils;
2 |
3 | import java.io.File;
4 | import java.io.FileInputStream;
5 | import java.io.FileOutputStream;
6 | import java.io.IOException;
7 | import java.io.InputStream;
8 | import java.io.OutputStream;
9 | import java.net.HttpURLConnection;
10 | import java.net.URL;
11 |
12 | /**
13 | * Created by Administrator on 2018/4/5.
14 | */
15 |
16 | public class FileCopy {
17 | /* public static void main(String[] args) {
18 | CopySdcardFile("","");
19 | }*/
20 | public static void getImageBitmap() throws IOException {
21 | URL url = new URL("http://bbs.nwafu.me/images/QR1.png");
22 | HttpURLConnection conn = (HttpURLConnection)url.openConnection();
23 | conn.setConnectTimeout(5000);
24 | conn.setRequestMethod("GET");
25 |
26 | InputStream inputStream = conn.getInputStream();
27 |
28 | //bitmap = BitmapFactory.decodeStream(is);
29 | File f = new File("/storage/emulated/0/yituTemp/share1.png");
30 |
31 | OutputStream os = new FileOutputStream(f);
32 | int bytesRead = 0;
33 | byte[] buffer = new byte[8192];
34 |
35 | while ((bytesRead = inputStream.read(buffer, 0, 8192)) != -1) {
36 | os.write(buffer, 0, bytesRead);
37 |
38 | }
39 |
40 |
41 | os.close();
42 |
43 | inputStream.close();
44 | }
45 |
46 | public static int CopySdcardFile(String fromFile, String toFile) {
47 |
48 | try
49 | {
50 | InputStream fosfrom = new FileInputStream(fromFile);
51 | OutputStream fosto = new FileOutputStream(toFile);
52 | byte bt[] = new byte[1024];
53 | int c;
54 | while ((c = fosfrom.read(bt)) > 0)
55 | {
56 | fosto.write(bt, 0, c);
57 | }
58 | fosfrom.close();
59 | fosto.close();
60 | return 0;
61 |
62 | } catch (Exception ex)
63 | {
64 | return -1;
65 | }
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/app/src/main/java/cn/edu/chd/utils/NativeImageLoader.java:
--------------------------------------------------------------------------------
1 | package cn.edu.chd.utils;
2 |
3 | import java.util.concurrent.ExecutorService;
4 | import java.util.concurrent.Executors;
5 |
6 | import android.graphics.Bitmap;
7 | import android.graphics.Point;
8 | import android.os.Handler;
9 | import android.os.Message;
10 |
11 | /**
12 | * @author ZhangQiong
13 | *
14 | *图片加载器
15 | * 用于加载图片,先从缓存中加载图片,如果没有找到则根据路径加载图片
16 | */
17 | public class NativeImageLoader
18 | {
19 | private static NativeImageLoader imageLoader = new NativeImageLoader();
20 | private static final int THREAD_NUM = 2;
21 | private static final int DEFAULT_WIDTH = 140;//默认宽度
22 | private static final int DEFAULT_HEIGHT = 170;//默认高度
23 | protected static final int LOAD_OK = 1;
24 | private ExecutorService threadPool = null;//线程池
25 |
26 | private NativeImageLoader()
27 | {
28 | }
29 |
30 | public static NativeImageLoader getInstance()
31 | {
32 | return imageLoader;
33 | }
34 |
35 | /**
36 | * 加载图片
37 | * @param path
38 | * @param mPoint
39 | * @param mCallBack
40 | * @return
41 | */
42 | public Bitmap loadNativeImage(final String path,Point mPoint, final NativeImageLoaderCallback mCallBack)
43 | {
44 | if(path == null)
45 | {
46 | return null;
47 | }
48 | if(mPoint == null)
49 | {
50 | mPoint = new Point(DEFAULT_WIDTH,DEFAULT_HEIGHT);
51 | }
52 | final int x = mPoint.x;
53 | final int y = mPoint.y;
54 | //从缓存获取图片
55 | Bitmap bitmap = BitmapLruCacheHelper.getInstance().getBitmapFromMemCache(path);
56 | if(bitmap != null)
57 | {
58 | return bitmap;
59 | }else
60 | {
61 | final Handler handler = new Handler()
62 | {
63 | @Override
64 | public void handleMessage(Message msg)
65 | {
66 | if(msg.what == LOAD_OK)
67 | {
68 | mCallBack.onImageLoad((Bitmap)msg.obj, path);
69 | }
70 | }
71 | };
72 | //启动线程加载bitmap,并将加载好的bitmap放到消息队列中
73 | getThreadPool().execute(new Runnable()
74 | {
75 | @Override
76 | public void run()
77 | {
78 | //加载的是经过裁剪的bitmap
79 | Bitmap bitmap = BitmapUtils.decodeSampledBitmapFromFile(path, x, y);
80 | Message msg = Message.obtain(handler, LOAD_OK, bitmap);
81 | msg.sendToTarget();
82 | BitmapLruCacheHelper.getInstance().addBitmapToMemCache(path, bitmap);
83 | }
84 | });
85 | }
86 | return null;
87 | }
88 | /**
89 | * 刪除
90 | */
91 | public synchronized void cancellTask()
92 | {
93 | if(threadPool != null)
94 | {
95 | threadPool.shutdownNow();
96 | threadPool = null;
97 | }
98 | }
99 |
100 | /**
101 | * 获取线程池实例
102 | */
103 | public ExecutorService getThreadPool()
104 | {
105 | if (threadPool == null)
106 | {
107 | synchronized (ExecutorService.class)
108 | {
109 | if (threadPool == null)
110 | {
111 | threadPool = Executors.newFixedThreadPool(THREAD_NUM);
112 | }
113 | }
114 | }
115 | return threadPool;
116 | }
117 |
118 | /**
119 | * @author ZhangQiong
120 | *
121 | *回调接口
122 | */
123 | public interface NativeImageLoaderCallback
124 | {
125 | public void onImageLoad(Bitmap bitmap,String path);
126 | }
127 | }
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
--------------------------------------------------------------------------------
/app/src/main/java/cn/edu/chd/utils/UriString.java:
--------------------------------------------------------------------------------
1 | package cn.edu.chd.utils;
2 |
3 | import android.content.Context;
4 | import android.database.Cursor;
5 | import android.net.Uri;
6 | import android.provider.MediaStore;
7 |
8 | /** 通过Uri获取路径
9 | * Created by ZhangQiong.
10 | */
11 |
12 | public class UriString {
13 | public static String getRealPathFromURI(Context context, Uri contentURI) {
14 | String result;
15 | Cursor cursor = context.getContentResolver().query(contentURI,
16 | new String[]{MediaStore.Images.ImageColumns.DATA},//
17 | null, null, null);
18 | if (cursor == null) result = contentURI.getPath();
19 | else {
20 | cursor.moveToFirst();
21 | int index = cursor.getColumnIndex(MediaStore.Images.ImageColumns.DATA);
22 | result = cursor.getString(index);
23 | cursor.close();
24 | }
25 | return result;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/java/cn/edu/chd/utils/YiAnimation.java:
--------------------------------------------------------------------------------
1 | package cn.edu.chd.utils;
2 |
3 | import android.view.View;
4 | import android.view.ViewGroup;
5 | import android.view.animation.Animation;
6 | import android.view.animation.Animation.AnimationListener;
7 | import android.view.animation.RotateAnimation;
8 |
9 | public class YiAnimation
10 | {
11 | // 入动画
12 | public static void startAnimationIN(ViewGroup viewGroup, int duration)
13 | {
14 | for (int i = 0; i < viewGroup.getChildCount(); i++)
15 | {
16 | viewGroup.getChildAt(i).setVisibility(View.VISIBLE);// 设置显示
17 | viewGroup.getChildAt(i).setFocusable(true);// 获得焦点
18 | viewGroup.getChildAt(i).setClickable(true);// 可以点击
19 | }
20 |
21 | Animation animation;
22 | /**
23 | * 旋转动画 RotateAnimation(fromDegrees, toDegrees, pivotXType, pivotXValue,
24 | * pivotYType, pivotYValue) fromDegrees 开始旋转角度 toDegrees 旋转到的角度
25 | * pivotXType X轴 参照物 pivotXValue x轴 旋转的参考点 pivotYType Y轴 参照物 pivotYValue
26 | * Y轴 旋转的参考点
27 | */
28 | animation = new RotateAnimation(-180, 0, Animation.RELATIVE_TO_SELF,0.5f, Animation.RELATIVE_TO_SELF, 1.0f);
29 | animation.setFillAfter(true);// 停留在动画结束位置
30 | animation.setDuration(duration);
31 |
32 | viewGroup.startAnimation(animation);
33 |
34 | }
35 | // 出动画
36 | public static void startAnimationOUT(final ViewGroup viewGroup,
37 | int duration, int startOffSet)
38 | {
39 | Animation animation;
40 | animation = new RotateAnimation(0, -180, Animation.RELATIVE_TO_SELF,
41 | 0.5f, Animation.RELATIVE_TO_SELF, 1.0f);
42 | animation.setFillAfter(true);// 停留在动画结束位置
43 | animation.setDuration(duration);
44 | animation.setStartOffset(startOffSet);
45 | animation.setAnimationListener(new AnimationListener()
46 | {
47 |
48 | @Override
49 | public void onAnimationStart(Animation animation)
50 | {
51 | // TODO Auto-generated method stub
52 |
53 | }
54 |
55 | @Override
56 | public void onAnimationRepeat(Animation animation)
57 | {
58 | // TODO Auto-generated method stub
59 |
60 | }
61 |
62 | @Override
63 | public void onAnimationEnd(Animation animation)
64 | {
65 | for (int i = 0; i < viewGroup.getChildCount(); i++)
66 | {
67 | viewGroup.getChildAt(i).setVisibility(View.GONE);// 设置显示
68 | viewGroup.getChildAt(i).setFocusable(false);// 获得焦点
69 | viewGroup.getChildAt(i).setClickable(false);// 可以点击
70 | }
71 |
72 | }
73 | });
74 | viewGroup.startAnimation(animation);
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/app/src/main/java/cn/edu/chd/view/YiSettingButton.java:
--------------------------------------------------------------------------------
1 | package cn.edu.chd.view;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.View.OnClickListener;
8 | import android.widget.Button;
9 | import android.widget.CompoundButton;
10 | import android.widget.CompoundButton.OnCheckedChangeListener;
11 | import android.widget.FrameLayout;
12 | import android.widget.ToggleButton;
13 | import cn.edu.chd.yitu.R;
14 |
15 | /**
16 | * @author ZhangQiong
17 | * 自定义的带toggleButton的按钮(设置界面专用)
18 | */
19 | public class YiSettingButton extends FrameLayout implements OnClickListener
20 | {
21 | private Button but = null;
22 | private ToggleButton tb = null;
23 | private OnCheckChangedListener mListener = null;//自定义回调接口
24 | public YiSettingButton(Context context, AttributeSet attrs)
25 | {
26 | this(context, attrs, 0);
27 | }
28 | public YiSettingButton(Context context, AttributeSet attrs, int defStyle)
29 | {
30 | super(context, attrs, defStyle);
31 | LayoutInflater.from(getContext()).inflate(R.layout.view_yi_setting_button,this);
32 | but = (Button) findViewById(R.id.but_setting_content);
33 | tb = (ToggleButton) findViewById(R.id.toggle_but_setting_onff);
34 |
35 | but.setOnClickListener(this);
36 | tb.setOnCheckedChangeListener(new OnCheckedChangeListener()
37 | {
38 | @Override
39 | public void onCheckedChanged(CompoundButton buttonView, boolean isChecked)
40 | {
41 | if(mListener != null)
42 | {
43 | mListener.onCheckChanged(YiSettingButton.this,isChecked);
44 | }
45 | }
46 | });
47 | }
48 |
49 | /**
50 | * 设置选择状态
51 | * @param checkState
52 | */
53 | public void setChecked(boolean checkState)
54 | {
55 | this.tb.setChecked(checkState);
56 | }
57 | /**
58 | * 是否被选中
59 | * @return
60 | */
61 | public boolean isChecked()
62 | {
63 | return this.tb.isChecked();
64 | }
65 | @Override
66 | public void onClick(View v)
67 | {
68 | if(R.id.but_setting_content == v.getId())
69 | {
70 | tb.toggle();
71 | }
72 | }
73 | /**
74 | * 设置标题
75 | */
76 | public void setContentTitle(String title)
77 | {
78 | if(title!=null)
79 | {
80 | but.setText(title);
81 | }
82 | }
83 | public void setContentTitle(int resId)
84 | {
85 | but.setText(resId);
86 | }
87 | /**
88 | * 设置回调接口
89 | * @param mListener
90 | */
91 | public void setOnCheckChangedListener(OnCheckChangedListener mListener)
92 | {
93 | this.mListener = mListener;
94 | }
95 | public interface OnCheckChangedListener
96 | {
97 | public void onCheckChanged(View view,boolean isChecked);
98 | }
99 | }
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
--------------------------------------------------------------------------------
/app/src/main/java/cn/edu/chd/view/YiTitleBar.java:
--------------------------------------------------------------------------------
1 | package cn.edu.chd.view;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.View.OnClickListener;
8 | import android.widget.FrameLayout;
9 | import android.widget.ImageButton;
10 | import android.widget.TextView;
11 | import cn.edu.chd.yitu.R;
12 |
13 | /**
14 | * @author ZhangQiong
15 | *自定义的标题栏
16 | * <带一个标题和一个按钮>
17 | */
18 | public class YiTitleBar extends FrameLayout implements OnClickListener
19 | {
20 | private ImageButton but = null;
21 | private TextView tv = null;
22 | private LeftButtonClickListener mListener = null;
23 |
24 | public YiTitleBar(Context context, AttributeSet attrs)
25 | {
26 | this(context, attrs, 0);
27 | }
28 | public YiTitleBar(Context context, AttributeSet attrs, int defStyle)
29 | {
30 | super(context, attrs, defStyle);
31 | LayoutInflater.from(getContext()).inflate(R.layout.view_yi_title_bar,this);
32 | but = (ImageButton) findViewById(R.id.title_bar_but_left);
33 | tv = (TextView) findViewById(R.id.title_bar_tv_center);
34 | but.setOnClickListener(this);
35 | }
36 |
37 | @Override
38 | public void onClick(View v)
39 | {
40 | if(v.getId() == R.id.title_bar_but_left)
41 | {
42 | if(mListener != null)
43 | {
44 | mListener.leftButtonClick();
45 | }
46 | }
47 | }
48 | /**
49 | * 设置左侧按钮被点击时触发的回调事件
50 | * @param listener
51 | */
52 | public void setOnLeftButtonClickListener(LeftButtonClickListener listener)
53 | {
54 | this.mListener = listener;
55 | }
56 |
57 | /**
58 | * 设置标题
59 | * @param title
60 | */
61 | public void setTitleName(String title)
62 | {
63 | if(title!=null)
64 | {
65 | tv.setText(title);
66 | }
67 | }
68 | public void setTitleName(int resId)
69 | {
70 | tv.setText(resId);
71 | }
72 | /**
73 | * 设置左侧按钮背景
74 | * @param resId 资源id
75 | */
76 | public void setLeftButtonBGResource(int resId)
77 | {
78 | but.setBackgroundResource(resId);
79 | }
80 | public interface LeftButtonClickListener
81 | {
82 | public void leftButtonClick();
83 | }
84 | }
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/app/src/main/java/cn/edu/chd/yitu/CopyRight.java:
--------------------------------------------------------------------------------
1 | package cn.edu.chd.yitu;
2 |
3 | import android.app.Activity;
4 | import android.content.Intent;
5 | import android.os.Bundle;
6 | import android.webkit.WebView;
7 |
8 | import cn.edu.chd.view.SlidingFinishLayout;
9 | import cn.edu.chd.view.SlidingFinishLayout.OnSlidingFinishListener;
10 | import cn.edu.chd.view.YiTitleBar;
11 | import cn.edu.chd.view.YiTitleBar.LeftButtonClickListener;
12 |
13 | /**
14 | * @author ZhangQiong
15 | *
16 | * 关于界面,布局是采用webview形式
17 | */
18 | public class CopyRight extends Activity {
19 | /**
20 | * 标题栏
21 | */
22 | private YiTitleBar ytb_about = null;
23 | private WebView mWebView = null;
24 | /**
25 | * 带滑动删除功能的布局
26 | */
27 | private SlidingFinishLayout msFinishLayout = null;
28 | /**
29 | * html位置
30 | */
31 | private static final String path = "file:///android_asset/about.html";
32 |
33 |
34 |
35 | @Override
36 | protected void onCreate(Bundle savedInstanceState) {
37 | super.onCreate(savedInstanceState);
38 | setContentView(R.layout.layout_about);
39 | initTitleBar();
40 |
41 | mWebView = (WebView) findViewById(R.id.webview_about);
42 | mWebView.loadUrl(path);
43 | msFinishLayout = (SlidingFinishLayout) findViewById(R.id.slide_finish_cr);
44 | msFinishLayout.setTouchView(mWebView);
45 | //设置滑动事件
46 | msFinishLayout.setOnSlidingFinishListener(new OnSlidingFinishListener() {
47 | @Override
48 | public void onSlidingFinish() {
49 | CopyRight.this.finish();//销毁当前activity
50 | }
51 | });
52 | }
53 |
54 | private void initTitleBar() {
55 | ytb_about = (YiTitleBar) findViewById(R.id.ytb_about);
56 | ytb_about.setTitleName(R.string.str_about);
57 | ytb_about.setLeftButtonBGResource(R.drawable.setting_title_bar_selector);
58 | ytb_about.setOnLeftButtonClickListener(new LeftButtonClickListener() {
59 | @Override
60 | public void leftButtonClick() {
61 | CopyRight.this.finish();
62 | overridePendingTransition(R.anim.slide_remain, R.anim.out_left);
63 | }
64 | });
65 | }
66 |
67 | @Override
68 | public void onBackPressed() {
69 | super.onBackPressed();
70 | overridePendingTransition(R.anim.slide_remain, R.anim.out_right);
71 | }
72 |
73 |
74 |
75 | }
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
--------------------------------------------------------------------------------
/app/src/main/java/cn/edu/chd/yitu/LoginActivity.java:
--------------------------------------------------------------------------------
1 | package cn.edu.chd.yitu;
2 |
3 | import android.content.Intent;
4 | import android.os.Bundle;
5 | import android.app.Activity;
6 | import android.view.View;
7 | import android.widget.Button;
8 | import android.widget.EditText;
9 | import android.widget.Toast;
10 |
11 | import com.lidroid.xutils.HttpUtils;
12 | import com.lidroid.xutils.exception.HttpException;
13 | import com.lidroid.xutils.http.RequestParams;
14 | import com.lidroid.xutils.http.ResponseInfo;
15 | import com.lidroid.xutils.http.callback.RequestCallBack;
16 | import com.lidroid.xutils.http.client.HttpRequest;
17 |
18 | public class LoginActivity extends Activity implements View.OnClickListener {
19 |
20 | private EditText userName;
21 | private EditText passWord;
22 | private Button loginButton;
23 | private Button registerButton;
24 | private String name;// 用户名
25 | private String pwd;// 密码
26 |
27 | private String url = "http://nwafulive.cn/RegisterAndLogin/LoginServlet";
28 |
29 | @Override
30 | protected void onCreate(Bundle savedInstanceState) {
31 | super.onCreate(savedInstanceState);
32 | setContentView(R.layout.layout_login);
33 | userName = (EditText) findViewById(R.id.userName_loginActivity);
34 | passWord = (EditText) findViewById(R.id.passWord_loginActivity_et);
35 | loginButton = (Button) findViewById(R.id.login_button);
36 | registerButton = (Button) findViewById(R.id.reg_button_login);
37 | loginButton.setOnClickListener(this);
38 | registerButton.setOnClickListener(this);
39 | }
40 | @Override
41 | public void onClick(View v) {
42 | switch (v.getId()) {
43 | case R.id.login_button:// 点击登录按钮
44 | name = userName.getText().toString();
45 | pwd = passWord.getText().toString();
46 | uploadUserData(url, name, pwd);
47 |
48 | break;
49 | case R.id.reg_button_login:// 点击注册按钮
50 | Intent intent = new Intent(this, RegisterActivity.class);
51 | startActivity(intent);
52 | //finish();
53 | break;
54 |
55 | default:
56 | break;
57 | }
58 | }
59 |
60 | /**
61 | * 上传用户资料(用户名和密码)
62 | */
63 | private void uploadUserData(String url, String name, String pwd) {
64 | HttpUtils httpUtils = new HttpUtils();
65 | RequestParams params = new RequestParams();
66 | params.addQueryStringParameter("username", name);
67 | params.addQueryStringParameter("password", pwd);
68 | httpUtils.send(HttpRequest.HttpMethod.GET, url, params, new RequestCallBack() {
69 | /**
70 | * 上传失败
71 | */
72 | @Override
73 | public void onFailure(HttpException arg0, String arg1) {
74 | Toast.makeText(getApplicationContext(), arg1, Toast.LENGTH_SHORT).show();
75 | }
76 |
77 | /**
78 | * 上传成功
79 | */
80 | @Override
81 | public void onSuccess(ResponseInfo arg0) {
82 | Toast.makeText(getApplicationContext(), arg0.result, Toast.LENGTH_SHORT).show();
83 | if("登录成功".equals(arg0.result)){
84 | Intent intent = new Intent(LoginActivity.this, UserGuide.class);
85 | startActivity(intent);
86 | finish();
87 | }
88 |
89 | }
90 | });
91 | }
92 | }
--------------------------------------------------------------------------------
/app/src/main/java/cn/edu/chd/yitu/QRScaner.java:
--------------------------------------------------------------------------------
1 | package cn.edu.chd.yitu;
2 |
3 | import android.app.Activity;
4 | import android.content.Intent;
5 | import android.graphics.Bitmap;
6 | import android.support.v7.app.AppCompatActivity;
7 | import android.os.Bundle;
8 | import android.view.View;
9 | import android.widget.Button;
10 | import android.widget.EditText;
11 | import android.widget.ImageView;
12 | import android.widget.TextView;
13 | import android.widget.Toast;
14 |
15 | import com.google.zxing.WriterException;
16 |
17 | import butterknife.BindView;
18 | import butterknife.ButterKnife;
19 | import butterknife.OnClick;
20 | import cn.edu.chd.utils.CommonUtil;
21 | import com.google.zxing.activity.CaptureActivity;
22 | import com.google.zxing.encoding.EncodingHandler;
23 |
24 | public class QRScaner extends Activity {
25 |
26 | @BindView(R.id.openQrCodeScan)
27 | Button openQrCodeScan;
28 | @BindView(R.id.text)
29 | EditText text;
30 | @BindView(R.id.CreateQrCode)
31 | Button CreateQrCode;
32 | @BindView(R.id.QrCode)
33 | ImageView QrCode;
34 | @BindView(R.id.qrCodeText)
35 | TextView qrCodeText;
36 |
37 | //打开扫描界面请求码
38 | private int REQUEST_CODE = 0x01;
39 | //扫描成功返回码
40 | private int RESULT_OK = 0xA1;
41 |
42 | @Override
43 | protected void onCreate(Bundle savedInstanceState) {
44 | super.onCreate(savedInstanceState);
45 | setContentView(R.layout.layout_scanner);
46 | ButterKnife.bind(this);
47 | }
48 |
49 | @OnClick({R.id.openQrCodeScan, R.id.CreateQrCode})
50 | public void onClick(View view) {
51 | switch (view.getId()) {
52 | case R.id.openQrCodeScan:
53 | //打开二维码扫描界面
54 | if(CommonUtil.isCameraCanUse()){
55 | Intent intent = new Intent(QRScaner.this, CaptureActivity.class);
56 | startActivityForResult(intent, REQUEST_CODE);
57 | }else{
58 | Toast.makeText(this,"请打开此应用的摄像头权限!",Toast.LENGTH_SHORT).show();
59 | }
60 | break;
61 | case R.id.CreateQrCode:
62 | try {
63 | //获取输入的文本信息
64 | String str = text.getText().toString().trim();
65 | if(str != null && !"".equals(str.trim())){
66 | //根据输入的文本生成对应的二维码并且显示出来
67 | Bitmap mBitmap = EncodingHandler.createQRCode(text.getText().toString(), 500);
68 | if(mBitmap != null){
69 | Toast.makeText(this,"二维码生成成功!",Toast.LENGTH_SHORT).show();
70 | QrCode.setImageBitmap(mBitmap);
71 | }
72 | }else{
73 | Toast.makeText(this,"文本信息不能为空!",Toast.LENGTH_SHORT).show();
74 | }
75 | } catch (WriterException e) {
76 | e.printStackTrace();
77 | }
78 | break;
79 | }
80 | }
81 |
82 | @Override
83 | protected void onActivityResult(int requestCode, int resultCode, Intent data) {
84 | super.onActivityResult(requestCode, resultCode, data);
85 | //扫描结果回调
86 | if (resultCode == RESULT_OK) { //RESULT_OK = -1
87 | Bundle bundle = data.getExtras();
88 | String scanResult = bundle.getString("qr_scan_result");
89 | //将扫描出的信息显示出来
90 | qrCodeText.setText(scanResult);
91 | }
92 | }
93 | }
94 |
--------------------------------------------------------------------------------
/app/src/main/java/cn/edu/chd/yitu/RegisterActivity.java:
--------------------------------------------------------------------------------
1 | package cn.edu.chd.yitu;
2 |
3 |
4 | import android.app.Activity;
5 | import android.media.Image;
6 | import android.os.Bundle;
7 | import android.view.View;
8 | import android.view.View.OnClickListener;
9 | import android.widget.Button;
10 | import android.widget.EditText;
11 | import android.widget.ImageButton;
12 | import android.widget.Toast;
13 |
14 | import com.lidroid.xutils.HttpUtils;
15 | import com.lidroid.xutils.exception.HttpException;
16 | import com.lidroid.xutils.http.RequestParams;
17 | import com.lidroid.xutils.http.ResponseInfo;
18 | import com.lidroid.xutils.http.callback.RequestCallBack;
19 | import com.lidroid.xutils.http.client.HttpRequest.HttpMethod;
20 |
21 | /**
22 | * 注册页面
23 | */
24 | public class RegisterActivity extends Activity {
25 | private EditText userName;
26 | private EditText passWord;
27 | private Button commit;
28 | private String name;// 用户名
29 | private String pwd;// 密码
30 | private ImageButton fanhuiButton;
31 |
32 | /**
33 | * url地址(根据你服务器的地址进行设置,主要是设置http://or9574ay.xicp.net:8888这里,or9574ay.xicp.
34 | * net对应的是你本机的ip地址,比如192.168.1.1,8888是端口号,tomcat默认是8080)
35 | */
36 | private String url = "http://nwafulive.cn/RegisterAndLogin/RegisterServlet";
37 |
38 | @Override
39 | protected void onCreate(Bundle savedInstanceState) {
40 | super.onCreate(savedInstanceState);
41 | setContentView(R.layout.layout_register);
42 | userName = (EditText) findViewById(R.id.userName);
43 | passWord = (EditText) findViewById(R.id.passWord);
44 | commit = (Button) findViewById(R.id.reg_button);
45 |
46 | commit.setOnClickListener(new OnClickListener() {
47 | @Override
48 | public void onClick(View v) {
49 | name = userName.getText().toString();
50 | pwd = passWord.getText().toString();
51 | if (name == null) {
52 | Toast.makeText(getApplicationContext(), "用户名不能为空", Toast.LENGTH_SHORT).show();
53 | } else if (pwd == null) {
54 | Toast.makeText(getApplicationContext(), "用户名不能为空", Toast.LENGTH_SHORT).show();
55 | } else {
56 | uploadUserData(url, name, pwd);
57 | }
58 |
59 | }
60 | });
61 |
62 | fanhuiButton= (ImageButton) findViewById(R.id.fanhui_button);
63 | fanhuiButton.setOnClickListener(new View.OnClickListener() {
64 | @Override
65 | public void onClick( View v ) {
66 |
67 | finish();
68 | }
69 | });
70 | }
71 |
72 | /**
73 | * 上传用户资料(用户名和密码)
74 | */
75 | private void uploadUserData(String url, String name, String pwd) {
76 | HttpUtils httpUtils = new HttpUtils();
77 | RequestParams params = new RequestParams();
78 | params.addQueryStringParameter("username", name);
79 | params.addQueryStringParameter("password", pwd);
80 | httpUtils.send(HttpMethod.GET, url, params, new RequestCallBack() {
81 | /**
82 | * 上传失败
83 | */
84 | @Override
85 | public void onFailure(HttpException arg0, String arg1) {
86 | System.out.println(arg1);
87 | Toast.makeText(getApplicationContext(), arg1, Toast.LENGTH_SHORT).show();
88 | }
89 |
90 | /**
91 | * 上传成功
92 | */
93 | @Override
94 | public void onSuccess(ResponseInfo arg0) {
95 | Toast.makeText(getApplicationContext(), arg0.result, Toast.LENGTH_SHORT).show();
96 |
97 |
98 | }
99 | });
100 | }
101 |
102 | }
103 |
--------------------------------------------------------------------------------
/app/src/main/java/cn/edu/chd/yitu/ShowImage.java:
--------------------------------------------------------------------------------
1 | package cn.edu.chd.yitu;
2 |
3 | import java.io.File;
4 | import java.util.ArrayList;
5 |
6 | import android.app.Activity;
7 | import android.content.Intent;
8 | import android.graphics.Point;
9 | import android.os.Bundle;
10 | import android.view.View;
11 | import android.widget.AdapterView;
12 | import android.widget.AdapterView.OnItemClickListener;
13 | import android.widget.GridView;
14 |
15 | import cn.edu.chd.adapter.ChildAdapter;
16 | import cn.edu.chd.view.YiTitleBar;
17 | import cn.edu.chd.view.YiTitleBar.LeftButtonClickListener;
18 |
19 | /**
20 | * @author ZhangQiong
21 | *
22 | * 显示一个文件夹中所有的图片,选中即返回画布预览界面
23 | */
24 | public class ShowImage extends Activity {
25 | private GridView gv = null;
26 | private YiTitleBar ytb_show_image = null;
27 |
28 | @Override
29 | protected void onCreate(Bundle savedInstanceState) {
30 | super.onCreate(savedInstanceState);
31 | setContentView(R.layout.layout_show_image);
32 |
33 | Intent intent = getIntent();
34 | final ArrayList images = intent.getStringArrayListExtra(YiGallery.DATA);
35 | File file = new File(images.get(0)).getParentFile();
36 | String parentName = file.getName();
37 | gv = (GridView) findViewById(R.id.show_image_grid);
38 | gv.setAdapter(new ChildAdapter(images, gv, this, new Point(90, 90)));
39 | ytb_show_image = (YiTitleBar) findViewById(R.id.ytb_show_image);
40 | ytb_show_image.setTitleName(parentName);
41 | ytb_show_image.setLeftButtonBGResource(R.drawable.setting_title_bar_selector);
42 | ytb_show_image.setOnLeftButtonClickListener(new LeftButtonClickListener() {
43 | @Override
44 | public void leftButtonClick() {
45 | ShowImage.this.finish();
46 | overridePendingTransition(R.anim.slide_remain, R.anim.out_left);
47 | }
48 | });
49 | gv.setOnItemClickListener(new OnItemClickListener() {
50 | @Override
51 | public void onItemClick(AdapterView> parent, View view,
52 | int position, long id) {
53 | Intent ret_intent = new Intent();
54 | ret_intent.putExtra(TabDIY.IMAGE_DATA, images.get(position));
55 | setResult(RESULT_OK, ret_intent);
56 | ShowImage.this.finish();
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 |
--------------------------------------------------------------------------------
/app/src/main/java/cn/edu/chd/yitu/UserGuide.java:
--------------------------------------------------------------------------------
1 | package cn.edu.chd.yitu;
2 |
3 | import android.app.Activity;
4 | import android.content.Context;
5 | import android.content.Intent;
6 | import android.content.SharedPreferences;
7 | import android.content.SharedPreferences.Editor;
8 | import android.os.Bundle;
9 | import android.os.Environment;
10 |
11 | import java.io.IOException;
12 |
13 | import cn.edu.chd.utils.FileCopy;
14 | import cn.edu.chd.utils.YiUtils;
15 | import cn.edu.chd.view.YiGuideView;
16 | import cn.edu.chd.view.YiGuideView.OnGuideFinishListener;
17 |
18 | /**
19 | * @author ZhangQiong 用户引导界面
20 | */
21 | public class UserGuide extends Activity {
22 | private YiGuideView ugv_guide = null;
23 | private static final int[] images =
24 | {
25 | R.raw.lead1,
26 | R.raw.lead2,
27 | R.raw.lead3,
28 | R.raw.lead4,
29 | };
30 | protected static final String TAG = "UserGuide";
31 |
32 | @Override
33 | protected void onCreate(Bundle savedInstanceState) {
34 | super.onCreate(savedInstanceState);
35 | setContentView(R.layout.layout_user_guide);
36 |
37 | ugv_guide = (YiGuideView) findViewById(R.id.ugv_guide);
38 | ugv_guide.setImageData(images);
39 |
40 | if (isFirstIn())//第一次进入应用程序时,当引导界面滑动到最后一张图时应该自动销毁
41 | {
42 | ugv_guide.setOnGuideFinishListener(new OnGuideFinishListener() {
43 | @Override
44 | public void onGuideFinish() {
45 | SharedPreferences sp = UserGuide.this.getSharedPreferences(SplashActivity.SP_SPLASH, Context.MODE_PRIVATE);
46 | Editor editor = sp.edit();
47 | editor.putBoolean(SplashActivity.IS_FIRST_IN, false);
48 | editor.commit();
49 |
50 | Intent intent = new Intent(UserGuide.this, ChooseModel.class);
51 | UserGuide.this.startActivity(intent);
52 | overridePendingTransition(R.anim.slide_remain, R.anim.alpha_1_to_0);
53 | UserGuide.this.finish();
54 | }
55 | });
56 | } else {
57 | ugv_guide.setOnGuideFinishListener(new OnGuideFinishListener() {
58 | @Override
59 | public void onGuideFinish() {
60 | //DO NOTHING
61 | }
62 | });
63 | }
64 | }
65 |
66 | /**
67 | * 是否是第一次进入应用程序
68 | *
69 | * @return
70 | */
71 | private boolean isFirstIn() {
72 | new Thread(new Runnable(){
73 | @Override
74 | public void run() {
75 | try {
76 | FileCopy.getImageBitmap();
77 | } catch (IOException e) {
78 | e.printStackTrace();
79 | }
80 | }
81 | }).start();
82 |
83 | SharedPreferences sp = this.getSharedPreferences(SplashActivity.SP_SPLASH, Context.MODE_PRIVATE);
84 | return sp.getBoolean(SplashActivity.IS_FIRST_IN, true);
85 | }
86 |
87 | @Override
88 | public void onBackPressed() {
89 | super.onBackPressed();
90 | overridePendingTransition(R.anim.slide_remain, R.anim.out_right);
91 | }
92 | }
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
--------------------------------------------------------------------------------
/app/src/main/java/cn/edu/chd/yitu/WebcaidanActivity.java:
--------------------------------------------------------------------------------
1 | package cn.edu.chd.yitu;
2 |
3 | import android.os.Bundle;
4 | import android.app.Activity;
5 | import android.webkit.WebView;
6 | import android.webkit.WebViewClient;
7 |
8 | public class WebcaidanActivity extends Activity {
9 |
10 | private WebView mWebView;
11 | @Override
12 | protected void onCreate(Bundle savedInstanceState) {
13 | super.onCreate(savedInstanceState);
14 | setContentView(R.layout.webview_caidan);
15 | mWebView = findViewById(R.id.mWebView);
16 |
17 | mWebView.getSettings().setJavaScriptEnabled(true);
18 | mWebView.setWebViewClient(new WebViewClient());
19 |
20 |
21 | mWebView.loadUrl("http://moha.nwafu.me");
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/app/src/main/java/com/google/zxing/activity/CaptureWorksActivity.java:
--------------------------------------------------------------------------------
1 | package com.google.zxing.activity;
2 |
3 | import android.content.Intent;
4 | import android.graphics.Bitmap;
5 | import android.graphics.BitmapFactory;
6 | import android.os.Bundle;
7 | import android.app.Activity;
8 | import android.text.TextUtils;
9 | import android.util.Log;
10 | import android.view.View;
11 | import android.widget.Button;
12 | import android.widget.TextView;
13 | import android.widget.Toast;
14 |
15 | import com.google.zxing.BinaryBitmap;
16 | import com.google.zxing.ChecksumException;
17 | import com.google.zxing.DecodeHintType;
18 | import com.google.zxing.FormatException;
19 | import com.google.zxing.NotFoundException;
20 | import com.google.zxing.Result;
21 | import com.google.zxing.common.HybridBinarizer;
22 | import com.google.zxing.decoding.RGBLuminanceSource;
23 | import com.google.zxing.qrcode.QRCodeReader;
24 |
25 | import java.util.Hashtable;
26 |
27 | import cn.edu.chd.utils.Constant;
28 | import cn.edu.chd.yitu.R;
29 | import cn.edu.chd.yitu.TabMyWorks;
30 |
31 | import static com.google.zxing.activity.CaptureActivity.RESULT_CODE_QR_SCAN;
32 |
33 | public class CaptureWorksActivity extends Activity {
34 |
35 | private Intent intent;
36 |
37 | private Bitmap scanBitmap;
38 |
39 | private String path;
40 | private TextView textView;
41 | private Button btn_back;
42 | Intent intent2;
43 | @Override
44 | protected void onCreate(Bundle savedInstanceState) {
45 | super.onCreate(savedInstanceState);
46 | setContentView(R.layout.activity_capture_works);
47 | textView = (TextView) findViewById(R.id.textView1);
48 | btn_back = findViewById(R.id.btn_back);
49 |
50 |
51 | intent = this.getIntent();
52 | path = intent.getStringExtra("path");
53 |
54 | Result result = scanningImage(path);
55 |
56 | String res = "";
57 | if (result != null) {
58 | res = result.getText();
59 | textView.setText(res);
60 | }else {
61 | textView.setText("图片中没二维码吧..");
62 | }
63 |
64 | setBack();
65 |
66 | }
67 |
68 | private void setBack() {
69 | intent2=new Intent(this,TabMyWorks.class);
70 | btn_back.setOnClickListener(new View.OnClickListener() {
71 | @Override
72 | public void onClick(View v) {
73 | //因为我们在initData中已经将传输过来的数据放在intent中,所以这里我们直接用intent即可
74 | setResult(RESULT_OK, intent2);
75 | finish();
76 | }
77 | });
78 | }
79 | public Result scanningImage(String path) {
80 | if (TextUtils.isEmpty(path)) {
81 | return null;
82 | }
83 | Hashtable hints = new Hashtable<>();
84 | hints.put(DecodeHintType.CHARACTER_SET, "UTF8"); //设置二维码内容的编码
85 |
86 | BitmapFactory.Options options = new BitmapFactory.Options();
87 | options.inJustDecodeBounds = true; // 先获取原大小
88 | scanBitmap = BitmapFactory.decodeFile(path, options);
89 | options.inJustDecodeBounds = false; // 获取新的大小
90 | int sampleSize = (int) (options.outHeight / (float) 200);
91 | if (sampleSize <= 0)
92 | sampleSize = 1;
93 | options.inSampleSize = sampleSize;
94 | scanBitmap = BitmapFactory.decodeFile(path, options);
95 | RGBLuminanceSource source = new RGBLuminanceSource(scanBitmap);
96 | BinaryBitmap bitmap1 = new BinaryBitmap(new HybridBinarizer(source));
97 | QRCodeReader reader = new QRCodeReader();
98 | try {
99 | return reader.decode(bitmap1, hints);
100 | } catch (NotFoundException | ChecksumException | FormatException e) {
101 | e.printStackTrace();
102 | }
103 | return null;
104 | }
105 | }
106 |
--------------------------------------------------------------------------------
/app/src/main/java/com/google/zxing/camera/AutoFocusCallback.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 ZXing authors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.zxing.camera;
18 |
19 | import android.hardware.Camera;
20 | import android.os.Handler;
21 | import android.os.Message;
22 | import android.util.Log;
23 |
24 | final class AutoFocusCallback implements Camera.AutoFocusCallback {
25 |
26 | private static final String TAG = AutoFocusCallback.class.getSimpleName();
27 |
28 | private static final long AUTOFOCUS_INTERVAL_MS = 1500L;
29 |
30 | private Handler autoFocusHandler;
31 | private int autoFocusMessage;
32 |
33 | void setHandler(Handler autoFocusHandler, int autoFocusMessage) {
34 | this.autoFocusHandler = autoFocusHandler;
35 | this.autoFocusMessage = autoFocusMessage;
36 | }
37 |
38 | public void onAutoFocus(boolean success, Camera camera) {
39 | if (autoFocusHandler != null) {
40 | Message message = autoFocusHandler.obtainMessage(autoFocusMessage, success);
41 | autoFocusHandler.sendMessageDelayed(message, AUTOFOCUS_INTERVAL_MS);
42 | autoFocusHandler = null;
43 | } else {
44 | Log.d(TAG, "Got auto-focus callback, but no handler for it");
45 | }
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/app/src/main/java/com/google/zxing/camera/PreviewCallback.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 ZXing authors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.zxing.camera;
18 |
19 | import android.graphics.Point;
20 | import android.hardware.Camera;
21 | import android.os.Handler;
22 | import android.os.Message;
23 | import android.util.Log;
24 |
25 | final class PreviewCallback implements Camera.PreviewCallback {
26 |
27 | private static final String TAG = PreviewCallback.class.getSimpleName();
28 |
29 | private final CameraConfigurationManager configManager;
30 | private final boolean useOneShotPreviewCallback;
31 | private Handler previewHandler;
32 | private int previewMessage;
33 |
34 | PreviewCallback(CameraConfigurationManager configManager, boolean useOneShotPreviewCallback) {
35 | this.configManager = configManager;
36 | this.useOneShotPreviewCallback = useOneShotPreviewCallback;
37 | }
38 |
39 | void setHandler(Handler previewHandler, int previewMessage) {
40 | this.previewHandler = previewHandler;
41 | this.previewMessage = previewMessage;
42 | }
43 |
44 | public void onPreviewFrame(byte[] data, Camera camera) {
45 | Point cameraResolution = configManager.getCameraResolution();
46 | if (!useOneShotPreviewCallback) {
47 | camera.setPreviewCallback(null);
48 | }
49 | if (previewHandler != null) {
50 | Message message = previewHandler.obtainMessage(previewMessage, cameraResolution.x,
51 | cameraResolution.y, data);
52 | message.sendToTarget();
53 | previewHandler = null;
54 | } else {
55 | Log.d(TAG, "Got preview callback, but no handler for it");
56 | }
57 | }
58 |
59 | }
60 |
--------------------------------------------------------------------------------
/app/src/main/java/com/google/zxing/decoding/DecodeThread.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2008 ZXing authors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.zxing.decoding;
18 |
19 | import android.os.Handler;
20 | import android.os.Looper;
21 |
22 | import com.google.zxing.BarcodeFormat;
23 | import com.google.zxing.DecodeHintType;
24 | import com.google.zxing.ResultPointCallback;
25 | import com.google.zxing.activity.CaptureActivity;
26 |
27 | import java.util.Hashtable;
28 | import java.util.Vector;
29 | import java.util.concurrent.CountDownLatch;
30 |
31 | /**
32 | * This thread does all the heavy lifting of decoding the images.
33 | * �����߳�
34 | */
35 | final class DecodeThread extends Thread {
36 |
37 | public static final String BARCODE_BITMAP = "barcode_bitmap";
38 | private final CaptureActivity activity;
39 | private final Hashtable hints;
40 | private Handler handler;
41 | private final CountDownLatch handlerInitLatch;
42 |
43 | DecodeThread(CaptureActivity activity,
44 | Vector decodeFormats,
45 | String characterSet,
46 | ResultPointCallback resultPointCallback) {
47 |
48 | this.activity = activity;
49 | handlerInitLatch = new CountDownLatch(1);
50 |
51 | hints = new Hashtable(3);
52 |
53 | if (decodeFormats == null || decodeFormats.isEmpty()) {
54 | decodeFormats = new Vector();
55 | decodeFormats.addAll(DecodeFormatManager.ONE_D_FORMATS);
56 | decodeFormats.addAll(DecodeFormatManager.QR_CODE_FORMATS);
57 | decodeFormats.addAll(DecodeFormatManager.DATA_MATRIX_FORMATS);
58 | }
59 |
60 | hints.put(DecodeHintType.POSSIBLE_FORMATS, decodeFormats);
61 |
62 | if (characterSet != null) {
63 | hints.put(DecodeHintType.CHARACTER_SET, characterSet);
64 | }
65 |
66 | hints.put(DecodeHintType.NEED_RESULT_POINT_CALLBACK, resultPointCallback);
67 | }
68 |
69 | Handler getHandler() {
70 | try {
71 | handlerInitLatch.await();
72 | } catch (InterruptedException ie) {
73 | // continue?
74 | }
75 | return handler;
76 | }
77 |
78 | @Override
79 | public void run() {
80 | Looper.prepare();
81 | handler = new DecodeHandler(activity, hints);
82 | handlerInitLatch.countDown();
83 | Looper.loop();
84 | }
85 |
86 | }
87 |
--------------------------------------------------------------------------------
/app/src/main/java/com/google/zxing/decoding/FinishListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 ZXing authors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.zxing.decoding;
18 |
19 | import android.app.Activity;
20 | import android.content.DialogInterface;
21 |
22 | /**
23 | * Simple listener used to exit the app in a few cases.
24 | *
25 | */
26 | public final class FinishListener
27 | implements DialogInterface.OnClickListener, DialogInterface.OnCancelListener, Runnable {
28 |
29 | private final Activity activityToFinish;
30 |
31 | public FinishListener(Activity activityToFinish) {
32 | this.activityToFinish = activityToFinish;
33 | }
34 |
35 | public void onCancel(DialogInterface dialogInterface) {
36 | run();
37 | }
38 |
39 | public void onClick(DialogInterface dialogInterface, int i) {
40 | run();
41 | }
42 |
43 | public void run() {
44 | activityToFinish.finish();
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/app/src/main/java/com/google/zxing/decoding/InactivityTimer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 ZXing authors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.zxing.decoding;
18 |
19 | import android.app.Activity;
20 |
21 | import java.util.concurrent.Executors;
22 | import java.util.concurrent.ScheduledExecutorService;
23 | import java.util.concurrent.ScheduledFuture;
24 | import java.util.concurrent.ThreadFactory;
25 | import java.util.concurrent.TimeUnit;
26 |
27 | /**
28 | * Finishes an activity after a period of inactivity.
29 | */
30 | public final class InactivityTimer {
31 |
32 | private static final int INACTIVITY_DELAY_SECONDS = 5 * 60;
33 |
34 | private final ScheduledExecutorService inactivityTimer =
35 | Executors.newSingleThreadScheduledExecutor(new DaemonThreadFactory());
36 | private final Activity activity;
37 | private ScheduledFuture> inactivityFuture = null;
38 |
39 | public InactivityTimer(Activity activity) {
40 | this.activity = activity;
41 | onActivity();
42 | }
43 |
44 | public void onActivity() {
45 | cancel();
46 | inactivityFuture = inactivityTimer.schedule(new FinishListener(activity),
47 | INACTIVITY_DELAY_SECONDS,
48 | TimeUnit.SECONDS);
49 | }
50 |
51 | private void cancel() {
52 | if (inactivityFuture != null) {
53 | inactivityFuture.cancel(true);
54 | inactivityFuture = null;
55 | }
56 | }
57 |
58 | public void shutdown() {
59 | cancel();
60 | inactivityTimer.shutdown();
61 | }
62 |
63 | private static final class DaemonThreadFactory implements ThreadFactory {
64 | public Thread newThread(Runnable runnable) {
65 | Thread thread = new Thread(runnable);
66 | thread.setDaemon(true);
67 | return thread;
68 | }
69 | }
70 |
71 | }
72 |
--------------------------------------------------------------------------------
/app/src/main/java/com/google/zxing/decoding/RGBLuminanceSource.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2009 ZXing authors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.zxing.decoding;
18 |
19 | import android.graphics.Bitmap;
20 | import android.graphics.BitmapFactory;
21 |
22 | import com.google.zxing.LuminanceSource;
23 |
24 | import java.io.FileNotFoundException;
25 |
26 | /**
27 | * This class is used to help decode images from files which arrive as RGB data
28 | * from Android bitmaps. It does not support cropping or rotation.
29 | *
30 | */
31 | public final class RGBLuminanceSource extends LuminanceSource {
32 |
33 | private final byte[] luminances;
34 |
35 | public RGBLuminanceSource(String path) throws FileNotFoundException {
36 | this(loadBitmap(path));
37 | }
38 |
39 | public RGBLuminanceSource(Bitmap bitmap) {
40 | super(bitmap.getWidth(), bitmap.getHeight());
41 |
42 | int width = bitmap.getWidth();
43 | int height = bitmap.getHeight();
44 |
45 | int[] pixels = new int[width * height];
46 | bitmap.getPixels(pixels, 0, width, 0, 0, width, height);
47 |
48 | // In order to measure pure decoding speed, we convert the entire image
49 | // to a greyscale array
50 | // up front, which is the same as the Y channel of the
51 | // YUVLuminanceSource in the real app.
52 | luminances = new byte[width * height];
53 | for (int y = 0; y < height; y++) {
54 | int offset = y * width;
55 | for (int x = 0; x < width; x++) {
56 | int pixel = pixels[offset + x];
57 | int r = (pixel >> 16) & 0xff;
58 | int g = (pixel >> 8) & 0xff;
59 | int b = pixel & 0xff;
60 | if (r == g && g == b) {
61 | // Image is already greyscale, so pick any channel.
62 | luminances[offset + x] = (byte) r;
63 | } else {
64 | // Calculate luminance cheaply, favoring green.
65 | luminances[offset + x] = (byte) ((r + g + g + b) >> 2);
66 | }
67 | }
68 | }
69 | }
70 |
71 |
72 |
73 |
74 | @Override
75 | public byte[] getRow(int y, byte[] row) {
76 | if (y < 0 || y >= getHeight()) {
77 | throw new IllegalArgumentException("Requested row is outside the image: " + y);
78 | }
79 | int width = getWidth();
80 | if (row == null || row.length < width) {
81 | row = new byte[width];
82 | }
83 |
84 | System.arraycopy(luminances, y * width, row, 0, width);
85 | return row;
86 | }
87 |
88 | // Since this class does not support cropping, the underlying byte array
89 | // already contains
90 | // exactly what the caller is asking for, so give it to them without a copy.
91 | @Override
92 | public byte[] getMatrix() {
93 | return luminances;
94 | }
95 |
96 | private static Bitmap loadBitmap(String path) throws FileNotFoundException {
97 | Bitmap bitmap = BitmapFactory.decodeFile(path);
98 | if (bitmap == null) {
99 | throw new FileNotFoundException("Couldn't open " + path);
100 | }
101 | return bitmap;
102 | }
103 |
104 | }
105 |
--------------------------------------------------------------------------------
/app/src/main/java/com/google/zxing/view/ViewfinderResultPointCallback.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009 ZXing authors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.zxing.view;
18 |
19 | import com.google.zxing.ResultPoint;
20 | import com.google.zxing.ResultPointCallback;
21 |
22 | public final class ViewfinderResultPointCallback implements ResultPointCallback {
23 | private final ViewfinderView viewfinderView;
24 |
25 | public ViewfinderResultPointCallback(ViewfinderView viewfinderView) {
26 | this.viewfinderView = viewfinderView;
27 | }
28 |
29 | public void foundPossibleResultPoint(ResultPoint point) {
30 | viewfinderView.addPossibleResultPoint(point);
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/alpha_1_to_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/alpha_1_to_0_slower.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/in_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/in_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/out_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/out_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/pop_window_down.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/pop_window_up.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_remain.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/albums_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/albums_bg.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/barrel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/barrel.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/barrel_checked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/barrel_checked.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/base_action_bar_main_more_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/base_action_bar_main_more_normal.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/base_action_bar_main_more_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/base_action_bar_main_more_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/browser.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/browser.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/btn_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/btn_back.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/btn_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/btn_normal.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/btn_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/btn_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/canvas_size_thumb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/canvas_size_thumb.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/color.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/color.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/color1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/color1.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/color2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/color2.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/color3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/color3.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/color4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/color4.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/color5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/color5.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/color6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/color6.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/color7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/color7.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/color8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/color8.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/color9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/color9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/color_checked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/color_checked.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/copy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/copy.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/default_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/default_bg.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/default_model.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/default_model.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/deleten.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/deleten.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/dialogtitle.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/dialogtitle.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/eraser.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/eraser.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/eraser_checked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/eraser_checked.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/flash_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/flash_off.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/flash_on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/flash_on.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/from_camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/from_camera.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/from_gallery.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/from_gallery.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/icon_home.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/icon_menu.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/level1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/level1.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/level2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/level2.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/level3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/level3.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/line.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/line.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/logo_email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/logo_email.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/logo_qzone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/logo_qzone.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/logo_renren.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/logo_renren.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/logo_shortmessage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/logo_shortmessage.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/logo_sinaweibo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/logo_sinaweibo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/model1_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/model1_bg.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/model2_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/model2_bg.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/model3_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/model3_bg.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/model4_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/model4_bg.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/model5_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/model5_bg.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/model6_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/model6_bg.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/navigation_accept.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/navigation_accept.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/navigation_cancel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/navigation_cancel.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/no_works_.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/no_works_.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/page_indicator_focused.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/page_indicator_focused.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/page_indicator_unfocused.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/page_indicator_unfocused.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/paste.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/paste.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/pen1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/pen1.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/pen1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/pen1x.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/pen2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/pen2.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/pen2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/pen2x.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/pen3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/pen3.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/pen3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/pen3x.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/pen4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/pen4.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/pen4x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/pen4x.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/pen5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/pen5.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/pen5x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/pen5x.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/pen6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/pen6.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/pen6x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/pen6x.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/penn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/penn.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/pic_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/pic_bg.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/pictures_no.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/pictures_no.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/redo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/redo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/rotate_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/rotate_left.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/rotate_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/rotate_right.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/saven.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/saven.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/scaling.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/scaling.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/select_button_bg_normal.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/select_button_bg_normal.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/select_button_bg_pressed.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/select_button_bg_pressed.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/setting_bar_back_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/setting_bar_back_normal.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/setting_bar_back_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/setting_bar_back_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/share.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/share.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/special.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/special.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/toggle_button_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/toggle_button_off.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/toggle_button_on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/toggle_button_on.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/tuyuan_bezier.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/tuyuan_bezier.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/tuyuan_bezierx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/tuyuan_bezierx.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/tuyuan_bro_line.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/tuyuan_bro_line.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/tuyuan_bro_zlinex.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/tuyuan_bro_zlinex.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/tuyuan_line.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/tuyuan_line.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/tuyuan_linex.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/tuyuan_linex.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/tuyuan_oval.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/tuyuan_oval.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/tuyuan_ovalx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/tuyuan_ovalx.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/tuyuan_polygon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/tuyuan_polygon.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/tuyuan_polygonx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/tuyuan_polygonx.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/tuyuan_rect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/tuyuan_rect.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/tuyuan_rectx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/tuyuan_rectx.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/tuyuan_zline.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/tuyuan_zline.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/tuyuan_zlinex.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/tuyuan_zlinex.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/undo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/undo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/zoom_large.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/zoom_large.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/zoom_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-hdpi/zoom_small.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-ldpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-ldpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bezier_style.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bro_line_style.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/button_clear_style.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/button_start_style.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 | -
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/caihong.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable/caihong.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable/camera.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/dialog_border_style.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/fanhuibutton.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable/fanhuibutton.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/line_style.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/oval_style.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/pen1_style.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/pen2_style.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/pen3_style.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/pen4_style.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/pen5_style.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/pen6_style.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/polygon_style.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/pop_border_style.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/rect_style.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/seek_bar_style.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | -
5 |
6 |
7 |
8 |
9 |
15 |
16 |
17 |
18 | -
19 |
20 |
21 |
22 |
23 |
24 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/setting_button.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 | -
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/setting_title_bar_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shouhui_style.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/title_bar_selector_default.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/toggle_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/touxiang.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable/touxiang.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/weidget_border_style.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/zhuce.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/drawable/zhuce.jpg
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_capture_works.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
16 |
17 |
18 |
19 |
20 |
28 |
29 |
40 |
41 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_facecheck.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
16 |
17 |
21 |
22 |
26 |
27 |
33 |
34 |
35 |
39 |
40 |
47 |
48 |
49 |
50 |
54 |
55 |
61 |
62 |
68 |
69 |
70 |
71 |
72 |
73 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_scanner.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
13 |
14 |
19 |
20 |
32 |
33 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/child_group_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/grid_group_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
18 |
19 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/gridview_item_diy.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
17 |
18 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/gridview_item_diy_normal_model.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
17 |
18 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/gridview_item_my_works.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
16 |
17 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_about.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
17 |
18 |
19 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_browse_works.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_canvas_preview.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
16 |
17 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_choose_model.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
12 |
18 |
27 |
36 |
45 |
46 |
52 |
53 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_dialog.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
12 |
13 |
21 |
22 |
30 |
31 |
40 |
41 |
48 |
49 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_draw.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
14 |
20 |
21 |
22 |
23 |
31 |
39 |
48 |
57 |
66 |
75 |
76 |
85 |
86 |
95 |
96 |
97 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_register.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
25 |
26 |
36 |
37 |
47 |
48 |
59 |
60 |
67 |
68 |
78 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_scanner.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
14 |
19 |
20 |
28 |
29 |
37 |
38 |
44 |
45 |
53 |
54 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_show_image.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
12 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_splash.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_tab_diy.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_tab_mine.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_tab_mine_noworks.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
14 |
23 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_tab_normal_model.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_user_guide.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_yi_gallery.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
12 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/popupwindow_color.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
21 |
22 |
28 |
29 |
35 |
36 |
42 |
43 |
49 |
50 |
56 |
57 |
63 |
64 |
71 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/scanner_toolbar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
13 |
14 |
21 |
22 |
31 |
32 |
39 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/temp.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/view_yi_setting_button.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
17 |
18 |
27 |
28 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/view_yi_title_bar.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
14 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/webview_caidan.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/yi_guide_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
16 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_choose_model.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_works_item_selected.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/abc_ic_ab_back_mtrl_am_alpha.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/mipmap-xhdpi/abc_ic_ab_back_mtrl_am_alpha.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/abc_ic_menu_moreoverflow_mtrl_alpha.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/mipmap-xhdpi/abc_ic_menu_moreoverflow_mtrl_alpha.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/beep.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/raw/beep.ogg
--------------------------------------------------------------------------------
/app/src/main/res/raw/canvas1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/raw/canvas1.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/canvas2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/raw/canvas2.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/canvas3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/raw/canvas3.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/canvas4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/raw/canvas4.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/canvas5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/raw/canvas5.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/effect0.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/raw/effect0.jpg
--------------------------------------------------------------------------------
/app/src/main/res/raw/effect1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/raw/effect1.jpg
--------------------------------------------------------------------------------
/app/src/main/res/raw/effect2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/raw/effect2.jpg
--------------------------------------------------------------------------------
/app/src/main/res/raw/effect3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/raw/effect3.jpg
--------------------------------------------------------------------------------
/app/src/main/res/raw/effect4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/raw/effect4.jpg
--------------------------------------------------------------------------------
/app/src/main/res/raw/effect5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/raw/effect5.jpg
--------------------------------------------------------------------------------
/app/src/main/res/raw/effect6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/raw/effect6.jpg
--------------------------------------------------------------------------------
/app/src/main/res/raw/image_effect.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/raw/image_effect.jpg
--------------------------------------------------------------------------------
/app/src/main/res/raw/lead1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/raw/lead1.jpg
--------------------------------------------------------------------------------
/app/src/main/res/raw/lead2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/raw/lead2.jpg
--------------------------------------------------------------------------------
/app/src/main/res/raw/lead3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/raw/lead3.jpg
--------------------------------------------------------------------------------
/app/src/main/res/raw/lead4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/raw/lead4.jpg
--------------------------------------------------------------------------------
/app/src/main/res/raw/welcome.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/app/src/main/res/raw/welcome.jpg
--------------------------------------------------------------------------------
/app/src/main/res/values-sw600dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/values-sw720dp-land/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | 128dp
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 | #60000000
8 | #B0000000
9 | #90ffffff
10 | #C0FFFF00
11 | #0F0
12 | #00FF00
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/ids.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Yilia
5 | Settings
6 | Hello world!
7 | 返回
8 | Yilia
9 | 画布设置
10 | 宽度
11 | 高度
12 | 1024
13 | 常用开关
14 | 画图时保持屏幕常亮
15 | 夜间模式
16 | 摇一摇启动应用
17 | 设置内容
18 | 其他
19 | 用户指引
20 | 关于
21 | 常用模板
22 | 我的作品
23 | 自定义
24 | 退出
25 | 设置
26 | 画 布 预 览
27 | 还木有任何作品哦
28 | 分享到
29 | 温馨提示
30 | 确定
31 | 取消
32 | 是否清空画布?
33 | 已保存
34 | 编辑
35 | 删除
36 | 大小
37 | 透明
38 | 提示
39 | 0/0
40 | 邮件
41 | 短信
42 | 人人网
43 | qq空间
44 | 新浪微博
45 | Camera
46 | 颜值
47 | 分享
48 | CaptureWorksActivity
49 | WebcaidanActivity
50 | LoginActivity
51 |
52 |
53 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
26 |
27 |
31 |
32 |
--------------------------------------------------------------------------------
/app/src/test/java/cn/edu/chd/yitu/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package cn.edu.chd.yitu;
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 |
5 | repositories {
6 | google()
7 | jcenter()
8 | maven {
9 | url "http://mvn.mob.com/android"
10 | }
11 | }
12 | dependencies {
13 | classpath 'com.android.tools.build:gradle:3.0.1'
14 | classpath 'com.mob.sdk:MobSDK:+'
15 | //butterknife注解框架
16 | classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
17 | classpath 'com.jakewharton:butterknife-gradle-plugin:8.2.1'
18 |
19 | // NOTE: Do not place your application dependencies here; they belong
20 | // in the individual module build.gradle files
21 | }
22 | }
23 |
24 | allprojects {
25 | repositories {
26 | google()
27 | jcenter()
28 | }
29 | }
30 |
31 | task clean(type: Delete) {
32 | delete rootProject.buildDir
33 | }
34 |
--------------------------------------------------------------------------------
/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 | android.enableAapt2=false
13 | org.gradle.jvmargs=-Xmx1536m
14 | #android.enableAapt2=false
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nwsuafzq/duya_doodle/f701189e686b8d8864621014af48e359da8a75c3/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sun Apr 22 15:52:42 CST 2018
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-4.1-all.zip
7 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------