diff --git a/app/src/main/java/com/ihewro/android_expression_package/MyDataBase.java b/app/src/main/java/com/ihewro/android_expression_package/MyDataBase.java index 88ef4e8..f99d4a4 100644 --- a/app/src/main/java/com/ihewro/android_expression_package/MyDataBase.java +++ b/app/src/main/java/com/ihewro/android_expression_package/MyDataBase.java @@ -44,7 +44,7 @@ public class MyDataBase { public static boolean addExpressionRecord(Expression expression,File source){ byte[] bytes = fileToCompressedBytes(source); - if (bytes!=null){ + if (bytes == null){ return false; }else { return addExpressionRecord(expression,bytes); diff --git a/app/src/main/java/com/ihewro/android_expression_package/task/GenerateScreenshotTask.java b/app/src/main/java/com/ihewro/android_expression_package/task/GenerateScreenshotTask.java index bc8cb58..4981779 100644 --- a/app/src/main/java/com/ihewro/android_expression_package/task/GenerateScreenshotTask.java +++ b/app/src/main/java/com/ihewro/android_expression_package/task/GenerateScreenshotTask.java @@ -86,7 +86,7 @@ protected Boolean doInBackground(Void... voids) { } date.setText(text); content.setText(this.content); - //生成截图 + //生成截图 v.setDrawingCacheEnabled(true); //measure()实际测量 自己显示在屏幕上的宽高 2个参数,int widthMeasureSpec 和 int heightMeasureSpec表示具体的测量规则。 v.measure(View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED),