Commit 8babbab7 authored by YONG-LIN SU's avatar YONG-LIN SU

添加操作手冊及修正嘉義的資料

parent 24cf5527
......@@ -10,7 +10,7 @@ android {
minSdk 27
targetSdk 30
versionCode 1
versionName "Dev Ver.0.8.0"
versionName "Dev Ver.1.0.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
......
......@@ -12,7 +12,7 @@
"filters": [],
"attributes": [],
"versionCode": 1,
"versionName": "Dev Ver.0.8.0",
"versionName": "Dev Ver.1.0.0",
"outputFile": "app-release.apk"
}
],
......
......@@ -712,16 +712,16 @@ public class Common {
public static Bitmap decodeFile2ScaledBitmap(String path, Activity activity){
BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true; //开启只读取尺寸
options.inJustDecodeBounds = true; // 只讀取圖片尺寸
Bitmap bitmap = BitmapFactory.decodeFile(path, options);
DisplayMetrics DM = new DisplayMetrics();
activity.getWindowManager().getDefaultDisplay().getMetrics(DM);
int size = 1;
if (options.outWidth > DM.widthPixels) {
size = options.outWidth / DM.widthPixels; //计算比例
size = options.outWidth / DM.widthPixels; // 計算比例
}
options.inSampleSize = size; //设置缩放
options.inJustDecodeBounds = false; //关闭只读取尺寸
options.inSampleSize = size; // 設置縮放數
options.inJustDecodeBounds = false; // 關閉讀取圖片尺寸
bitmap = BitmapFactory.decodeFile(path, options);
return bitmap;
}
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment