회의용도 변경 소스
This commit is contained in:
@@ -26,12 +26,12 @@
|
||||
android:allowBackup="true"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
android:fullBackupContent="@xml/backup_rules"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:icon="@drawable/logo"
|
||||
android:label="@string/app_name"
|
||||
android:largeHeap="true"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:roundIcon="@drawable/logo"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.QTagger"
|
||||
android:usesCleartextTraffic="true"
|
||||
|
||||
@@ -4,6 +4,7 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.res.AssetManager;
|
||||
import android.graphics.Bitmap;
|
||||
@@ -16,6 +17,7 @@ import android.graphics.Paint;
|
||||
import android.graphics.Typeface;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.hardware.Camera;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
@@ -27,7 +29,9 @@ import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.googlecode.tesseract.android.ResultIterator;
|
||||
import com.googlecode.tesseract.android.TessBaseAPI;
|
||||
import com.qtagger.CustomPalette.CameraSurfaceView;
|
||||
import com.qtagger.Data.TestEnum;
|
||||
@@ -37,6 +41,16 @@ import com.qtagger.R;
|
||||
import com.qtagger.util.CommonHelper;
|
||||
import com.qtagger.util.DataManager;
|
||||
|
||||
import org.opencv.android.Utils;
|
||||
import org.opencv.core.Core;
|
||||
import org.opencv.core.Mat;
|
||||
import org.opencv.core.MatOfPoint;
|
||||
import org.opencv.core.MatOfPoint2f;
|
||||
import org.opencv.core.Point;
|
||||
import org.opencv.core.Scalar;
|
||||
import org.opencv.core.Size;
|
||||
import org.opencv.imgproc.Imgproc;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
@@ -46,6 +60,8 @@ import java.io.OutputStream;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
@@ -53,6 +69,7 @@ import java.util.stream.Collector;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class CameraActivity extends AppCompatActivity {
|
||||
public Context mContext;
|
||||
ImageView imageView;
|
||||
CameraSurfaceView surfaceView;
|
||||
RelativeLayout pictureLayout;
|
||||
@@ -60,14 +77,29 @@ public class CameraActivity extends AppCompatActivity {
|
||||
String dbTestType;
|
||||
public boolean previewing = false;;
|
||||
DataManager dataManager = DataManager.getInstance();
|
||||
Bitmap resultBitmap;
|
||||
Bitmap resultBitmap,mOrigin;
|
||||
String filename, time,pkgData;
|
||||
String pkgNo = "K042022B000009";
|
||||
|
||||
|
||||
|
||||
|
||||
//무게 인식
|
||||
static {
|
||||
System.loadLibrary("native-lib");
|
||||
}
|
||||
boolean octChecker;
|
||||
TessBaseAPI tessBaseAPI;
|
||||
List<MatOfPoint2f> new_contours;
|
||||
public Mat dot;
|
||||
public String ocr = "d05";
|
||||
public boolean boxFlag = false;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_camera);
|
||||
mContext = this;
|
||||
Intent intent = getIntent();
|
||||
dbTestType = intent.getStringExtra("TestType");
|
||||
pkgData = intent.getStringExtra("PkgData");
|
||||
@@ -79,12 +111,30 @@ public class CameraActivity extends AppCompatActivity {
|
||||
|
||||
octChecker = dbTestType.compareTo(TestType.Weight.name()) == 0;
|
||||
tessBaseAPI = new TessBaseAPI();
|
||||
|
||||
imageView = findViewById(R.id.imageView);
|
||||
surfaceView = findViewById(R.id.surfaceView);
|
||||
pictureLayout = findViewById(R.id.layout_picture);
|
||||
saveLayout = findViewById(R.id.layout_saveChecker);
|
||||
|
||||
if(octChecker) {
|
||||
imageView.setVisibility(View.VISIBLE);
|
||||
surfaceView.setVisibility(View.GONE);
|
||||
AssetManager am = mContext.getAssets();
|
||||
InputStream inOrigin = null;
|
||||
try {
|
||||
inOrigin = am.open("weight06.jpg");
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
BitmapFactory.Options optionsOrigin = new BitmapFactory.Options();
|
||||
|
||||
//origin set
|
||||
mOrigin = BitmapFactory.decodeStream(inOrigin, null, optionsOrigin);
|
||||
imageView.setImageBitmap(mOrigin);
|
||||
}
|
||||
|
||||
|
||||
Button button = findViewById(R.id.button);
|
||||
button.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
@@ -149,7 +199,7 @@ public class CameraActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
private void viewToggle(){
|
||||
if(imageView.getVisibility() == View.GONE)
|
||||
if(saveLayout.getVisibility() == View.GONE)
|
||||
{
|
||||
imageView.setVisibility(View.VISIBLE);
|
||||
surfaceView.setVisibility(View.GONE);
|
||||
@@ -167,79 +217,739 @@ public class CameraActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
public void capture(){
|
||||
surfaceView.capture(new Camera.PictureCallback() {
|
||||
@RequiresApi(api = Build.VERSION_CODES.N)
|
||||
@Override
|
||||
public void onPictureTaken(byte[] data, Camera camera) {
|
||||
String pkgNo = "K042022B000009";
|
||||
if(dataManager.selPkg != null)
|
||||
pkgNo = dataManager.selPkg.getPKG_NO();
|
||||
|
||||
if(dataManager.selPkg != null)
|
||||
pkgNo = dataManager.selPkg.getPKG_NO();
|
||||
//bytearray 형식으로 전달
|
||||
//이걸이용해서 이미지뷰로 보여주거나 파일로 저장
|
||||
BitmapFactory.Options options = new BitmapFactory.Options();
|
||||
//options.inSampleSize = 8; // 1/8사이즈로 보여주기
|
||||
Bitmap bitmap = BitmapFactory.decodeByteArray(data, 0, data.length); //data 어레이 안에 있는 데이터 불러와서 비트맵에 저장
|
||||
Date currentTime = Calendar.getInstance().getTime();
|
||||
time = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss", Locale.getDefault()).format(currentTime);
|
||||
filename = time+ ".jpg";
|
||||
|
||||
|
||||
int width = bitmap.getWidth();
|
||||
int height = bitmap.getHeight();
|
||||
int newWidth = 200;
|
||||
int newHeight = 200;
|
||||
|
||||
float scaleWidth = ((float) newWidth) / width;
|
||||
float scaleHeight = ((float) newHeight) / height;
|
||||
if(octChecker){
|
||||
|
||||
int width = mOrigin.getWidth();
|
||||
int height = mOrigin.getHeight();
|
||||
Matrix matrix = new Matrix();
|
||||
Bitmap resizedBitmap = Bitmap.createBitmap(mOrigin, 0,0,width,height,matrix,true);
|
||||
resizedBitmap = resizedBitmap.copy(Bitmap.Config.ARGB_8888,true);
|
||||
imageAfter(resizedBitmap);
|
||||
viewToggle();
|
||||
|
||||
//matrix.postScale(scaleWidth, scaleHeight);
|
||||
matrix.postRotate(90);
|
||||
}
|
||||
else {
|
||||
surfaceView.capture(new Camera.PictureCallback() {
|
||||
@RequiresApi(api = Build.VERSION_CODES.N)
|
||||
@Override
|
||||
public void onPictureTaken(byte[] data, Camera camera) {
|
||||
|
||||
Bitmap resizedBitmap = Bitmap.createBitmap(bitmap, 0,0,width,height,matrix,true);
|
||||
BitmapFactory.Options options = new BitmapFactory.Options();
|
||||
//options.inSampleSize = 8; // 1/8사이즈로 보여주기
|
||||
Bitmap bitmap = BitmapFactory.decodeByteArray(data, 0, data.length); //data 어레이 안에 있는 데이터 불러와서 비트맵에 저장
|
||||
int width = bitmap.getWidth();
|
||||
int height = bitmap.getHeight();
|
||||
Matrix matrix = new Matrix();
|
||||
matrix.postRotate(90);
|
||||
Bitmap resizedBitmap = Bitmap.createBitmap(bitmap, 0,0,width,height,matrix,true);
|
||||
imageAfter(resizedBitmap);
|
||||
|
||||
if(octChecker){
|
||||
String dir = getFilesDir() + "/tesseract";
|
||||
if(checkLanguageFile(dir+"/tessdata","d05"))
|
||||
camera.startPreview();
|
||||
viewToggle();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void imageAfter(Bitmap bitmap){
|
||||
|
||||
Date currentTime = Calendar.getInstance().getTime();
|
||||
time = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss", Locale.getDefault()).format(currentTime);
|
||||
filename = time+ ".jpg";
|
||||
|
||||
Matrix matrix = new Matrix();
|
||||
|
||||
if(octChecker){
|
||||
mOrigin = bitmap;
|
||||
mOrigin = getRecognitionDigit();
|
||||
|
||||
}
|
||||
|
||||
if(bitmap.getWidth() > 640)
|
||||
{
|
||||
bitmap = resizeBitmap(bitmap,640);
|
||||
}
|
||||
|
||||
|
||||
Canvas cs = new Canvas(bitmap);
|
||||
|
||||
Paint tPaint = new Paint();
|
||||
tPaint.setTextSize(20);
|
||||
tPaint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD));
|
||||
tPaint.setColor(Color.WHITE);
|
||||
tPaint.setStyle(Paint.Style.FILL);
|
||||
tPaint.setTextAlign(Paint.Align.LEFT);
|
||||
cs.drawText(dbTestType,10f,50f,tPaint);
|
||||
tPaint.setTextAlign(Paint.Align.RIGHT);
|
||||
cs.drawText(time,bitmap.getWidth()-10f,50f,tPaint);
|
||||
cs.drawText(pkgNo,bitmap.getWidth()-10f,20+50f,tPaint);
|
||||
|
||||
String imgTitle = null;
|
||||
if(dbTestType.contains("Surface")) {
|
||||
imgTitle = "표면방사선량 값 : 0.04 μSv/hr";
|
||||
}
|
||||
else if(dbTestType.contains("M1")){
|
||||
imgTitle = "1m방사선량 값 : 0.04 μSv/hr";
|
||||
}
|
||||
else if(dbTestType.compareTo(TestType.Weight.name()) == 0){
|
||||
if(pkgData.isEmpty())
|
||||
{
|
||||
imgTitle = "무게 : 10.9 kg";
|
||||
}
|
||||
else
|
||||
{
|
||||
imgTitle = "무게 : "+ pkgData+"kg" ;
|
||||
}
|
||||
|
||||
}
|
||||
else if(dbTestType.compareTo(TestType.Filling.name()) == 0){
|
||||
imgTitle = "채움률 : " + pkgData + "%";
|
||||
}
|
||||
|
||||
|
||||
if(imgTitle != null) {
|
||||
|
||||
|
||||
tPaint.setTextAlign(Paint.Align.CENTER);
|
||||
tPaint.setTextSize(32);
|
||||
cs.drawText(imgTitle, bitmap.getWidth() / 2, 115f, tPaint);
|
||||
tPaint.setColor(Color.RED);
|
||||
tPaint.setStyle(Paint.Style.STROKE);
|
||||
tPaint.setStrokeWidth(3);
|
||||
cs.drawRect(20, 80, bitmap.getWidth() - 20f, 130, tPaint);
|
||||
}
|
||||
|
||||
imageView.setImageDrawable(new BitmapDrawable(bitmap));//이미지뷰에 사진 보여주기
|
||||
resultBitmap = bitmap;
|
||||
|
||||
}
|
||||
|
||||
static public Bitmap resizeBitmap(Bitmap original,int resizeWidth ) {
|
||||
|
||||
double aspectRatio = (double) original.getHeight() / (double) original.getWidth();
|
||||
int targetHeight = (int) (resizeWidth * aspectRatio);
|
||||
Bitmap result = Bitmap.createScaledBitmap(original, resizeWidth, targetHeight, false);
|
||||
if (result != original) {
|
||||
original.recycle();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private class AsyncAnalysis extends AsyncTask<Bitmap, Integer, Bitmap> {
|
||||
@Override
|
||||
protected Bitmap doInBackground(Bitmap... bitmap) {
|
||||
|
||||
Bitmap result = getRecognitionDigit();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
protected void onPostExecute(Bitmap result) {
|
||||
//bFlag = true;
|
||||
|
||||
if(result != null)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// Toast.makeText(mContext, "이미지 반환 오류.", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Bitmap getRecognitionDigit() {
|
||||
Bitmap bitmap = mOrigin;
|
||||
Bitmap result = null;
|
||||
|
||||
if(mOrigin == null)
|
||||
{
|
||||
Log.e("error","mOrigin null");
|
||||
return null;
|
||||
}
|
||||
|
||||
Mat ori = new Mat();
|
||||
Utils.bitmapToMat(bitmap, ori);
|
||||
|
||||
|
||||
|
||||
double rt = (double)(ori.width() / 1920);
|
||||
|
||||
Log.i("size", rt+", " + ori.width() + ", " + ori.height());
|
||||
if (rt > 0)
|
||||
{
|
||||
Imgproc.resize(ori, ori, new Size(ori.width() / rt, ori.height() / rt));
|
||||
}
|
||||
|
||||
Log.i("size", rt+", " + ori.width() + ", " + ori.height());
|
||||
|
||||
Mat binary = new Mat();
|
||||
|
||||
|
||||
MatOfPoint2f pt = findBigEdge(ori);
|
||||
|
||||
if(pt == null)
|
||||
{
|
||||
Log.e("error","pt 0");
|
||||
return null;
|
||||
}
|
||||
|
||||
Mat core = warp(ori, pt);
|
||||
|
||||
int blurH = (int)(core.height() * 0.05);
|
||||
blurH = blurH % 2 == 0 ? blurH -1 : blurH;
|
||||
Log.i("blurH",blurH+"");
|
||||
Imgproc.GaussianBlur(core, core, new Size(1,blurH), 1, 5, 4);
|
||||
|
||||
//노이즈 제거 로직
|
||||
Mat kernel = new Mat();
|
||||
kernel = Imgproc.getStructuringElement(Imgproc.MORPH_RECT,new Size(5, 5));
|
||||
Imgproc.morphologyEx(core, core, Imgproc.MORPH_OPEN, kernel);
|
||||
|
||||
// double rtt = core.width() / 480;
|
||||
double rtt = core.width() / 400;
|
||||
Log.i("rtt", rtt+"");
|
||||
Log.i("core", core.width() +"," + core.height() + "," + core.width() / rtt + "," + core.height() / rtt );
|
||||
|
||||
if(rtt == 0.0)
|
||||
{
|
||||
Log.e("error","rtt 0");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Imgproc.resize(core, core, new Size(core.width() / rtt, core.height() / rtt));
|
||||
//일반적인 경우
|
||||
{
|
||||
//안드로이드 같은경우는 기본 RGB로 되어있기때문에 BGR로 변환후 작업한다.
|
||||
Imgproc.cvtColor(core, core, Imgproc.COLOR_RGB2BGR);
|
||||
Imgproc.cvtColor(core, core, Imgproc.COLOR_BGR2HSV);
|
||||
|
||||
Mat paper0 = new Mat();
|
||||
Mat paper1 = new Mat();
|
||||
|
||||
Core.inRange(core, new Scalar(0, 30, 200), new Scalar(60, 255, 255), paper0);
|
||||
Core.inRange(core, new Scalar(130, 30, 200), new Scalar(180, 255, 255), paper1);
|
||||
Core.bitwise_or(paper0, paper1, core);
|
||||
|
||||
Imgproc.threshold(core, binary, 190, 255, Imgproc.THRESH_BINARY_INV);
|
||||
|
||||
//텍스트 살짝 회전
|
||||
binary = DisplayWarp(binary);
|
||||
|
||||
dot = binary;
|
||||
|
||||
result = Bitmap.createBitmap(binary.cols(), binary.rows(), Bitmap.Config.ARGB_8888);
|
||||
Utils.matToBitmap(binary, result);
|
||||
|
||||
|
||||
{
|
||||
TessBaseAPI tessBaseAPI = new TessBaseAPI();
|
||||
|
||||
String dir = getFilesDir() + "/tesseract";
|
||||
|
||||
Log.i("testocr",ocr);
|
||||
if(checkLanguageFile(dir+"/tessdata", ocr))
|
||||
{
|
||||
tessBaseAPI.init(dir, ocr);
|
||||
|
||||
tessBaseAPI.setPageSegMode(TessBaseAPI.PageSegMode.PSM_SINGLE_LINE); // 그외엔 별로 소용없음
|
||||
tessBaseAPI.setVariable(TessBaseAPI.VAR_CHAR_BLACKLIST, ",!?@#$%&*()<>_-+=/:;'\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz");
|
||||
tessBaseAPI.setVariable(TessBaseAPI.VAR_CHAR_WHITELIST, "1234567890.");
|
||||
tessBaseAPI.setVariable("classify_bln_numeric_mode", "1");
|
||||
}
|
||||
|
||||
tessBaseAPI.setImage(result);
|
||||
Log.i("result text", tessBaseAPI.getUTF8Text());
|
||||
String str = tessBaseAPI.getUTF8Text();
|
||||
//tessBaseAPI.beginDocument();
|
||||
|
||||
str.replace(" ", "");
|
||||
char[] ch = str.toCharArray();
|
||||
|
||||
if(ch.length > 0)
|
||||
{
|
||||
Paint p = new Paint();
|
||||
p.setStyle(Paint.Style.STROKE);
|
||||
p.setAntiAlias(true);
|
||||
p.setFilterBitmap(true);
|
||||
p.setDither(true);
|
||||
p.setColor(Color.RED);
|
||||
|
||||
Canvas c = new Canvas(result);
|
||||
|
||||
//영역추출하기
|
||||
ResultIterator iterator = tessBaseAPI.getResultIterator();
|
||||
int[] lastBoundingBox;
|
||||
ArrayList< android.graphics.Rect> charBoxes = new ArrayList< android.graphics.Rect>();
|
||||
|
||||
iterator.begin();
|
||||
do {
|
||||
//박스 정보를 추가 및 출력
|
||||
lastBoundingBox =iterator.getBoundingBox(TessBaseAPI.PageIteratorLevel.RIL_SYMBOL);
|
||||
android.graphics.Rect lastRectBox = new android.graphics.Rect(lastBoundingBox[0], lastBoundingBox[1],
|
||||
lastBoundingBox[2], lastBoundingBox[3]);
|
||||
charBoxes.add(lastRectBox);
|
||||
|
||||
if(boxFlag)
|
||||
c.drawRect(lastRectBox, p);
|
||||
|
||||
} while (iterator.next(TessBaseAPI.PageIteratorLevel.RIL_SYMBOL));
|
||||
iterator.delete();
|
||||
|
||||
//좌표정보 및 후보정
|
||||
for (int i = 0; i<charBoxes.size();i++)
|
||||
{
|
||||
tessBaseAPI.init(dir, "d05");
|
||||
|
||||
tessBaseAPI.setPageSegMode(TessBaseAPI.PageSegMode.PSM_SINGLE_LINE);
|
||||
tessBaseAPI.setVariable(TessBaseAPI.VAR_CHAR_BLACKLIST, ",!?@#$%&*()<>_-+=/:;'\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz");
|
||||
tessBaseAPI.setVariable(TessBaseAPI.VAR_CHAR_WHITELIST, "1234567890.");
|
||||
tessBaseAPI.setVariable("classify_bln_numeric_mode", "1");
|
||||
tessBaseAPI.setImage(resizedBitmap);
|
||||
String resultText = tessBaseAPI.getUTF8Text();
|
||||
Log.i("Tess",resultText);
|
||||
Log.i("tt", ch[i] + "");
|
||||
if(ch[i] == '8' || ch[i] == '0')
|
||||
{
|
||||
Log.i("tt11", ch[i] + "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Canvas cs = new Canvas(resizedBitmap);
|
||||
|
||||
Paint tPaint = new Paint();
|
||||
tPaint.setTextSize(20);
|
||||
tPaint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD));
|
||||
tPaint.setColor(Color.BLACK);
|
||||
tPaint.setStyle(Paint.Style.FILL);
|
||||
cs.drawText(dbTestType,10f,20f,tPaint);
|
||||
cs.drawText(time,10f,20+20f,tPaint);
|
||||
cs.drawText(pkgNo,10f,40+20f,tPaint);
|
||||
|
||||
//CommonHelper.DefaultImageFolderPath
|
||||
pkgData = str;
|
||||
}
|
||||
|
||||
|
||||
BitmapDrawable bmd = new BitmapDrawable(resizedBitmap);
|
||||
imageView.setImageDrawable(new BitmapDrawable(resizedBitmap));//이미지뷰에 사진 보여주기
|
||||
resultBitmap = resizedBitmap;
|
||||
camera.startPreview();
|
||||
viewToggle();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public MatOfPoint2f findBigEdge(Mat src)
|
||||
// public Mat findBigEdge(Mat src)
|
||||
{
|
||||
Mat gray = new Mat();
|
||||
Mat binary = new Mat();
|
||||
Mat gaussian_blur = new Mat();
|
||||
Mat edged = new Mat();
|
||||
|
||||
Imgproc.cvtColor(src, gray, Imgproc.COLOR_RGB2GRAY);
|
||||
Imgproc.threshold(gray, binary, 100, 255, Imgproc.THRESH_BINARY);
|
||||
Imgproc.GaussianBlur(binary, gaussian_blur, new Size(37,37), 1, 1, 4);
|
||||
Imgproc.Canny(gaussian_blur, edged, 75, 200);
|
||||
|
||||
List<MatOfPoint> contours = new ArrayList<MatOfPoint>();
|
||||
Mat hierarchy = new Mat();
|
||||
|
||||
Imgproc.findContours(edged, contours, hierarchy, Imgproc.RETR_TREE, Imgproc.CHAIN_APPROX_SIMPLE);
|
||||
|
||||
new_contours = new ArrayList<MatOfPoint2f>();
|
||||
List<MatOfPoint> largest_contours = new ArrayList<MatOfPoint>();
|
||||
List<Double> areas = new ArrayList<Double>();
|
||||
|
||||
|
||||
int count = -50000;
|
||||
while(largest_contours.size() == 0)
|
||||
{
|
||||
Log.i("count", count+"");
|
||||
|
||||
for(int i = 0; 0<=i; i = (int) hierarchy.get(0, i)[0]) {
|
||||
|
||||
MatOfPoint matOfPoint = contours.get(i);
|
||||
MatOfPoint2f matOfPoint2f = new MatOfPoint2f(matOfPoint.toArray());
|
||||
MatOfPoint2f approx = new MatOfPoint2f();
|
||||
double epsilon = Imgproc.arcLength(matOfPoint2f, true);
|
||||
|
||||
Imgproc.approxPolyDP(matOfPoint2f, approx, 0.03 * epsilon, true);
|
||||
// Imgproc.approxPolyDP(matOfPoint2f, approx, 0.003 * epsilon, true);
|
||||
|
||||
double area = Imgproc.contourArea(approx, true);
|
||||
|
||||
// if (epsilon > src.width() / 2 && area < -30000) //1, 2, 3, 4, 6번 샘플만, 5번샘플은 아예 못찾음 // 디폴트
|
||||
if (epsilon > src.width() / 2 && area < count) //1, 2, 3, 4, 6번 샘플만, 5번샘플은 아예 못찾음
|
||||
{
|
||||
Log.i("findBigEdge", "area : " + area + ", epsilon : " + epsilon + ", width : " + src.width());
|
||||
|
||||
areas.add(area);
|
||||
new_contours.add(approx);
|
||||
largest_contours.add(matOfPoint);
|
||||
// Imgproc.drawContours(edged, largest_contours, -1, new Scalar(0, 255, 0), 3);
|
||||
}
|
||||
}
|
||||
|
||||
if(largest_contours.size() == 0)
|
||||
{
|
||||
count = count + 1000;
|
||||
}
|
||||
|
||||
if(largest_contours.size() > 0)
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
// for(int i = 0; i<largest_contours.size(); i++)
|
||||
// {
|
||||
// Log.i("gdgdgdd", "area : " + areas.get(i));
|
||||
// }
|
||||
|
||||
Log.i("findBigEdge", "contours : " + contours.size());
|
||||
Log.i("findBigEdge", "new_contours : " + new_contours.size());
|
||||
Log.i("findBigEdge", "largest_contours : " + largest_contours.size());
|
||||
|
||||
List<MatOfPoint2f> calc_contours = new ArrayList<MatOfPoint2f>();
|
||||
|
||||
for(int i = 0; i < new_contours.size(); i ++)
|
||||
{
|
||||
MatOfPoint2f pt = new_contours.get(i);
|
||||
|
||||
Point[] temp = new Point[4];
|
||||
|
||||
Point TopLeft = null;
|
||||
Point TopRight = null;
|
||||
|
||||
Point BottomLeft = null;
|
||||
Point BottomRight = null;
|
||||
|
||||
List<Point> top = pt.toList();
|
||||
List<Point> bottom = pt.toList();
|
||||
|
||||
////////harf찾기 위한 정렬처리
|
||||
//y축 오름차순
|
||||
Collections.sort(top, new Comparator<Point>() {
|
||||
@Override
|
||||
public int compare(Point o1, Point o2) {
|
||||
if(o1.y < o2.y) return -1;
|
||||
else if(o1.y > o2.y) return 1;
|
||||
else return 0;
|
||||
}
|
||||
});
|
||||
|
||||
//y축 내림차순
|
||||
Collections.sort(bottom, new Comparator<Point>() {
|
||||
@Override
|
||||
public int compare(Point o1, Point o2) {
|
||||
if(o1.y < o2.y) return 1;
|
||||
else if(o1.y > o2.y) return -1;
|
||||
else return 0;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
double half_Y = (bottom.get(0).y + top.get(0).y) / 2;
|
||||
|
||||
// Log.i("findBigEdge", "half_Y : " + half_Y);
|
||||
|
||||
// for(int j = 0; j<top.size(); j++)
|
||||
// {
|
||||
// Log.i(" top xy!! : ", "x : " +top.get(j).x + ", y : " + top.get(j).y);
|
||||
// }
|
||||
// for(int j = 0; j<top.size(); j++)
|
||||
// {
|
||||
// Log.i(" bottom xy!! : ", "x : " +bottom.get(j).x + ", y : " + bottom.get(j).y);
|
||||
// }
|
||||
|
||||
//y가 half_y보다 작은것중에 x 첫번째 작은것
|
||||
Collections.sort(top, new Comparator<Point>() {
|
||||
@Override
|
||||
public int compare(Point o1, Point o2) {
|
||||
if(o1.y < half_Y)
|
||||
{
|
||||
if(o1.x < o2.x) return -1;
|
||||
else if(o1.x > o2.x) return 1;
|
||||
else return 0;
|
||||
}
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
});
|
||||
|
||||
// for(int j = 0; j<top.size(); j++) Log.i(" top xy!! : ", "x : " +top.get(j).x + ", y : " + top.get(j).y);
|
||||
// Log.i("test", "---------------------");
|
||||
TopLeft = top.get(0);
|
||||
|
||||
|
||||
//y가 half_y보다 작은것중에 x 첫번째 큰것
|
||||
Collections.sort(top, new Comparator<Point>() {
|
||||
@Override
|
||||
public int compare(Point o1, Point o2) {
|
||||
if(o1.y < half_Y)
|
||||
{
|
||||
if(o1.x < o2.x) return 1;
|
||||
else if(o1.x > o2.x) return -1;
|
||||
else return 0;
|
||||
}
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
});
|
||||
|
||||
// for(int j = 0; j<top.size(); j++) Log.i(" top xy!! : ", "x : " +top.get(j).x + ", y : " + top.get(j).y);
|
||||
// Log.i("test", "---------------------");
|
||||
TopRight = top.get(0);
|
||||
|
||||
|
||||
//y가 half_y보다 큰것중에 x 첫번째 작은것
|
||||
Collections.sort(bottom, new Comparator<Point>() {
|
||||
@Override
|
||||
public int compare(Point o1, Point o2) {
|
||||
if(o1.y > half_Y)
|
||||
{
|
||||
if(o1.x < o2.x) return -1;
|
||||
else if(o1.x > o2.x) return 1;
|
||||
else return 0;
|
||||
}
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
});
|
||||
|
||||
// for(int j = 0; j<top.size(); j++) Log.i(" bottom xy!! : ", "x : " +bottom.get(j).x + ", y : " + bottom.get(j).y);
|
||||
// Log.i("test", "---------------------");
|
||||
BottomLeft = bottom.get(0);
|
||||
|
||||
|
||||
//y가 half_y보다 큰것중에 x 첫번째 작은것
|
||||
Collections.sort(bottom, new Comparator<Point>() {
|
||||
@Override
|
||||
public int compare(Point o1, Point o2) {
|
||||
if(o1.y > half_Y)
|
||||
{
|
||||
if(o1.x < o2.x) return 1;
|
||||
else if(o1.x > o2.x) return -1;
|
||||
else return 0;
|
||||
}
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
});
|
||||
|
||||
// for(int j = 0; j<top.size(); j++) Log.i(" bottom xy!! : ", "x : " +bottom.get(j).x + ", y : " + bottom.get(j).y);
|
||||
// Log.i("test", "---------------------");
|
||||
BottomRight = bottom.get(0);
|
||||
|
||||
|
||||
temp[0] = TopLeft;
|
||||
temp[1] = TopRight;
|
||||
temp[2] = BottomRight;
|
||||
temp[3] = BottomLeft;
|
||||
|
||||
// Log.i("TopLeft", "x : " + TopLeft.x + ", y : " + TopLeft.y);
|
||||
// Log.i("TopRight", "x : " + TopRight.x + ", y : " + TopRight.y);
|
||||
// Log.i("BottomLeft", "x : " + BottomLeft.x + ", y : " + BottomLeft.y);
|
||||
// Log.i("BottomRight", "x : " + BottomRight.x + ", y : " + BottomRight.y);
|
||||
|
||||
|
||||
double w1 = Math.sqrt(Math.pow(BottomRight.x - BottomLeft.x, 2)
|
||||
+ Math.pow(BottomRight.y - BottomLeft.y, 2));
|
||||
double w2 = Math.sqrt(Math.pow(TopRight.x - TopLeft.x, 2)
|
||||
+ Math.pow(TopRight.y - TopLeft.y, 2));
|
||||
|
||||
double h1 = Math.sqrt(Math.pow(TopRight.x - BottomRight.x, 2)
|
||||
+ Math.pow(TopRight.y - BottomRight.y, 2));
|
||||
double h2 = Math.sqrt(Math.pow(TopLeft.x - BottomLeft.x, 2)
|
||||
+ Math.pow(TopLeft.y - BottomLeft.y, 2));
|
||||
|
||||
float mw = (float)Math.max(w1, w2);
|
||||
float mh = (float)Math.max(h1, h2);
|
||||
|
||||
double rt = mw / mh;
|
||||
|
||||
// Log.i("test", rt+"");
|
||||
// if (4.3 < rt && rt < 5.7)
|
||||
{
|
||||
double u = (int)(mh * 0.07);
|
||||
|
||||
temp[0].x = temp[0].x - u;
|
||||
temp[0].y = temp[0].y - u;
|
||||
|
||||
temp[1].x = temp[1].x + u;
|
||||
temp[1].y = temp[1].y - u;
|
||||
|
||||
temp[2].x = temp[2].x + u;
|
||||
temp[2].y = temp[2].y + u;
|
||||
|
||||
temp[3].x = temp[3].x - u;
|
||||
temp[3].y = temp[3].y + u;
|
||||
|
||||
MatOfPoint2f mop= new MatOfPoint2f(temp);
|
||||
calc_contours.add(mop);
|
||||
}
|
||||
}
|
||||
|
||||
Log.i("calc ", calc_contours.size() + "");
|
||||
|
||||
// Imgproc.drawContours(src, largest_contours, -1, new Scalar(0, 0, 255), 5);
|
||||
//
|
||||
// return src;
|
||||
|
||||
|
||||
Collections.sort(calc_contours, new Comparator<MatOfPoint2f>() {
|
||||
@Override
|
||||
public int compare(MatOfPoint2f o1, MatOfPoint2f o2) {
|
||||
|
||||
double t1 = Imgproc.contourArea(o1);
|
||||
double t2 = Imgproc.contourArea(o2);
|
||||
|
||||
if(t1 < t2) return 1;
|
||||
else if(t1 < t2) return -1;
|
||||
else return 0;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
if(calc_contours.size() > 0)
|
||||
return calc_contours.get(0);
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
public Mat warp(Mat source, MatOfPoint2f pt)
|
||||
{
|
||||
Point TopLeft = null;
|
||||
Point TopRight = null;
|
||||
|
||||
Point BottomLeft = null;
|
||||
Point BottomRight = null;
|
||||
|
||||
List<Point> points = pt.toList();
|
||||
|
||||
// for(int i = 0; i<points.size(); i++)
|
||||
// {
|
||||
// Log.i("xy! : ", "x : " +points.get(i).x + ", y : " + points.get(i).y);
|
||||
// }
|
||||
|
||||
//정렬처리
|
||||
//if(points.size() == 4)
|
||||
{
|
||||
|
||||
//y축 오름차순
|
||||
Collections.sort(points, new Comparator<Point>() {
|
||||
@Override
|
||||
public int compare(Point o1, Point o2) {
|
||||
if(o1.y < o2.y) return -1;
|
||||
else if(o1.y > o2.y) return 1;
|
||||
else return 0;
|
||||
}
|
||||
});
|
||||
|
||||
List<Point> top = new ArrayList<Point>();
|
||||
top.add(points.get(0));
|
||||
top.add(points.get(1));
|
||||
List<Point> bottom = new ArrayList<Point>();
|
||||
bottom.add(points.get(2));
|
||||
bottom.add(points.get(3));
|
||||
|
||||
//y축 오름차순
|
||||
Collections.sort(bottom, new Comparator<Point>() {
|
||||
@Override
|
||||
public int compare(Point o1, Point o2) {
|
||||
if(o1.x < o2.x) return -1;
|
||||
else if(o1.x > o2.x) return 1;
|
||||
else return 0;
|
||||
}
|
||||
});
|
||||
|
||||
//y축 오름차순
|
||||
Collections.sort(top, new Comparator<Point>() {
|
||||
@Override
|
||||
public int compare(Point o1, Point o2) {
|
||||
if(o1.x < o2.x) return -1;
|
||||
else if(o1.x > o2.x) return 1;
|
||||
else return 0;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
TopLeft = top.get(0);
|
||||
TopRight = top.get(1);
|
||||
|
||||
BottomLeft = bottom.get(0);
|
||||
BottomRight = bottom.get(1);
|
||||
}
|
||||
|
||||
// for(int i = 0; i<points.size(); i++)
|
||||
// {
|
||||
// Log.i("xy!! : ", "x : " +points.get(i).x + ", y : " + points.get(i).y);
|
||||
// }
|
||||
|
||||
double w1 = Math.sqrt(Math.pow(BottomRight.x - BottomLeft.x, 2)
|
||||
+ Math.pow(BottomRight.y - BottomLeft.y, 2));
|
||||
double w2 = Math.sqrt(Math.pow(TopRight.x - TopLeft.x, 2)
|
||||
+ Math.pow(TopRight.y - TopLeft.y, 2));
|
||||
|
||||
double h1 = Math.sqrt(Math.pow(TopRight.x - BottomRight.x, 2)
|
||||
+ Math.pow(TopRight.y - BottomRight.y, 2));
|
||||
double h2 = Math.sqrt(Math.pow(TopLeft.x - BottomLeft.x, 2)
|
||||
+ Math.pow(TopLeft.y - BottomLeft.y, 2));
|
||||
|
||||
float mw = (float)Math.max(w1, w2);
|
||||
float mh = (float)Math.max(h1, h2);
|
||||
|
||||
// float mw = 100;
|
||||
// float mh = (float)mw * 1.414f;
|
||||
|
||||
Point[] src = new Point[4];
|
||||
Point[] dst = new Point[4];
|
||||
src[0] = TopLeft;
|
||||
src[1] = TopRight;
|
||||
src[2] = BottomRight;
|
||||
src[3] = BottomLeft;
|
||||
|
||||
|
||||
// Log.i("TopLeft", "x : " + TopLeft.x + ", y : " + TopLeft.y);
|
||||
// Log.i("TopRight", "x : " + TopRight.x + ", y : " + TopRight.y);
|
||||
// Log.i("BottomLeft", "x : " + BottomLeft.x + ", y : " + BottomLeft.y);
|
||||
// Log.i("BottomRight", "x : " + BottomRight.x + ", y : " + BottomRight.y);
|
||||
// Log.i("mw", ""+mw);
|
||||
// Log.i("mh", ""+mh);
|
||||
|
||||
dst[0] = new Point(0, 0);
|
||||
dst[1] = new Point(mw - 1, 0);
|
||||
dst[2] = new Point(mw - 1, mh - 1);
|
||||
dst[3] = new Point(0, mh - 1);
|
||||
|
||||
Mat warpMat = Imgproc.getPerspectiveTransform(new MatOfPoint2f(src), new MatOfPoint2f(dst));
|
||||
Mat warpDst = Mat.zeros( source.rows(), source.cols(), source.type() );
|
||||
|
||||
Imgproc.warpPerspective(source, warpDst, warpMat, new Size(mw, mh));
|
||||
|
||||
return warpDst;
|
||||
}
|
||||
|
||||
public Mat DisplayWarp(Mat binary)
|
||||
{
|
||||
Point[] warp1 = new Point[4];
|
||||
Point[] warp2 = new Point[4];
|
||||
|
||||
//jjh
|
||||
// double d = (int)(binary.height() * 0.175);
|
||||
double d = (int)(binary.height() * 0.1);
|
||||
// double d = (int)(binary.height() * 0.125);
|
||||
// double d = (int)(binary.height() * 0.105);
|
||||
|
||||
Log.i("testheight", binary.height() + "," + d);
|
||||
// d = 21;
|
||||
|
||||
warp1[0] = new Point(d, 0);
|
||||
warp1[1] = new Point(binary.width(), 0);
|
||||
warp1[2] = new Point(binary.width() - d, binary.height());
|
||||
warp1[3] = new Point(0, binary.height());
|
||||
|
||||
warp2[0] = new Point(0, 0);
|
||||
warp2[1] = new Point(binary.width(), 0);
|
||||
warp2[2] = new Point(binary.width(), binary.height());
|
||||
warp2[3] = new Point(0, binary.height());
|
||||
|
||||
|
||||
|
||||
|
||||
Mat warpMat = Imgproc.getPerspectiveTransform(new MatOfPoint2f(warp1), new MatOfPoint2f(warp2));
|
||||
Mat warpDst = Mat.zeros( binary.rows(), binary.cols(), binary.type() );
|
||||
|
||||
Imgproc.warpPerspective(binary, warpDst, warpMat, new Size(binary.width(), binary.height()));
|
||||
|
||||
return warpDst;
|
||||
}
|
||||
|
||||
public void saveBitmap(Bitmap bmp, String fileName){
|
||||
|
||||
@@ -67,7 +67,7 @@ public class MoreActivity extends AppCompatActivity {
|
||||
//테스트
|
||||
|
||||
/*
|
||||
syncTestEnum = TestEnum.발생지특성검사;
|
||||
syncTestEnum = TestEnum.발생지특성규명;
|
||||
|
||||
Intent intent = new Intent(getApplicationContext(), SyncActivity.class);
|
||||
intent.putExtra("TestEnumLabel",syncTestEnum.label());
|
||||
@@ -78,7 +78,7 @@ public class MoreActivity extends AppCompatActivity {
|
||||
//데이터 가져오기
|
||||
/*
|
||||
new Thread(() ->{
|
||||
OracleGet(TestEnum.발생지특성검사);
|
||||
OracleGet(TestEnum.발생지특성규명);
|
||||
OracleGet(TestEnum.인수검사);
|
||||
OracleGet(TestEnum.예비검사);
|
||||
OracleGet(TestEnum.처분검사);
|
||||
|
||||
@@ -74,10 +74,10 @@ public class SelectFragment extends Fragment {
|
||||
Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.fragment_select,container,false);
|
||||
|
||||
view.findViewById(R.id.button_발생지특성검사).setOnClickListener(new View.OnClickListener() {
|
||||
view.findViewById(R.id.button_발생지특성규명).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dataManager.testEnum = TestEnum.발생지특성검사;
|
||||
dataManager.testEnum = TestEnum.발생지특성규명;
|
||||
callFragment();
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.qtagger.Activity.Search;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
@@ -9,9 +10,12 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.qtagger.Activity.SearchActivity;
|
||||
import com.qtagger.Database.PKG;
|
||||
import com.qtagger.R;
|
||||
import com.qtagger.util.DataManager;
|
||||
import com.wsmr.lib.dev.ATScanManager;
|
||||
import com.wsmr.lib.dev.ATScanner;
|
||||
import com.wsmr.lib.dev.barcode.type.BarcodeType;
|
||||
@@ -25,6 +29,9 @@ import com.wsmr.lib.dev.event.BarcodeEventListener;
|
||||
*/
|
||||
public class BarcodeFragment extends Fragment {
|
||||
|
||||
DataManager dataManager = DataManager.getInstance();
|
||||
private String barcodeStr = "";
|
||||
private Context context;
|
||||
// TODO: Rename parameter arguments, choose names that match
|
||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||
private static final String ARG_PARAM1 = "param1";
|
||||
@@ -70,6 +77,7 @@ public class BarcodeFragment extends Fragment {
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.fragment_barcode, container, false);
|
||||
context = container.getContext();
|
||||
try {
|
||||
barcodeScanner = ATScanManager.getInstance();
|
||||
}catch (Exception ex)
|
||||
@@ -84,9 +92,29 @@ public class BarcodeFragment extends Fragment {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
//목록에 해당한 내용이 없으면
|
||||
if(!barcodeStr.isEmpty()) {
|
||||
PKG searchPkg = null;
|
||||
for (PKG pkg : dataManager.pkgList) {
|
||||
if (pkg.getPKG_NO().compareTo(barcodeStr) == 0)
|
||||
{
|
||||
searchPkg = pkg;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
((SearchActivity) getActivity()).callTestActivity();
|
||||
if(searchPkg != null)
|
||||
{
|
||||
dataManager.selPkg = searchPkg;
|
||||
((SearchActivity) getActivity()).callTestActivity();
|
||||
}
|
||||
else{
|
||||
Toast.makeText(context, "해당 방폐물이 존재하지 않습니다.", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Toast.makeText(context, "바코드를 인식해주세요.", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
@@ -109,6 +137,7 @@ public class BarcodeFragment extends Fragment {
|
||||
if (!"No Read".equals(barcodeType)
|
||||
&& !"NR".equals(barcode)
|
||||
) {
|
||||
barcodeStr = barcode;
|
||||
bacodeTextView.setText(barcode);
|
||||
okButton.setEnabled(true);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.qtagger.Activity.Search;
|
||||
|
||||
import static android.os.SystemClock.sleep;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
@@ -11,9 +12,12 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.SeekBar;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.qtagger.Activity.SearchActivity;
|
||||
import com.qtagger.Database.PKG;
|
||||
import com.qtagger.R;
|
||||
import com.qtagger.util.DataManager;
|
||||
import com.wsmr.lib.dev.ATRfidManager;
|
||||
import com.wsmr.lib.dev.ATRfidReader;
|
||||
import com.wsmr.lib.dev.event.RfidReaderEventListener;
|
||||
@@ -31,6 +35,9 @@ import com.wsmr.lib.dev.rfid.type.ResultCode;
|
||||
*/
|
||||
public class RfidFragment extends Fragment {
|
||||
|
||||
DataManager dataManager = DataManager.getInstance();
|
||||
private String rfidStr = "";
|
||||
private Context context;
|
||||
// TODO: Rename parameter arguments, choose names that match
|
||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||
private static final String ARG_PARAM1 = "param1";
|
||||
@@ -78,6 +85,7 @@ public class RfidFragment extends Fragment {
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.fragment_rfid, container, false);
|
||||
context = container.getContext();
|
||||
TextView textViewPower = view.findViewById(R.id.textView_RfidPower);
|
||||
TextView textViewRfidText = view.findViewById(R.id.textView_RfidText);
|
||||
SeekBar seekBar = view.findViewById(R.id.seekbar_reader_type);
|
||||
@@ -152,7 +160,29 @@ public class RfidFragment extends Fragment {
|
||||
view.findViewById(R.id.button_Ok).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
((SearchActivity) getActivity()).callTestActivity();
|
||||
if(!rfidStr.isEmpty()) {
|
||||
PKG searchPkg = null;
|
||||
for (PKG pkg : dataManager.pkgList) {
|
||||
if (pkg.getPKG_NO().compareTo(rfidStr) == 0)
|
||||
{
|
||||
searchPkg = pkg;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(searchPkg != null)
|
||||
{
|
||||
dataManager.selPkg = searchPkg;
|
||||
((SearchActivity) getActivity()).callTestActivity();
|
||||
}
|
||||
else{
|
||||
Toast.makeText(context, "해당 방폐물이 존재하지 않습니다.", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Toast.makeText(context, "바코드를 인식해주세요.", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
// Inflate the layout for this fragment
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.qtagger.Activity.Test;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Typeface;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
|
||||
@@ -16,11 +17,13 @@ import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.qtagger.CustomPalette.NuclideItem;
|
||||
import com.qtagger.Data.TestEnum;
|
||||
import com.qtagger.Database.ACCEPT_TEST;
|
||||
import com.qtagger.Database.DISPOSAL_TEST;
|
||||
@@ -28,11 +31,22 @@ import com.qtagger.Database.ImageFile;
|
||||
import com.qtagger.Database.ORIGIN_CHRCT;
|
||||
import com.qtagger.Database.PREPAR_TEST;
|
||||
import com.qtagger.R;
|
||||
import com.qtagger.util.CommonHelper;
|
||||
import com.qtagger.util.DataManager;
|
||||
import com.qtagger.util.ImageSliderAdapter;
|
||||
|
||||
import org.w3c.dom.Text;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneId;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.time.temporal.Temporal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -46,12 +60,19 @@ public class InfoFragment extends Fragment {
|
||||
|
||||
DataManager dataManager = DataManager.getInstance();
|
||||
private ViewPager2 sliderViewPager;
|
||||
private int viewpagerWidth, viewpagerheight;
|
||||
private ImageSliderAdapter imageSliderAdapter;
|
||||
private LinearLayout layoutIndicator,defaultInfo,addInfo,nuclideInfo;
|
||||
private LinearLayout layoutIndicator,addInfo,nuclideInfo,layout_nuclide,layout_defaultInfo1,layout_defaultInfo2,layout_defaultInfo3;
|
||||
|
||||
|
||||
private TextView textPictureInfo;
|
||||
Button button_folding_nuclide;
|
||||
TextView TextView_addInfo;
|
||||
ImageView[] indicators = null;
|
||||
List<ImageFile> filePaths = null;
|
||||
Map<String,TextView> connectViewMap = new HashMap<>();
|
||||
Map<String,NuclideItem> connectNuclideItemMap = new HashMap<>();
|
||||
double inWTMbq = 1.0;
|
||||
|
||||
|
||||
|
||||
@@ -105,37 +126,59 @@ public class InfoFragment extends Fragment {
|
||||
sliderViewPager = view.findViewById(R.id.sliderViewPager);
|
||||
layoutIndicator = view.findViewById(R.id.layoutIndicators);
|
||||
textPictureInfo= view.findViewById(R.id.text_picture_info);
|
||||
defaultInfo = view.findViewById(R.id.layout_defaultInfo);
|
||||
layout_defaultInfo1 = view.findViewById(R.id.layout_defaultInfo1);
|
||||
layout_defaultInfo2 = view.findViewById(R.id.layout_defaultInfo2);
|
||||
layout_defaultInfo3 = view.findViewById(R.id.layout_defaultInfo3);
|
||||
nuclideInfo = view.findViewById(R.id.layout_nuclideInfo);
|
||||
layout_nuclide = view.findViewById(R.id.layout_nuclide);
|
||||
addInfo = view.findViewById(R.id.layout_addInfo);
|
||||
button_folding_nuclide = view.findViewById(R.id.button_folding_nuclide);
|
||||
TextView_addInfo = view.findViewById(R.id.TextView_addInfo);
|
||||
|
||||
createInfoView();
|
||||
|
||||
button_folding_nuclide.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if(nuclideInfo.getVisibility() == View.VISIBLE){
|
||||
button_folding_nuclide.setCompoundDrawablesWithIntrinsicBounds(null, null, ContextCompat.getDrawable(getActivity(), R.drawable.arrows_down_48), null);
|
||||
nuclideInfo.setVisibility(View.GONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
button_folding_nuclide.setCompoundDrawablesWithIntrinsicBounds(null, null, ContextCompat.getDrawable(getActivity(), R.drawable.arrows_left_48), null);
|
||||
nuclideInfo.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return view;
|
||||
}
|
||||
private void createInfoView(){
|
||||
if(dataManager.testEnum == TestEnum.발생지특성검사){
|
||||
createInfoTitle(defaultInfo,"기본 정보");
|
||||
connectViewMap.put("포장물번호",createInfoTextView(defaultInfo,"포장물번호"));
|
||||
connectViewMap.put("포장일자",createInfoTextView(defaultInfo,"포장일자"));
|
||||
connectViewMap.put("발생기관",createInfoTextView(defaultInfo,"발생기관"));
|
||||
connectViewMap.put("발생지점",createInfoTextView(defaultInfo,"발생지점"));
|
||||
connectViewMap.put("발생시점",createInfoTextView(defaultInfo,"발생시점"));
|
||||
connectViewMap.put("폐기물내용물",createInfoTextView(defaultInfo,"폐기물내용물"));
|
||||
connectViewMap.put("포장물 크기",createInfoTextView(defaultInfo,"포장물 크기"));
|
||||
connectViewMap.put("용기 종류",createInfoTextView(defaultInfo,"용기 종류"));
|
||||
connectViewMap.put("폐기물종류",createInfoTextView(defaultInfo,"폐기물종류"));
|
||||
connectViewMap.put("처리 방법",createInfoTextView(defaultInfo,"처리 방법"));
|
||||
connectViewMap.put("총 중량(kg)",createInfoTextView(defaultInfo,"총 중량(kg)"));
|
||||
connectViewMap.put("내용물 중량(kg)",createInfoTextView(defaultInfo,"내용물 중량(kg)"));
|
||||
if(dataManager.testEnum == TestEnum.발생지특성규명){
|
||||
createInfoTitle(layout_defaultInfo1,"일반 정보");
|
||||
connectViewMap.put("포장물번호",createInfoTextView(layout_defaultInfo1,"포장물번호"));
|
||||
connectViewMap.put("포장일자",createInfoTextView(layout_defaultInfo1,"포장일자"));
|
||||
connectViewMap.put("발생기관",createInfoTextView(layout_defaultInfo1,"발생기관"));
|
||||
connectViewMap.put("발생지점",createInfoTextView(layout_defaultInfo1,"발생지점"));
|
||||
connectViewMap.put("발생시점",createInfoTextView(layout_defaultInfo1,"발생시점"));
|
||||
connectViewMap.put("폐기물내용물",createInfoTextView(layout_defaultInfo1,"폐기물내용물"));
|
||||
connectViewMap.put("포장물 크기",createInfoTextView(layout_defaultInfo1,"포장물 크기"));
|
||||
connectViewMap.put("용기 종류",createInfoTextView(layout_defaultInfo1,"용기 종류"));
|
||||
connectViewMap.put("폐기물종류",createInfoTextView(layout_defaultInfo1,"폐기물종류"));
|
||||
connectViewMap.put("처리 방법",createInfoTextView(layout_defaultInfo1,"처리 방법"));
|
||||
connectViewMap.put("총 중량(kg)",createInfoTextView(layout_defaultInfo1,"총 중량(kg)"));
|
||||
connectViewMap.put("내용물 중량(kg)",createInfoTextView(layout_defaultInfo1,"내용물 중량(kg)"));
|
||||
|
||||
createInfoTitle(defaultInfo,"포장물 검사 확인");
|
||||
connectViewMap.put("판정",createInfoTextView(defaultInfo,"판정"));
|
||||
connectViewMap.put("특기사항",createInfoTextView(defaultInfo,"특기사항"));
|
||||
connectViewMap.put("자체검사일자",createInfoTextView(defaultInfo,"자체검사일자"));
|
||||
connectViewMap.put("검사자",createInfoTextView(defaultInfo,"검사자"));
|
||||
connectViewMap.put("확인자",createInfoTextView(defaultInfo,"확인자"));
|
||||
connectViewMap.put("취금",createInfoTextView(defaultInfo,"유의사항"));
|
||||
connectViewMap.put("인도희망일자",createInfoTextView(defaultInfo,"인도희망일자"));
|
||||
createInfoTitle(layout_defaultInfo2,"포장물 검사 확인");
|
||||
connectViewMap.put("판정",createInfoTextView(layout_defaultInfo2,"판정"));
|
||||
connectViewMap.put("특기사항",createInfoTextView(layout_defaultInfo2,"특기사항"));
|
||||
connectViewMap.put("자체검사일자",createInfoTextView(layout_defaultInfo2,"자체검사일자"));
|
||||
connectViewMap.put("검사자",createInfoTextView(layout_defaultInfo2,"검사자"));
|
||||
connectViewMap.put("확인자",createInfoTextView(layout_defaultInfo2,"확인자"));
|
||||
connectViewMap.put("취금",createInfoTextView(layout_defaultInfo2,"유의사항"));
|
||||
connectViewMap.put("인도희망일자",createInfoTextView(layout_defaultInfo2,"인도희망일자"));
|
||||
layout_defaultInfo3.setVisibility(View.GONE);
|
||||
|
||||
//createInfoTitle(defaultInfo,"핵종 정보");
|
||||
|
||||
@@ -154,21 +197,212 @@ public class InfoFragment extends Fragment {
|
||||
connectViewMap.put("핵종평가자",createInfoTextView(addInfo,"핵종평가자"));
|
||||
|
||||
|
||||
connectNuclideItemMap.put("Ag-110m",createNuclideItem(nuclideInfo,"Ag-110m"));
|
||||
connectNuclideItemMap.put("C-14",createNuclideItem(nuclideInfo,"C-14"));
|
||||
connectNuclideItemMap.put("Ce-144",createNuclideItem(nuclideInfo,"Ce-144"));
|
||||
connectNuclideItemMap.put("Co-57",createNuclideItem(nuclideInfo,"Co-57"));
|
||||
connectNuclideItemMap.put("Co-58",createNuclideItem(nuclideInfo,"Co-58"));
|
||||
connectNuclideItemMap.put("Co-60",createNuclideItem(nuclideInfo,"Co-60"));
|
||||
connectNuclideItemMap.put("Cr-51",createNuclideItem(nuclideInfo,"Cr-51"));
|
||||
connectNuclideItemMap.put("Cs-134",createNuclideItem(nuclideInfo,"Cs-134"));
|
||||
connectNuclideItemMap.put("Cs-137",createNuclideItem(nuclideInfo,"Cs-137"));
|
||||
connectNuclideItemMap.put("Fe-55",createNuclideItem(nuclideInfo,"Fe-55"));
|
||||
connectNuclideItemMap.put("Fe-59",createNuclideItem(nuclideInfo,"Fe-59"));
|
||||
connectNuclideItemMap.put("G-Alpha",createNuclideItem(nuclideInfo,"G-Alpha"));
|
||||
connectNuclideItemMap.put("H-3",createNuclideItem(nuclideInfo,"H-3"));
|
||||
connectNuclideItemMap.put("I-129",createNuclideItem(nuclideInfo,"I-129"));
|
||||
connectNuclideItemMap.put("Mn-54",createNuclideItem(nuclideInfo,"Mn-54"));
|
||||
connectNuclideItemMap.put("Nb-94",createNuclideItem(nuclideInfo,"Nb-94"));
|
||||
connectNuclideItemMap.put("Nb-95",createNuclideItem(nuclideInfo,"Nb-95"));
|
||||
connectNuclideItemMap.put("Ni-59",createNuclideItem(nuclideInfo,"Ni-59"));
|
||||
connectNuclideItemMap.put("Ni-63",createNuclideItem(nuclideInfo,"Ni-63"));
|
||||
connectNuclideItemMap.put("Sb-125",createNuclideItem(nuclideInfo,"Sb-125"));
|
||||
connectNuclideItemMap.put("Sr-90",createNuclideItem(nuclideInfo,"Sr-90"));
|
||||
connectNuclideItemMap.put("Tc-99",createNuclideItem(nuclideInfo,"Tc-99"));
|
||||
connectNuclideItemMap.put("Zn-65",createNuclideItem(nuclideInfo,"Zn-65"));
|
||||
connectNuclideItemMap.put("Zr-95",createNuclideItem(nuclideInfo,"Zr-95"));
|
||||
|
||||
|
||||
|
||||
}
|
||||
else if(dataManager.testEnum == TestEnum.인수검사){
|
||||
createInfoTitle(layout_defaultInfo1,"일반 정보");
|
||||
connectViewMap.put("포장물번호",createInfoTextView(layout_defaultInfo1,"포장물번호"));
|
||||
connectViewMap.put("인수검사 로트번호",createInfoTextView(layout_defaultInfo1,"인수검사 로트번호"));
|
||||
connectViewMap.put("검사종류",createInfoTextView(layout_defaultInfo1,"검사종류"));
|
||||
|
||||
createInfoTitle(layout_defaultInfo2,"전수 검사");
|
||||
connectViewMap.put("서류검사",createInfoTextView(layout_defaultInfo2,"서류검사"));
|
||||
connectViewMap.put("서류검사 특이사항",createInfoTextView(layout_defaultInfo2,"서류검사 특이사항"));
|
||||
connectViewMap.put("육안검사",createInfoTextView(layout_defaultInfo2,"육안검사"));
|
||||
connectViewMap.put("육안검사 특이사항",createInfoTextView(layout_defaultInfo2,"육안검사 특이사항"));
|
||||
connectViewMap.put("표면방사선량률(mSv/hr)",createInfoTextView(layout_defaultInfo2,"표면방사선량률(mSv/hr)"));
|
||||
connectViewMap.put("표면선량률 측정일자",createInfoTextView(layout_defaultInfo2,"표면선량률 측정일자"));
|
||||
connectViewMap.put("총중량(kg)",createInfoTextView(layout_defaultInfo2,"총중량(kg)"));
|
||||
connectViewMap.put("내용물중량(kg)",createInfoTextView(layout_defaultInfo2,"내용물중량(kg)"));
|
||||
connectViewMap.put("검사방법",createInfoTextView(layout_defaultInfo2,"검사방법"));
|
||||
connectViewMap.put("파괴/비파괴 내용",createInfoTextView(layout_defaultInfo2,"파괴/비파괴 내용"));
|
||||
|
||||
createInfoTitle(layout_defaultInfo3,"인수검사 판정내역");
|
||||
connectViewMap.put("판정",createInfoTextView(layout_defaultInfo3,"판정"));
|
||||
connectViewMap.put("인수검사일자",createInfoTextView(layout_defaultInfo3,"인수검사일자"));
|
||||
connectViewMap.put("검사자",createInfoTextView(layout_defaultInfo3,"검사자"));
|
||||
connectViewMap.put("확인자",createInfoTextView(layout_defaultInfo3,"확인자"));
|
||||
connectViewMap.put("특기사항",createInfoTextView(layout_defaultInfo3,"특기사항"));
|
||||
|
||||
connectNuclideItemMap.put("Ag-110m",createNuclideItem(nuclideInfo,"Ag-110m"));
|
||||
connectNuclideItemMap.put("C-14",createNuclideItem(nuclideInfo,"C-14"));
|
||||
connectNuclideItemMap.put("Ce-144",createNuclideItem(nuclideInfo,"Ce-144"));
|
||||
connectNuclideItemMap.put("Co-57",createNuclideItem(nuclideInfo,"Co-57"));
|
||||
connectNuclideItemMap.put("Co-58",createNuclideItem(nuclideInfo,"Co-58"));
|
||||
connectNuclideItemMap.put("Co-60",createNuclideItem(nuclideInfo,"Co-60"));
|
||||
connectNuclideItemMap.put("Cr-51",createNuclideItem(nuclideInfo,"Cr-51"));
|
||||
connectNuclideItemMap.put("Cs-134",createNuclideItem(nuclideInfo,"Cs-134"));
|
||||
connectNuclideItemMap.put("Cs-137",createNuclideItem(nuclideInfo,"Cs-137"));
|
||||
connectNuclideItemMap.put("Eu-152",createNuclideItem(nuclideInfo,"Cs-137"));
|
||||
connectNuclideItemMap.put("Fe-55",createNuclideItem(nuclideInfo,"Fe-55"));
|
||||
connectNuclideItemMap.put("Fe-59",createNuclideItem(nuclideInfo,"Fe-59"));
|
||||
connectNuclideItemMap.put("G-Alpha",createNuclideItem(nuclideInfo,"G-Alpha"));
|
||||
connectNuclideItemMap.put("H-3",createNuclideItem(nuclideInfo,"H-3"));
|
||||
connectNuclideItemMap.put("I-129",createNuclideItem(nuclideInfo,"I-129"));
|
||||
connectNuclideItemMap.put("Mn-54",createNuclideItem(nuclideInfo,"Mn-54"));
|
||||
connectNuclideItemMap.put("Nb-94",createNuclideItem(nuclideInfo,"Nb-94"));
|
||||
connectNuclideItemMap.put("Nb-95",createNuclideItem(nuclideInfo,"Nb-95"));
|
||||
connectNuclideItemMap.put("Ni-59",createNuclideItem(nuclideInfo,"Ni-59"));
|
||||
connectNuclideItemMap.put("Ni-63",createNuclideItem(nuclideInfo,"Ni-63"));
|
||||
connectNuclideItemMap.put("Sb-125",createNuclideItem(nuclideInfo,"Sb-125"));
|
||||
connectNuclideItemMap.put("Sr-90",createNuclideItem(nuclideInfo,"Sr-90"));
|
||||
connectNuclideItemMap.put("Tc-99",createNuclideItem(nuclideInfo,"Tc-99"));
|
||||
connectNuclideItemMap.put("Zn-65",createNuclideItem(nuclideInfo,"Zn-65"));
|
||||
connectNuclideItemMap.put("Zr-95",createNuclideItem(nuclideInfo,"Zr-95"));
|
||||
|
||||
|
||||
TextView_addInfo.setText("표본 검사");
|
||||
connectViewMap.put("폐기물 내용물",createInfoTextView(addInfo,"폐기물 내용물"));
|
||||
connectViewMap.put("유리수",createInfoTextView(addInfo,"유리수"));
|
||||
connectViewMap.put("유리수(%)",createInfoTextView(addInfo,"유리수(%)"));
|
||||
connectViewMap.put("채움률",createInfoTextView(addInfo,"채움률"));
|
||||
connectViewMap.put("채움률(%)",createInfoTextView(addInfo,"채움률(%)"));
|
||||
connectViewMap.put("킬레이트제 등",createInfoTextView(addInfo,"킬레이트제 등"));
|
||||
connectViewMap.put("고화체의 구조적 건정성",createInfoTextView(addInfo,"고화체의 구조적 건정성"));
|
||||
connectViewMap.put("폭발성 등 유해물질",createInfoTextView(addInfo,"폭발성 등 유해물질"));
|
||||
connectViewMap.put("표면오염도(Bq/cm²)",createInfoTextView(addInfo,"표면오염도(Bq/cm²)"));
|
||||
connectViewMap.put("표면오염도 측정일자",createInfoTextView(addInfo,"표면오염도 측정일자"));
|
||||
connectViewMap.put("총방사능량(MBq)",createInfoTextView(addInfo,"총방사능량(MBq)"));
|
||||
connectViewMap.put("핵종분석일",createInfoTextView(addInfo,"핵종분석일"));
|
||||
|
||||
|
||||
}
|
||||
else if(dataManager.testEnum == TestEnum.처분검사){
|
||||
//처분검사는 핵종정보, 추가정보가 없음
|
||||
layout_nuclide.setVisibility(View.GONE);
|
||||
addInfo.setVisibility(View.GONE);
|
||||
|
||||
createInfoTitle(layout_defaultInfo1,"일반 정보");
|
||||
connectViewMap.put("포장물번호",createInfoTextView(layout_defaultInfo1,"포장물번호"));
|
||||
connectViewMap.put("검사종류",createInfoTextView(layout_defaultInfo1,"검사종류"));
|
||||
connectViewMap.put("처분검사관리번호",createInfoTextView(layout_defaultInfo1,"처분검사관리번호"));
|
||||
connectViewMap.put("파괴/비파괴",createInfoTextView(layout_defaultInfo1,"파괴/비파괴"));
|
||||
connectViewMap.put("서류검사",createInfoTextView(layout_defaultInfo1,"서류검사"));
|
||||
connectViewMap.put("육안검사",createInfoTextView(layout_defaultInfo1,"육안검사"));
|
||||
|
||||
|
||||
createInfoTitle(layout_defaultInfo2,"핵종분석");
|
||||
connectViewMap.put("핵종분석",createInfoTextView(layout_defaultInfo2,"핵종분석"));
|
||||
connectViewMap.put("핵종분석일자",createInfoTextView(layout_defaultInfo2,"핵종분석일자"));
|
||||
connectViewMap.put("X-Ray 검사",createInfoTextView(layout_defaultInfo2,"X-Ray 검사"));
|
||||
|
||||
createInfoTitle(layout_defaultInfo3,"처분검사 판정내역");
|
||||
connectViewMap.put("판정",createInfoTextView(layout_defaultInfo3,"판정"));
|
||||
connectViewMap.put("특기사항",createInfoTextView(layout_defaultInfo3,"특기사항"));
|
||||
connectViewMap.put("처분검사일자",createInfoTextView(layout_defaultInfo3,"처분검사일자"));
|
||||
connectViewMap.put("폐기물 규제 PM",createInfoTextView(layout_defaultInfo3,"폐기물 규제 PM"));
|
||||
connectViewMap.put("확인자",createInfoTextView(layout_defaultInfo3,"확인자"));
|
||||
|
||||
}
|
||||
else if(dataManager.testEnum == TestEnum.예비검사){
|
||||
createInfoTitle(layout_defaultInfo1,"일반 정보");
|
||||
connectViewMap.put("포장물번호",createInfoTextView(layout_defaultInfo1,"포장물번호"));
|
||||
connectViewMap.put("예비검사 로트번호",createInfoTextView(layout_defaultInfo1,"예비검사 로트번호"));
|
||||
connectViewMap.put("검사종류",createInfoTextView(layout_defaultInfo1,"검사종류"));
|
||||
connectViewMap.put("테스트1",createInfoTextView(layout_defaultInfo1,"테스트1"));
|
||||
connectViewMap.put("테스트2",createInfoTextView(layout_defaultInfo1,"테스트2"));
|
||||
|
||||
|
||||
createInfoTitle(layout_defaultInfo2,"전수 검사");
|
||||
connectViewMap.put("서류검사",createInfoTextView(layout_defaultInfo2,"서류검사"));
|
||||
connectViewMap.put("서류검사 특이사항",createInfoTextView(layout_defaultInfo2,"서류검사 특이사항"));
|
||||
connectViewMap.put("육안검사",createInfoTextView(layout_defaultInfo2,"육안검사"));
|
||||
connectViewMap.put("육안검사특이사항",createInfoTextView(layout_defaultInfo2,"육안검사특이사항"));
|
||||
connectViewMap.put("검사방법",createInfoTextView(layout_defaultInfo2,"검사방법"));
|
||||
connectViewMap.put("파괴/비파괴 내용",createInfoTextView(layout_defaultInfo2,"파괴/비파괴 내용"));
|
||||
|
||||
createInfoTitle(layout_defaultInfo3,"예비검사 판정내역");
|
||||
connectViewMap.put("판정",createInfoTextView(layout_defaultInfo3,"판정"));
|
||||
connectViewMap.put("예비검사일자",createInfoTextView(layout_defaultInfo3,"예비검사일자"));
|
||||
connectViewMap.put("검사자1",createInfoTextView(layout_defaultInfo3,"검사자1"));
|
||||
connectViewMap.put("검사자2",createInfoTextView(layout_defaultInfo3,"검사자2"));
|
||||
connectViewMap.put("확인자",createInfoTextView(layout_defaultInfo3,"확인자"));
|
||||
|
||||
|
||||
TextView_addInfo.setText("표본 검사");
|
||||
connectViewMap.put("총중량(kg)",createInfoTextView(addInfo,"총중량(kg)"));
|
||||
connectViewMap.put("내용물 중량(kg)",createInfoTextView(addInfo,"내용물 중량(kg)"));
|
||||
connectViewMap.put("폐기물 내용물",createInfoTextView(addInfo,"폐기물 내용물"));
|
||||
connectViewMap.put("유리수",createInfoTextView(addInfo,"유리수"));
|
||||
connectViewMap.put("유리수(%)",createInfoTextView(addInfo,"유리수(%)"));
|
||||
connectViewMap.put("채움률",createInfoTextView(addInfo,"채움률"));
|
||||
connectViewMap.put("채움률(%)",createInfoTextView(addInfo,"채움률(%)"));
|
||||
connectViewMap.put("킬레이트제 등",createInfoTextView(addInfo,"킬레이트제 등"));
|
||||
connectViewMap.put("고화체의 구조적 건정성",createInfoTextView(addInfo,"고화체의 구조적 건정성"));
|
||||
connectViewMap.put("폭발성 등 유해물질",createInfoTextView(addInfo,"폭발성 등 유해물질"));
|
||||
connectViewMap.put("표면오염도(Bq/cm²)",createInfoTextView(addInfo,"표면오염도(Bq/cm²)"));
|
||||
connectViewMap.put("표면오염도 측정일자",createInfoTextView(addInfo,"표면오염도 측정일자"));
|
||||
connectViewMap.put("표면방사선량률",createInfoTextView(addInfo,"표면방사선량률"));
|
||||
connectViewMap.put("표면선량률 측정일자",createInfoTextView(addInfo,"표면선량률 측정일자"));
|
||||
connectViewMap.put("총방사능량",createInfoTextView(addInfo,"총방사능량"));
|
||||
connectViewMap.put("핵종분석일",createInfoTextView(addInfo,"핵종분석일"));
|
||||
|
||||
//핵종 정보
|
||||
connectNuclideItemMap.put("Ag-110m",createNuclideItem(nuclideInfo,"Ag-110m"));
|
||||
connectNuclideItemMap.put("C-14",createNuclideItem(nuclideInfo,"C-14"));
|
||||
connectNuclideItemMap.put("Ce-144",createNuclideItem(nuclideInfo,"Ce-144"));
|
||||
connectNuclideItemMap.put("Co-57",createNuclideItem(nuclideInfo,"Co-57"));
|
||||
connectNuclideItemMap.put("Co-58",createNuclideItem(nuclideInfo,"Co-58"));
|
||||
connectNuclideItemMap.put("Co-60",createNuclideItem(nuclideInfo,"Co-60"));
|
||||
connectNuclideItemMap.put("Cr-51",createNuclideItem(nuclideInfo,"Cr-51"));
|
||||
connectNuclideItemMap.put("Cs-134",createNuclideItem(nuclideInfo,"Cs-134"));
|
||||
connectNuclideItemMap.put("Cs-137",createNuclideItem(nuclideInfo,"Cs-137"));
|
||||
connectNuclideItemMap.put("Eu-152",createNuclideItem(nuclideInfo,"Eu-152"));
|
||||
connectNuclideItemMap.put("Eu-154",createNuclideItem(nuclideInfo,"Eu-154"));
|
||||
connectNuclideItemMap.put("Fe-55",createNuclideItem(nuclideInfo,"Fe-55"));
|
||||
connectNuclideItemMap.put("Fe-59",createNuclideItem(nuclideInfo,"Fe-59"));
|
||||
connectNuclideItemMap.put("G-Alpha",createNuclideItem(nuclideInfo,"G-Alpha"));
|
||||
connectNuclideItemMap.put("H-3",createNuclideItem(nuclideInfo,"H-3"));
|
||||
connectNuclideItemMap.put("I-129",createNuclideItem(nuclideInfo,"I-129"));
|
||||
connectNuclideItemMap.put("Mn-54",createNuclideItem(nuclideInfo,"Mn-54"));
|
||||
connectNuclideItemMap.put("Nb-94",createNuclideItem(nuclideInfo,"Nb-94"));
|
||||
connectNuclideItemMap.put("Nb-95",createNuclideItem(nuclideInfo,"Nb-95"));
|
||||
connectNuclideItemMap.put("Ni-59",createNuclideItem(nuclideInfo,"Ni-59"));
|
||||
connectNuclideItemMap.put("Ni-63",createNuclideItem(nuclideInfo,"Ni-63"));
|
||||
connectNuclideItemMap.put("Sb-125",createNuclideItem(nuclideInfo,"Sb-125"));
|
||||
connectNuclideItemMap.put("Sr-90",createNuclideItem(nuclideInfo,"Sr-90"));
|
||||
connectNuclideItemMap.put("Tc-99",createNuclideItem(nuclideInfo,"Tc-99"));
|
||||
connectNuclideItemMap.put("Zn-65",createNuclideItem(nuclideInfo,"Zn-65"));
|
||||
connectNuclideItemMap.put("Zr-95",createNuclideItem(nuclideInfo,"Zr-95"));
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.O)
|
||||
private void updateView(){
|
||||
if(dataManager.testEnum == TestEnum.발생지특성검사) {
|
||||
if(dataManager.testEnum == TestEnum.발생지특성규명) {
|
||||
ORIGIN_CHRCT selPkg = (ORIGIN_CHRCT) dataManager.selPkg;
|
||||
|
||||
//기본정보
|
||||
@@ -208,19 +442,213 @@ public class InfoFragment extends Fragment {
|
||||
connectViewMap.get("핵종평가일").setText(selPkg.getORIGIN_PKG_NCLD_EVLTN_DATE());
|
||||
connectViewMap.get("핵종평가자").setText(selPkg.getORIGIN_PKG_NCLD_EVLTR());
|
||||
|
||||
String inWT = selPkg.getORIGIN_PKG_IN_WT();
|
||||
if(inWT != null && !inWT.isEmpty())
|
||||
{
|
||||
inWTMbq = Double.parseDouble(selPkg.getORIGIN_PKG_IN_WT());
|
||||
}
|
||||
|
||||
|
||||
|
||||
setNuclideData("Ag-110m",selPkg.getORIGIN_CHRCT_Ag_110m());
|
||||
setNuclideData("C-14",selPkg.getORIGIN_CHRCT_C_14());
|
||||
setNuclideData("Ce-144",selPkg.getORIGIN_CHRCT_Ce_144());
|
||||
setNuclideData("Co-57",selPkg.getORIGIN_CHRCT_Co_57());
|
||||
setNuclideData("Co-58",selPkg.getORIGIN_CHRCT_Co_58());
|
||||
setNuclideData("Co-60",selPkg.getORIGIN_CHRCT_Co_60());
|
||||
setNuclideData("Cr-51",selPkg.getORIGIN_CHRCT_Cr_51());
|
||||
setNuclideData("Cs-134",selPkg.getORIGIN_CHRCT_Cs_134());
|
||||
setNuclideData("Cs-137",selPkg.getORIGIN_CHRCT_Cs_137());
|
||||
setNuclideData("Fe-55",selPkg.getORIGIN_CHRCT_Fe_55());
|
||||
setNuclideData("Fe-59",selPkg.getORIGIN_CHRCT_Fe_59());
|
||||
setNuclideData("G-Alpha",selPkg.getORIGIN_CHRCT_G_Alpha());
|
||||
setNuclideData("H-3",selPkg.getORIGIN_CHRCT_H_3());
|
||||
setNuclideData("I-129",selPkg.getORIGIN_CHRCT_I_129());
|
||||
setNuclideData("Mn-54",selPkg.getORIGIN_CHRCT_Mn_54());
|
||||
setNuclideData("Nb-94",selPkg.getORIGIN_CHRCT_Nb_94());
|
||||
setNuclideData("Nb-95",selPkg.getORIGIN_CHRCT_Nb_95());
|
||||
setNuclideData("Ni-59",selPkg.getORIGIN_CHRCT_Ni_59());
|
||||
setNuclideData("Ni-63",selPkg.getORIGIN_CHRCT_Ni_63());
|
||||
setNuclideData("Sb-125",selPkg.getORIGIN_CHRCT_Sb_125());
|
||||
setNuclideData("Sr-90",selPkg.getORIGIN_CHRCT_Sr_90());
|
||||
setNuclideData("Tc-99",selPkg.getORIGIN_CHRCT_Tc_99());
|
||||
setNuclideData("Zn-65",selPkg.getORIGIN_CHRCT_Zn_65());
|
||||
setNuclideData("Zr-95",selPkg.getORIGIN_CHRCT_Zr_95());
|
||||
|
||||
}
|
||||
else if(dataManager.testEnum == TestEnum.인수검사){
|
||||
ACCEPT_TEST selPkg = (ACCEPT_TEST) dataManager.selPkg;
|
||||
|
||||
connectViewMap.get("포장물번호").setText(selPkg.getACCEPT_PKG_NO());
|
||||
connectViewMap.get("인수검사 로트번호").setText(selPkg.getACCEPT_ROT());
|
||||
connectViewMap.get("검사종류").setText(selPkg.getACCEPT_TEST_TYPE());
|
||||
|
||||
|
||||
connectViewMap.get("서류검사").setText(selPkg.getACCEPT_DOC_INSP());
|
||||
connectViewMap.get("서류검사 특이사항").setText(selPkg.getACCEPT_DOC_INSP_REMARK());
|
||||
connectViewMap.get("육안검사").setText(selPkg.getACCEPT_VISUAL_INSP());
|
||||
connectViewMap.get("육안검사 특이사항").setText(selPkg.getACCEPT_VISUAL_INSP_REMARK());
|
||||
connectViewMap.get("표면방사선량률(mSv/hr)").setText(selPkg.getACCEPT_SURFC_RD_RATE());
|
||||
connectViewMap.get("표면선량률 측정일자").setText(selPkg.getACCEPT_SURFC_RD_DATE());
|
||||
connectViewMap.get("총중량(kg)").setText(selPkg.getACCEPT_TEST_TOT_WT());
|
||||
connectViewMap.get("내용물중량(kg)").setText(selPkg.getACCEPT_IN_WT());
|
||||
connectViewMap.get("검사방법").setText(selPkg.getACCEPT_INSP_MET());
|
||||
connectViewMap.get("파괴/비파괴 내용").setText(selPkg.getACCEPT_TYPE_REMARK());
|
||||
|
||||
//인수검사 판정내역
|
||||
connectViewMap.get("판정").setText(selPkg.getACCEPT_IS_PASS());
|
||||
connectViewMap.get("인수검사일자").setText(selPkg.getACCEPT_TEST_DATE());
|
||||
connectViewMap.get("검사자").setText(selPkg.getACCEPT_INSPECTOR());
|
||||
connectViewMap.get("확인자").setText(selPkg.getACCEPT_CHECKER());
|
||||
connectViewMap.get("특기사항").setText(selPkg.getACCEPT_PASS_NOTE());
|
||||
|
||||
connectViewMap.get("폐기물 내용물").setText(selPkg.getACCEPT_WASTE_TYPE());
|
||||
connectViewMap.get("유리수").setText(selPkg.getACCEPT_RTNL_NMBR());
|
||||
connectViewMap.get("유리수(%)").setText(selPkg.getACCEPT_RTNL_NMBR_PER());
|
||||
connectViewMap.get("채움률").setText(selPkg.getACCEPT_APT());
|
||||
connectViewMap.get("채움률(%)").setText(selPkg.getACCEPT_APT_PER());
|
||||
connectViewMap.get("킬레이트제 등").setText(selPkg.getACCEPT_CHELATE());
|
||||
connectViewMap.get("고화체의 구조적 건정성").setText(selPkg.getACCEPT_SLD_STABLE());
|
||||
connectViewMap.get("폭발성 등 유해물질").setText(selPkg.getACCEPT_NXS_SBSTN());
|
||||
connectViewMap.get("표면오염도(Bq/cm²)").setText(selPkg.getACCEPT_SURFC_PLT());
|
||||
connectViewMap.get("표면오염도 측정일자").setText(selPkg.getACCEPT_SURFC_PLT_DATE());
|
||||
connectViewMap.get("총방사능량(MBq)").setText(selPkg.getACCEPT_TOT_RD_QTY());
|
||||
connectViewMap.get("핵종분석일").setText(selPkg.getACCEPT_NUCLIDE_ANALS_DATE());
|
||||
|
||||
String inWT = selPkg.getACCEPT_IN_WT();
|
||||
if(inWT != null && !inWT.isEmpty())
|
||||
{
|
||||
inWTMbq = Double.parseDouble(selPkg.getACCEPT_IN_WT());
|
||||
}
|
||||
|
||||
|
||||
setNuclideData("Ag-110m",selPkg.getACCEPT_TEST_Ag_110m());
|
||||
setNuclideData("C-14",selPkg.getACCEPT_TEST_C_14());
|
||||
setNuclideData("Ce-144",selPkg.getACCEPT_TEST_Ce_144());
|
||||
setNuclideData("Co-57",selPkg.getACCEPT_TEST_Co_57());
|
||||
setNuclideData("Co-58",selPkg.getACCEPT_TEST_Co_58());
|
||||
setNuclideData("Co-60",selPkg.getACCEPT_TEST_Co_60());
|
||||
setNuclideData("Cr-51",selPkg.getACCEPT_TEST_Cr_51());
|
||||
setNuclideData("Cs-134",selPkg.getACCEPT_TEST_Cs_134());
|
||||
setNuclideData("Cs-137",selPkg.getACCEPT_TEST_Cs_137());
|
||||
setNuclideData("Eu-152",selPkg.getACCEPT_TEST_Eu_152());
|
||||
setNuclideData("Fe-55",selPkg.getACCEPT_TEST_Fe_55());
|
||||
setNuclideData("Fe-59",selPkg.getACCEPT_TEST_Fe_59());
|
||||
setNuclideData("G-Alpha",selPkg.getACCEPT_TEST_G_Alpha());
|
||||
setNuclideData("H-3",selPkg.getACCEPT_TEST_H_3());
|
||||
setNuclideData("I-129",selPkg.getACCEPT_TEST_I_129());
|
||||
setNuclideData("Mn-54",selPkg.getACCEPT_TEST_Mn_54());
|
||||
setNuclideData("Nb-94",selPkg.getACCEPT_TEST_Nb_94());
|
||||
setNuclideData("Nb-95",selPkg.getACCEPT_TEST_Nb_95());
|
||||
setNuclideData("Ni-59",selPkg.getACCEPT_TEST_Ni_59());
|
||||
setNuclideData("Ni-63",selPkg.getACCEPT_TEST_Ni_63());
|
||||
setNuclideData("Sb-125",selPkg.getACCEPT_TEST_Sb_125());
|
||||
setNuclideData("Sr-90",selPkg.getACCEPT_TEST_Sr_90());
|
||||
setNuclideData("Tc-99",selPkg.getACCEPT_TEST_Tc_99());
|
||||
setNuclideData("Zn-65",selPkg.getACCEPT_TEST_Zn_65());
|
||||
setNuclideData("Zr-95",selPkg.getACCEPT_TEST_Zr_95());
|
||||
|
||||
|
||||
}
|
||||
else if(dataManager.testEnum == TestEnum.처분검사){
|
||||
DISPOSAL_TEST selPkg = (DISPOSAL_TEST) dataManager.selPkg;
|
||||
connectViewMap.get("포장물번호").setText(selPkg.getDISPOSAL_PKG_NO());
|
||||
connectViewMap.get("검사종류").setText(selPkg.getDISPOSAL_TYPE());
|
||||
connectViewMap.get("처분검사관리번호").setText(selPkg.getDISPOSAL_NO());
|
||||
connectViewMap.get("파괴/비파괴").setText(selPkg.getDISPOSAL_DSTRC());
|
||||
connectViewMap.get("서류검사").setText(selPkg.getDISPOSAL_DCMNT_INSPC());
|
||||
connectViewMap.get("육안검사").setText(selPkg.getDISPOSAL_VSL_INSPC());
|
||||
|
||||
|
||||
connectViewMap.get("핵종분석").setText(selPkg.getDISPOSAL_NCLD_ANLYS());
|
||||
connectViewMap.get("핵종분석일자").setText(selPkg.getDISPOSAL_NCLD_ANLYS_DATE());
|
||||
connectViewMap.get("X-Ray 검사").setText(selPkg.getDISPOSAL_X_RAY());
|
||||
|
||||
|
||||
connectViewMap.get("판정").setText(selPkg.getDISPOSAL_RULING());
|
||||
connectViewMap.get("특기사항").setText(selPkg.getDISPOSAL_NOTE());
|
||||
connectViewMap.get("처분검사일자").setText(selPkg.getDISPOSAL_DATE());
|
||||
connectViewMap.get("폐기물 규제 PM").setText(selPkg.getDISPOSAL_PM());
|
||||
connectViewMap.get("확인자").setText(selPkg.getDISPOSAL_CHECKER());
|
||||
|
||||
}
|
||||
else if(dataManager.testEnum == TestEnum.예비검사){
|
||||
PREPAR_TEST selPkg = (PREPAR_TEST) dataManager.selPkg;
|
||||
|
||||
connectViewMap.get("포장물번호").setText(selPkg.getPREPAR_PKG_NO());
|
||||
connectViewMap.get("예비검사 로트번호").setText(selPkg.getPREPAR_TEST_ROT());
|
||||
connectViewMap.get("검사종류").setText(selPkg.getPREPAR_TEST_TYPE());
|
||||
connectViewMap.get("테스트1").setText(selPkg.getPREPAR_TEST1234());
|
||||
connectViewMap.get("테스트2").setText(selPkg.getPREPAR_TEST12342());
|
||||
|
||||
|
||||
connectViewMap.get("서류검사").setText(selPkg.getPREPAR_DOC_INSP());
|
||||
connectViewMap.get("서류검사 특이사항").setText(selPkg.getPREPAR_DOC_INSP_NOTE());
|
||||
connectViewMap.get("육안검사").setText(selPkg.getPREPAR_VISUAL_INSP());
|
||||
connectViewMap.get("육안검사특이사항").setText(selPkg.getPREPAR_VISUAL_INSP_NOTE());
|
||||
connectViewMap.get("검사방법").setText(selPkg.getPREPAR_INSP_MET());
|
||||
connectViewMap.get("파괴/비파괴 내용").setText(selPkg.getPREPAR_INSP_TYPE());
|
||||
|
||||
|
||||
connectViewMap.get("판정").setText(selPkg.getPREPAR_TEST_IS_PASS());
|
||||
connectViewMap.get("예비검사일자").setText(selPkg.getPREPAR_TEST_DATE());
|
||||
connectViewMap.get("검사자1").setText(selPkg.getPREPAR_INSPECTOR_1());
|
||||
connectViewMap.get("검사자2").setText(selPkg.getPREPAR_INSPECTOR_2());
|
||||
connectViewMap.get("확인자").setText(selPkg.getPREPAR_CHECKER());
|
||||
|
||||
|
||||
connectViewMap.get("총중량(kg)").setText(selPkg.getPREPAR_TOT_WT());
|
||||
connectViewMap.get("내용물 중량(kg)").setText(selPkg.getPREPAR_IN_WT());
|
||||
connectViewMap.get("폐기물 내용물").setText(selPkg.getPREPAR_WASTE_TYPE());
|
||||
connectViewMap.get("유리수").setText(selPkg.getPREPAR_RTNL_NMBR());
|
||||
connectViewMap.get("유리수(%)").setText(selPkg.getPREPAR_FREE_WATER_PER());
|
||||
connectViewMap.get("채움률").setText(selPkg.getPREPAR_APT());
|
||||
connectViewMap.get("채움률(%)").setText(selPkg.getPREPAR_FILL_RATE_PER());
|
||||
connectViewMap.get("킬레이트제 등").setText(selPkg.getPREPAR_CHELATE());
|
||||
connectViewMap.get("고화체의 구조적 건정성").setText(selPkg.getPREPAR_SLD_STABLE());
|
||||
connectViewMap.get("폭발성 등 유해물질").setText(selPkg.getPREPAR_HAZA_SUBSTANCES());
|
||||
connectViewMap.get("표면오염도(Bq/cm²)").setText(selPkg.getPREPAR_SURFC_PLT());
|
||||
connectViewMap.get("표면오염도 측정일자").setText(selPkg.getPREPAR_SURFC_PLT_DATE());
|
||||
connectViewMap.get("표면방사선량률").setText(selPkg.getPREPAR_SURFC_RD_RATE());
|
||||
connectViewMap.get("표면선량률 측정일자").setText(selPkg.getPREPAR_SURFC_RD_DATE());
|
||||
connectViewMap.get("총방사능량").setText(selPkg.getPREPAR_TOT_RD_QTY());
|
||||
connectViewMap.get("핵종분석일").setText(selPkg.getPREPAR_NUCLIDE_ANALS_DATE());
|
||||
|
||||
|
||||
String inWT = selPkg.getPREPAR_IN_WT();
|
||||
if(inWT != null && !inWT.isEmpty())
|
||||
{
|
||||
inWTMbq = Double.parseDouble(selPkg.getPREPAR_IN_WT());
|
||||
}
|
||||
|
||||
setNuclideData("Ag-110m",selPkg.getPREPAR_TEST_Ag_110m());
|
||||
setNuclideData("C-14",selPkg.getPREPAR_TEST_C_14());
|
||||
setNuclideData("Ce-144",selPkg.getPREPAR_TEST_Ce_144());
|
||||
setNuclideData("Co-57",selPkg.getPREPAR_TEST_Co_57());
|
||||
setNuclideData("Co-58",selPkg.getPREPAR_TEST_Co_58());
|
||||
setNuclideData("Co-60",selPkg.getPREPAR_TEST_Co_60());
|
||||
setNuclideData("Cr-51",selPkg.getPREPAR_TEST_Cr_51());
|
||||
setNuclideData("Cs-134",selPkg.getPREPAR_TEST_Cs_134());
|
||||
setNuclideData("Cs-137",selPkg.getPREPAR_TEST_Cs_137());
|
||||
setNuclideData("Eu-152",selPkg.getPREPAR_TEST_Eu_152());
|
||||
setNuclideData("Eu-154",selPkg.getPREPAR_TEST_Eu_154());
|
||||
setNuclideData("Fe-55",selPkg.getPREPAR_TEST_Fe_55());
|
||||
setNuclideData("Fe-59",selPkg.getPREPAR_TEST_Fe_59());
|
||||
setNuclideData("G-Alpha",selPkg.getPREPAR_TEST_G_Alpha());
|
||||
setNuclideData("H-3",selPkg.getPREPAR_TEST_H_3());
|
||||
setNuclideData("I-129",selPkg.getPREPAR_TEST_I_129());
|
||||
setNuclideData("Mn-54",selPkg.getPREPAR_TEST_Mn_54());
|
||||
setNuclideData("Nb-94",selPkg.getPREPAR_TEST_Nb_94());
|
||||
setNuclideData("Nb-95",selPkg.getPREPAR_TEST_Nb_95());
|
||||
setNuclideData("Ni-59",selPkg.getPREPAR_TEST_Ni_59());
|
||||
setNuclideData("Ni-63",selPkg.getPREPAR_TEST_Ni_63());
|
||||
setNuclideData("Sb-125",selPkg.getPREPAR_TEST_Sb_125());
|
||||
setNuclideData("Sr-90",selPkg.getPREPAR_TEST_Sr_90());
|
||||
setNuclideData("Tc-99",selPkg.getPREPAR_TEST_Tc_99());
|
||||
setNuclideData("Zn-65",selPkg.getPREPAR_TEST_Zn_65());
|
||||
setNuclideData("Zr-95",selPkg.getPREPAR_TEST_Zr_95());
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -258,9 +686,10 @@ public class InfoFragment extends Fragment {
|
||||
|
||||
|
||||
TextView editText = new TextView(context);
|
||||
editText.setText(" "+title);
|
||||
editText.setText(title);
|
||||
editText.setGravity(Gravity.LEFT);
|
||||
editText.setPadding(10,0,0,0);
|
||||
editText.setTextColor(Color.BLACK);
|
||||
editText.setPadding(inttodp(10),0,0,0);
|
||||
editText.setTextSize(TypedValue.COMPLEX_UNIT_SP,16);
|
||||
editText.setLayoutParams(titleParam);
|
||||
|
||||
@@ -272,8 +701,10 @@ public class InfoFragment extends Fragment {
|
||||
TextView infoText = new TextView(context);
|
||||
infoText.setText(dataManager.selPkg.getPKG_NO());
|
||||
infoText.setGravity(Gravity.LEFT);
|
||||
infoText.setTextColor(Color.BLACK);
|
||||
infoText.setTextSize(TypedValue.COMPLEX_UNIT_SP,16);
|
||||
infoText.setLayoutParams(infoTextParam);
|
||||
infoText.setText("");
|
||||
|
||||
t1.addView(editText);
|
||||
t1.addView(infoText);
|
||||
@@ -282,12 +713,89 @@ public class InfoFragment extends Fragment {
|
||||
return infoText;
|
||||
}
|
||||
|
||||
public NuclideItem createNuclideItem(LinearLayout parentLayout, String title){
|
||||
|
||||
NuclideItem item = new NuclideItem(createNuclideTextViewTitle(),
|
||||
createNuclideTextViewContent(),
|
||||
createNuclideTextViewContent());
|
||||
|
||||
item.setName(title);
|
||||
|
||||
LinearLayout linearLayout = new LinearLayout(context);
|
||||
linearLayout.setOrientation(LinearLayout.VERTICAL);
|
||||
LinearLayout.LayoutParams mParams = new LinearLayout.LayoutParams(
|
||||
LinearLayout.LayoutParams.MATCH_PARENT,
|
||||
LinearLayout.LayoutParams.WRAP_CONTENT);
|
||||
mParams.setMargins(0,0,0,inttodp(10));
|
||||
linearLayout.setLayoutParams(mParams);
|
||||
|
||||
linearLayout.setBackgroundResource(R.drawable.nuclide_item_background);
|
||||
|
||||
|
||||
linearLayout.addView(item.getName());
|
||||
linearLayout.addView(item.getConcentration());
|
||||
linearLayout.addView(item.getRadioactivity());
|
||||
|
||||
parentLayout.addView(linearLayout);
|
||||
|
||||
return item;
|
||||
|
||||
}
|
||||
|
||||
public TextView createNuclideTextViewTitle()
|
||||
{
|
||||
LinearLayout.LayoutParams titleParam = new LinearLayout.LayoutParams(
|
||||
LinearLayout.LayoutParams.MATCH_PARENT,
|
||||
LinearLayout.LayoutParams.WRAP_CONTENT);
|
||||
|
||||
TextView textView = new TextView(context);
|
||||
textView.setGravity(Gravity.LEFT);
|
||||
textView.setPadding(inttodp(10),inttodp(10),0,inttodp(10));
|
||||
textView.setTextColor(Color.BLACK);
|
||||
textView.setTextSize(TypedValue.COMPLEX_UNIT_SP,18);
|
||||
textView.setTypeface(null, Typeface.BOLD);
|
||||
textView.setLayoutParams(titleParam);
|
||||
|
||||
return textView;
|
||||
}
|
||||
|
||||
public TextView createNuclideTextViewContent()
|
||||
{
|
||||
LinearLayout.LayoutParams titleParam = new LinearLayout.LayoutParams(
|
||||
LinearLayout.LayoutParams.MATCH_PARENT,
|
||||
LinearLayout.LayoutParams.WRAP_CONTENT);
|
||||
|
||||
TextView textView = new TextView(context);
|
||||
textView.setGravity(Gravity.LEFT);
|
||||
textView.setPadding(inttodp(10),0,0,0);
|
||||
textView.setTextColor(Color.BLACK);
|
||||
textView.setTextSize(TypedValue.COMPLEX_UNIT_SP,16);
|
||||
textView.setLayoutParams(titleParam);
|
||||
|
||||
return textView;
|
||||
}
|
||||
|
||||
|
||||
private void setNuclideData(String title, String concentration)
|
||||
{
|
||||
double resultRation = 0.0;
|
||||
if(concentration != null && !concentration.isEmpty())
|
||||
{
|
||||
resultRation = Double.parseDouble(concentration) * inWTMbq / 1000;
|
||||
}
|
||||
|
||||
|
||||
connectNuclideItemMap.get(title).setData(concentration,resultRation+"");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.O)
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
viewpagerWidth = sliderViewPager.getWidth();
|
||||
viewpagerheight = sliderViewPager.getHeight();
|
||||
updateView();
|
||||
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@ import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.qtagger.Activity.CameraActivity;
|
||||
import com.qtagger.Database.TestType;
|
||||
import com.qtagger.R;
|
||||
import com.qtagger.util.CommonHelper;
|
||||
import com.qtagger.util.DataManager;
|
||||
@@ -78,15 +80,6 @@ public class PhotographFragment extends Fragment {
|
||||
mParam2 = getArguments().getString(ARG_PARAM2);
|
||||
}
|
||||
}
|
||||
ActivityResultLauncher<Intent> activityResultPicture = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new ActivityResultCallback<ActivityResult>() {
|
||||
@RequiresApi(api = Build.VERSION_CODES.M)
|
||||
@Override
|
||||
public void onActivityResult(ActivityResult result) {
|
||||
Bitmap bmp = CommonHelper.CameraResult(result);
|
||||
pictureAdd.setBackground(new BitmapDrawable(bmp));
|
||||
pictureAdd.setForeground(null);
|
||||
}
|
||||
});
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
@@ -99,50 +92,14 @@ public class PhotographFragment extends Fragment {
|
||||
pictureAdd.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
boolean permission = CommonHelper.CheckCameraPermission(getActivity());
|
||||
|
||||
activityResultPicture.launch(dataManager.cameraIntent);
|
||||
Intent cameraIntent = new Intent(getActivity().getApplicationContext(), CameraActivity.class);
|
||||
startActivity(cameraIntent);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
Button t1 = view.findViewById(R.id.button_picture1_test);
|
||||
|
||||
t1.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@RequiresApi(api = Build.VERSION_CODES.M)
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
t1.setForeground(getActivity().getDrawable(R.drawable.circle_foreground));
|
||||
t1.setForegroundGravity(Gravity.TOP|Gravity.RIGHT);
|
||||
|
||||
view.findViewById(R.id.linearlayout_tool).setVisibility(View.VISIBLE);
|
||||
return false;
|
||||
//linearlayout_tool
|
||||
}
|
||||
});
|
||||
t1.setOnClickListener(new View.OnClickListener() {
|
||||
@RequiresApi(api = Build.VERSION_CODES.M)
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
t1.setForeground(getActivity().getDrawable(R.drawable.circle_check_foreground));
|
||||
t1.setForegroundGravity(Gravity.TOP|Gravity.RIGHT);
|
||||
}
|
||||
});*/
|
||||
|
||||
// Inflate the layout for this fragment
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
if (requestCode == Image_Capture_Code) {
|
||||
if (resultCode == RESULT_OK) {
|
||||
Bitmap bp = (Bitmap) data.getExtras().get("data");
|
||||
pictureAdd.setBackground(new BitmapDrawable(bp));
|
||||
} else if (resultCode == RESULT_CANCELED) {
|
||||
Toast.makeText(getActivity(), "Cancelled", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,7 @@ import com.qtagger.util.DataManager;
|
||||
|
||||
public class TestActivity extends AppCompatActivity {
|
||||
Fragment surfaceFragment, m1Fragment, weightFragment, fillFragment, pictureFragment, infoFragment;
|
||||
TextView textViewRadiation;
|
||||
TextView textViewRadiation,textView_TestEnum,textView_TestEnum2;
|
||||
TabLayout tabs;
|
||||
DataManager dataManager = DataManager.getInstance();
|
||||
@Override
|
||||
@@ -37,6 +37,8 @@ public class TestActivity extends AppCompatActivity {
|
||||
pictureFragment = new PhotographFragment();
|
||||
infoFragment = new InfoFragment();
|
||||
textViewRadiation = findViewById(R.id.textViewRadiation);
|
||||
textView_TestEnum = findViewById(R.id.textView_TestEnum);
|
||||
textView_TestEnum2 = findViewById(R.id.textView_TestEnum2);
|
||||
|
||||
findViewById(R.id.imageFilterButton_Back).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
@@ -116,13 +118,41 @@ public class TestActivity extends AppCompatActivity {
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
|
||||
if(dataManager.testEnum == TestEnum.발생지특성검사)
|
||||
if(dataManager.testEnum != TestEnum.선택안함)
|
||||
{
|
||||
if(dataManager.selPkg != null)
|
||||
{
|
||||
textViewRadiation.setText(dataManager.selPkg.getPKG_NO());
|
||||
}
|
||||
}
|
||||
//textView_TestEnum
|
||||
|
||||
if(dataManager.testEnum == TestEnum.발생지특성규명)
|
||||
{
|
||||
textView_TestEnum.setVisibility(View.VISIBLE);
|
||||
textView_TestEnum2.setVisibility(View.GONE);
|
||||
}
|
||||
else if(dataManager.testEnum != TestEnum.선택안함)
|
||||
{
|
||||
textView_TestEnum.setVisibility(View.INVISIBLE);
|
||||
textView_TestEnum2.setVisibility(View.VISIBLE);
|
||||
|
||||
if(dataManager.testEnum == TestEnum.처분검사)
|
||||
{
|
||||
textView_TestEnum2.setText("처분검사");
|
||||
}
|
||||
else if(dataManager.testEnum == TestEnum.인수검사)
|
||||
{
|
||||
textView_TestEnum2.setText("인수검사");
|
||||
}
|
||||
else if(dataManager.testEnum == TestEnum.예비검사)
|
||||
{
|
||||
textView_TestEnum2.setText("예비검사");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(dataManager.testTabPosition != -1)
|
||||
|
||||
@@ -50,10 +50,10 @@ public class TestSelectActivity extends AppCompatActivity {
|
||||
Activity thisActivity = this;
|
||||
|
||||
|
||||
findViewById(R.id.button_발생지특성검사).setOnClickListener(new View.OnClickListener() {
|
||||
findViewById(R.id.button_발생지특성규명).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dataManager.testEnum = TestEnum.발생지특성검사;
|
||||
dataManager.testEnum = TestEnum.발생지특성규명;
|
||||
//데이터 세팅
|
||||
|
||||
dataManager.pkgList = dataManager.dbHelper.getAllORIGIN_CHRCT();
|
||||
|
||||
62
app/src/main/java/com/qtagger/CustomPalette/NuclideItem.java
Normal file
62
app/src/main/java/com/qtagger/CustomPalette/NuclideItem.java
Normal file
@@ -0,0 +1,62 @@
|
||||
package com.qtagger.CustomPalette;
|
||||
|
||||
import android.widget.TextView;
|
||||
|
||||
public class NuclideItem {
|
||||
//핵종
|
||||
TextView name;
|
||||
//핵종농도
|
||||
TextView concentration;
|
||||
//방사능량
|
||||
TextView radioactivity;
|
||||
|
||||
public NuclideItem(TextView name, TextView concentration, TextView radioactivity) {
|
||||
this.name = name;
|
||||
this.concentration = concentration;
|
||||
this.radioactivity = radioactivity;
|
||||
}
|
||||
|
||||
public void setData(String ration, String activity){
|
||||
this.concentration.setText("핵종농도 : " + ration);
|
||||
this.radioactivity.setText("방사능량 : " + activity);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public TextView getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(TextView name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void setName(String title){
|
||||
this.name.setText(title);
|
||||
}
|
||||
|
||||
public TextView getConcentration() {
|
||||
return concentration;
|
||||
}
|
||||
|
||||
public void setConcentration(TextView concentration) {
|
||||
this.concentration = concentration;
|
||||
}
|
||||
|
||||
public void setConcentration(String title){
|
||||
this.concentration.setText(title);
|
||||
}
|
||||
|
||||
|
||||
public TextView getRadioactivity() {
|
||||
return radioactivity;
|
||||
}
|
||||
|
||||
public void setRadioactivity(TextView radioactivity) {
|
||||
this.radioactivity = radioactivity;
|
||||
}
|
||||
|
||||
public void setRadioactivity(String title){
|
||||
this.radioactivity.setText(title);
|
||||
}
|
||||
}
|
||||
@@ -5,14 +5,14 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public enum TestEnum {
|
||||
선택안함("NoSelect"),발생지특성검사("ORIGIN_CHRCT"),예비검사("PREPAR_TEST"),인수검사("ACCEPT_TEST"),처분검사("DISPOSAL_TEST");
|
||||
선택안함("NoSelect"),발생지특성규명("ORIGIN_CHRCT"),예비검사("PREPAR_TEST"),인수검사("ACCEPT_TEST"),처분검사("DISPOSAL_TEST");
|
||||
private final String label;
|
||||
|
||||
public static TestEnum getByName(String Name)
|
||||
{
|
||||
|
||||
if(Name.compareTo(발생지특성검사.name()) == 0)
|
||||
return 발생지특성검사;
|
||||
if(Name.compareTo(발생지특성규명.name()) == 0)
|
||||
return 발생지특성규명;
|
||||
else if(Name.compareTo(예비검사.name()) == 0)
|
||||
return 예비검사;
|
||||
else if(Name.compareTo(인수검사.name()) == 0)
|
||||
@@ -26,8 +26,8 @@ public enum TestEnum {
|
||||
public static TestEnum getByLabel(String Label)
|
||||
{
|
||||
|
||||
if(Label.compareTo(발생지특성검사.label) == 0)
|
||||
return 발생지특성검사;
|
||||
if(Label.compareTo(발생지특성규명.label) == 0)
|
||||
return 발생지특성규명;
|
||||
else if(Label.compareTo(예비검사.label) == 0)
|
||||
return 예비검사;
|
||||
else if(Label.compareTo(인수검사.label) == 0)
|
||||
@@ -56,7 +56,7 @@ public enum TestEnum {
|
||||
if(selectChecker) {
|
||||
keys.add("선택안함");
|
||||
}
|
||||
keys.add("발생지특성검사");
|
||||
keys.add("발생지특성규명");
|
||||
keys.add("예비검사");
|
||||
keys.add("인수검사");
|
||||
keys.add("처분검사");
|
||||
@@ -65,6 +65,6 @@ public enum TestEnum {
|
||||
}
|
||||
public static String[] getKeyNames()
|
||||
{
|
||||
return new String[] {"발생지특성검사", "예비검사", "인수검사", "처분검사"};
|
||||
return new String[] {"발생지특성규명", "예비검사", "인수검사", "처분검사"};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,8 @@ public class DBHelper extends SQLiteOpenHelper {
|
||||
db.execSQL("CREATE TABLE if NOT EXISTS PREPAR_TEST (PREPAR_SURFC_RD_RATE TEXT , PREPAR_SURFC_RD_DATE TEXT , PREPAR_TOT_WT TEXT , PREPAR_IN_WT TEXT , PREPAR_SURFC_PLT TEXT , PREPAR_SURFC_PLT_DATE TEXT , PREPAR_TOT_RD_QTY TEXT , PREPAR_NUCLIDE_ANALS_DATE TEXT , PREPAR_NUCLIDE_NAME TEXT , PREPAR_CHECKER TEXT , PREPAR_INSPECTOR_1 TEXT , PREPAR_IS_PASS_REMARK TEXT , PREPAR_MANAGT_DATE TEXT , PREPAR_APPROVAL_DATE TEXT , PREPAR_NOT_PASS_REMARK TEXT , PREPAR_MANAGT_REMARK TEXT , PREPAR_MANAGT_RESULT TEXT , PREPAR_MANER TEXT , PREPAR_APPROVER TEXT , PREPAR_MNG_NUM TEXT , PREPAR_NOT_PASS_DATE TEXT , PREPAR_TEST_PASS TEXT , TEST TEXT , PREPAR_REQ_REMARK TEXT , PREPAR_WASTE_TYPE TEXT , PREPAR_TEST_ROT TEXT , PREPAR_DOC_INSP TEXT , PREPAR_VISUAL_INSP_NOTE TEXT , PREPAR_VISUAL_INSP TEXT , PREPAR_INSP_TYPE TEXT , PREPAR_INSP_MET TEXT , PREPAR_RTNL_NMBR TEXT , PREPAR_FREE_WATER_PER TEXT , PREPAR_APT TEXT , PREPAR_FILL_RATE_PER TEXT , PREPAR_CHELATE TEXT , PREPAR_SLD_STABLE TEXT , PREPAR_HAZA_SUBSTANCES TEXT , PKG_NO TEXT PRIMARY KEY, PREPAR_TEST_TYPE TEXT , PREPAR_NUCLIDE_GROUP TEXT , PREPAR_DS_LIMIT TEXT , PREPAR_SELF_DS_PERM TEXT , PREPAR_NUCLIDE_VAL TEXT , PREPAR_TEST_IS_PASS TEXT , PREPAR_NOT_PASS_TYPE TEXT , PREPAR_TEST_Eu_152 TEXT , PREPAR_TEST_Co_57 TEXT , PREPAR_TEST_Fe_59 TEXT , PREPAR_TEST_Mn_54 TEXT , PREPAR_TEST_Nb_95 TEXT , PREPAR_TEST_Zn_65 TEXT , PREPAR_TEST_Zr_95 TEXT , PREPAR_TEST_Eu_154 TEXT , PREPAR_TEST_Ni_63 TEXT , PREPAR_TEST_DATE TEXT , PREPAR_INSPECTOR_2 TEXT , PREPAR_TEST_Sr_90 TEXT , PREPAR_TEST_Nb_94 TEXT , PREPAR_TEST_Tc_99 TEXT , PREPAR_TEST_Ag_110m TEXT , PREPAR_TEST_Sb_125 TEXT , PREPAR_TEST_I_129 TEXT , PREPAR_TEST_G_Alpha TEXT , PREPAR_TEST_H_3 TEXT , PREPAR_TEST_C_14 TEXT , PREPAR_TEST_Cr_51 TEXT , PREPAR_TEST_Fe_55 TEXT , PREPAR_TEST_Co_58 TEXT , PREPAR_TEST_Ni_59 TEXT , PREPAR_TEST_Co_60 TEXT , PREPAR_TEST_Cs_134 TEXT , PREPAR_TEST_Cs_137 TEXT , PREPAR_TEST_Ce_144 TEXT , PREPAR_DOC_INSP_NOTE TEXT , PREPAR_TEST1234 TEXT , PREPAR_TEST12342 TEXT );");
|
||||
db.execSQL("CREATE TABLE if NOT EXISTS ACCEPT_TEST (ACCEPT_TEST_TYPE TEXT , ACCEPT_NOT_PASS_TYPE TEXT , ACCEPT_IN_WT TEXT , ACCEPT_SURFC_RD_RATE TEXT , ACCEPT_SURFC_RD_DATE TEXT , ACCEPT_SURFC_PLT TEXT , ACCEPT_SURFC_PLT_DATE TEXT , ACCEPT_TOT_RD_QTY TEXT , ACCEPT_NUCLIDE_ANALS_DATE TEXT , ACCEPT_WASTE_TYPE TEXT , ACCEPT_NOT_PASS_REMARK TEXT , ACCEPT_INSP_MET TEXT , ACCEPT_TYPE_REMARK TEXT , ACCEPT_DOC_INSP TEXT , ACCEPT_DOC_INSP_REMARK TEXT , ACCEPT_VISUAL_INSP TEXT , ACCEPT_VISUAL_INSP_REMARK TEXT , ACCEPT_IS_PASS TEXT , ACCEPT_INSPECTOR TEXT , ACCEPT_CHECKER TEXT , ACCEPT_NOT_PASS_DATE TEXT , ACCEPT_REQ_REMARK TEXT , ACCEPT_MANAGT_REMARK TEXT , ACCEPT_MANER TEXT , ACCEPT_TEST_IS_PASS TEXT , ACCEPT_MANAGT_DATE TEXT , ACCEPT_MANAGT_RESULT TEXT , ACCEPT_APPROVER TEXT , ACCEPT_APPROVAL_DATE TEXT , ACCEPT_RE_TKIN_DATE TEXT , ACCEPT_CHELATE TEXT , ACCEPT_TEST_G_Alpha TEXT , ACCEPT_TEST_H_3 TEXT , ACCEPT_TEST_Cr_51 TEXT , ACCEPT_TEST_Fe_55 TEXT , ACCEPT_TEST_Co_58 TEXT , ACCEPT_TEST_Ni_59 TEXT , ACCEPT_TEST_Ni_63 TEXT , ACCEPT_TEST_Sr_90 TEXT , ACCEPT_TEST_Nb_94 TEXT , ACCEPT_APT TEXT , ACCEPT_APT_PER TEXT , ACCEPT_PASS_NOTE TEXT , ACCEPT_ROT TEXT , PKG_NO TEXT PRIMARY KEY, ACCEPT_TEST_TOT_WT TEXT , ACCEPT_RTNL_NMBR TEXT , ACCEPT_RTNL_NMBR_PER TEXT , ACCEPT_SLD_STABLE TEXT , ACCEPT_NXS_SBSTN TEXT , ACCEPT_TEST_DATE TEXT , ACCEPT_TEST_Tc_99 TEXT , ACCEPT_TEST_Ag_110m TEXT , ACCEPT_TEST_Sb_125 TEXT , ACCEPT_TEST_I_129 TEXT , ACCEPT_TEST_Cs_134 TEXT , ACCEPT_TEST_Cs_137 TEXT , ACCEPT_TEST_Ce_144 TEXT , ACCEPT_TEST_Eu_152 TEXT , ACCEPT_TEST_Co_57 TEXT , ACCEPT_TEST_Fe_59 TEXT , ACCEPT_TEST_Mn_54 TEXT , ACCEPT_TEST_Nb_95 TEXT , ACCEPT_TEST_Zn_65 TEXT , ACCEPT_TEST_Zr_95 TEXT , ACCEPT_TEST_C_14 TEXT , ACCEPT_TEST_Co_60 TEXT );");
|
||||
db.execSQL("CREATE TABLE if NOT EXISTS DISPOSAL_TEST (PKG_NO TEXT PRIMARY KEY, DISPOSAL_TYPE TEXT , DISPOSAL_NO TEXT , DISPOSAL_DCMNT_INSPC TEXT , DISPOSAL_VSL_INSPC TEXT , DISPOSAL_NCLD_ANLYS TEXT , DISPOSAL_DSTRC TEXT , DISPOSAL_X_RAY TEXT , DISPOSAL_TEST_NO TEXT , DISPOSAL_NCLD_ANLYS_DATE TEXT , DISPOSAL_RULING TEXT , DISPOSAL_NOTE TEXT , DISPOSAL_DATE TEXT , DISPOSAL_PM TEXT , DISPOSAL_CHECKER TEXT );");
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -36,8 +38,6 @@ public class DBHelper extends SQLiteOpenHelper {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public List<PKG> getAllORIGIN_CHRCT(){
|
||||
List<PKG> resultData = new ArrayList<PKG>();
|
||||
db = getWritableDatabase();
|
||||
@@ -111,7 +111,7 @@ public class DBHelper extends SQLiteOpenHelper {
|
||||
|
||||
public List<PKG> getAllTest(TestEnum testEnum)
|
||||
{
|
||||
if(testEnum == TestEnum.발생지특성검사)
|
||||
if(testEnum == TestEnum.발생지특성규명)
|
||||
return getAllORIGIN_CHRCT();
|
||||
else if(testEnum == TestEnum.예비검사)
|
||||
return getAllPREPAR_TEST();
|
||||
|
||||
57
app/src/main/java/com/qtagger/Database/NuclideData.java
Normal file
57
app/src/main/java/com/qtagger/Database/NuclideData.java
Normal file
@@ -0,0 +1,57 @@
|
||||
package com.qtagger.Database;
|
||||
|
||||
public class NuclideData {
|
||||
String name;
|
||||
String group;
|
||||
String halfLifeUnit;
|
||||
int dsLimit;
|
||||
double halfLife;
|
||||
|
||||
public NuclideData(String name, String group,String halfLifeUnit, int dsLimit, double halfLife) {
|
||||
this.name = name;
|
||||
this.group = group;
|
||||
this.halfLifeUnit = halfLifeUnit;
|
||||
this.dsLimit = dsLimit;
|
||||
this.halfLife = halfLife;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getGroup() {
|
||||
return group;
|
||||
}
|
||||
|
||||
public void setGroup(String group) {
|
||||
this.group = group;
|
||||
}
|
||||
|
||||
public int getDsLimit() {
|
||||
return dsLimit;
|
||||
}
|
||||
|
||||
public void setDsLimit(int dsLimit) {
|
||||
this.dsLimit = dsLimit;
|
||||
}
|
||||
|
||||
public double getHalfLife() {
|
||||
return halfLife;
|
||||
}
|
||||
|
||||
public void setHalfLife(double halfLife) {
|
||||
this.halfLife = halfLife;
|
||||
}
|
||||
|
||||
public String getHalfLifeUnit() {
|
||||
return halfLifeUnit;
|
||||
}
|
||||
|
||||
public void setHalfLifeUnit(String halfLifeUnit) {
|
||||
this.halfLifeUnit = halfLifeUnit;
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,7 @@ import com.qtagger.Activity.NavigationActivity;
|
||||
import com.qtagger.Activity.TestSelectActivity;
|
||||
import com.qtagger.Database.AccountData;
|
||||
import com.qtagger.Database.DBHelper;
|
||||
import com.qtagger.Database.NuclideData;
|
||||
import com.qtagger.util.CommonHelper;
|
||||
import com.qtagger.util.DataManager;
|
||||
|
||||
@@ -52,31 +53,7 @@ public class MainActivity extends AppCompatActivity {
|
||||
CommonHelper.CheckCameraPermission(this);
|
||||
CommonHelper.FolderClear();
|
||||
dataManager.dbHelper = new DBHelper(getApplicationContext());
|
||||
|
||||
/*
|
||||
SQLiteDatabase sqLiteOpenHelper = dbHelper.getWritableDatabase();
|
||||
|
||||
sqLiteOpenHelper.execSQL("INSERT INTO Account (accountId,accountName,accountDapt) VALUES('"+"gg"+"','"+"gg"+"','"+"gg"+"')");
|
||||
sqLiteOpenHelper.close();*/
|
||||
//db.execSQL("INSERT INTO Account (accountId,accountName,accountDapt) VALUES('"+ac.getAccountId()+"','"+ac.getAccountName()+"','"+ac.getAccountDapt()+"')");
|
||||
|
||||
|
||||
/*
|
||||
File path22 = getDatabasePath("groupDB");
|
||||
try {
|
||||
copy(path22,new File(Environment.getExternalStoragePublicDirectory(DIRECTORY_DOWNLOADS).getPath()+"/groupDB"));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
File path2 = getDatabasePath("AccountDB");
|
||||
try {
|
||||
copy(path2,new File(Environment.getExternalStoragePublicDirectory(DIRECTORY_DOWNLOADS).getPath()+"/AccountDB2"));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
*/
|
||||
|
||||
//dataManager.nuclideDataMap = CommonHelper.getAllNuclideData();
|
||||
|
||||
//테스트용도 나중에 삭제
|
||||
findViewById(R.id.imageView).setOnClickListener(v -> {
|
||||
@@ -172,4 +149,5 @@ public class MainActivity extends AppCompatActivity {
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,9 +9,14 @@ import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.content.res.AssetManager;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
@@ -25,6 +30,7 @@ import android.widget.ImageView;
|
||||
import android.widget.ListView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.googlecode.tesseract.android.ResultIterator;
|
||||
import com.googlecode.tesseract.android.TessBaseAPI;
|
||||
import com.qtagger.Activity.SyncActivity;
|
||||
import com.qtagger.Data.TestEnum;
|
||||
@@ -35,7 +41,13 @@ import com.qtagger.util.OracleQueryStr;
|
||||
import org.json.JSONObject;
|
||||
import org.opencv.android.OpenCVLoader;
|
||||
import org.opencv.android.Utils;
|
||||
import org.opencv.core.Core;
|
||||
import org.opencv.core.Mat;
|
||||
import org.opencv.core.MatOfPoint;
|
||||
import org.opencv.core.MatOfPoint2f;
|
||||
import org.opencv.core.Point;
|
||||
import org.opencv.core.Scalar;
|
||||
import org.opencv.core.Size;
|
||||
import org.opencv.imgproc.Imgproc;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
@@ -54,20 +66,33 @@ import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.ResultSetMetaData;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class test extends AppCompatActivity {
|
||||
static {
|
||||
System.loadLibrary("native-lib");
|
||||
}
|
||||
public Context mContext;
|
||||
ListView list1;
|
||||
ImageView imageView;
|
||||
private DataManager dataManager;
|
||||
TessBaseAPI tessBaseAPI;
|
||||
ProgressDialog progressDialog;
|
||||
Bitmap mOrigin;
|
||||
public Mat dot;
|
||||
List<MatOfPoint2f> new_contours;//와핑처리를 위한 컨투어 좌표
|
||||
String resultStr = "";
|
||||
public String ocr = "d05"; //eng, letsgodigital, 7seg, nse
|
||||
public boolean boxFlag = false;
|
||||
@SuppressLint("WrongThread")
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_test);
|
||||
mContext = this;
|
||||
dataManager = DataManager.getInstance();
|
||||
list1 = findViewById(R.id.list_test);
|
||||
|
||||
@@ -82,6 +107,7 @@ public class test extends AppCompatActivity {
|
||||
|
||||
if(checkLanguageFile(dir+"/tessdata","d05"))
|
||||
{
|
||||
/*
|
||||
tessBaseAPI.init(dir, "d05");
|
||||
|
||||
tessBaseAPI.setPageSegMode(TessBaseAPI.PageSegMode.PSM_SINGLE_LINE);
|
||||
@@ -96,7 +122,7 @@ public class test extends AppCompatActivity {
|
||||
Bitmap myBitmap = BitmapFactory.decodeFile(file.getAbsolutePath());
|
||||
tessBaseAPI.setImage(myBitmap);
|
||||
String resultText = tessBaseAPI.getUTF8Text();
|
||||
Log.i("Tess",resultText);
|
||||
Log.i("Tess",resultText);*/
|
||||
}
|
||||
|
||||
ArrayAdapter<String> aa_items = new ArrayAdapter<String>(this, androidx.appcompat.R.layout.support_simple_spinner_dropdown_item,testString)
|
||||
@@ -117,11 +143,26 @@ public class test extends AppCompatActivity {
|
||||
list1.setAdapter(aa_items);
|
||||
imageView = findViewById(R.id.imageViewTest);
|
||||
|
||||
AssetManager am = mContext.getAssets();
|
||||
InputStream inOrigin = null;
|
||||
try {
|
||||
inOrigin = am.open("weight06.jpg");
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
BitmapFactory.Options optionsOrigin = new BitmapFactory.Options();
|
||||
|
||||
//origin set
|
||||
mOrigin = BitmapFactory.decodeStream(inOrigin, null, optionsOrigin);
|
||||
imageView.setImageBitmap(mOrigin);
|
||||
|
||||
|
||||
findViewById(R.id.button3).setOnClickListener(new View.OnClickListener() {
|
||||
@RequiresApi(api = Build.VERSION_CODES.N)
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
/*
|
||||
progressDialog.show();
|
||||
|
||||
new Thread(()->{
|
||||
@@ -133,7 +174,8 @@ public class test extends AppCompatActivity {
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}).start();
|
||||
}).start();*/
|
||||
new AsyncWarping().execute();
|
||||
String testImage = "IMG_20220913_060413.jpg";
|
||||
String path = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM) +"/Camera/"+ testImage;
|
||||
File file = new File(path);
|
||||
@@ -147,6 +189,8 @@ public class test extends AppCompatActivity {
|
||||
|
||||
/*
|
||||
new Thread(() ->{
|
||||
|
||||
|
||||
Bitmap myBitmap = BitmapFactory.decodeFile(file.getAbsolutePath());
|
||||
|
||||
myBitmap = getGrayscale(myBitmap);
|
||||
@@ -182,7 +226,7 @@ public class test extends AppCompatActivity {
|
||||
|
||||
|
||||
new Thread(() ->{
|
||||
OracleGet(TestEnum.발생지특성검사);
|
||||
OracleGet(TestEnum.발생지특성규명);
|
||||
OracleGet(TestEnum.인수검사);
|
||||
OracleGet(TestEnum.예비검사);
|
||||
OracleGet(TestEnum.처분검사);
|
||||
@@ -406,4 +450,658 @@ public class test extends AppCompatActivity {
|
||||
|
||||
}.execute();
|
||||
}
|
||||
|
||||
private class AsyncWarping extends AsyncTask<String, Integer, Bitmap> {
|
||||
@Override
|
||||
protected Bitmap doInBackground(String... cnts) {
|
||||
|
||||
BitmapDrawable drawable = (BitmapDrawable) imageView.getDrawable();
|
||||
Bitmap bitmap = drawable.getBitmap();
|
||||
|
||||
Bitmap result = getRecognitionDigit();
|
||||
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
protected void onPostExecute(Bitmap result) {
|
||||
|
||||
if(result != null)
|
||||
{
|
||||
imageView.setImageBitmap(result);
|
||||
}
|
||||
else
|
||||
{
|
||||
Toast.makeText(mContext, "이미지 검출 불가.", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//전처리 과정이 들어간 숫자인식
|
||||
@SuppressLint("WrongConstant")
|
||||
public Bitmap getRecognitionDigit()
|
||||
{
|
||||
BitmapDrawable drawable = (BitmapDrawable) imageView.getDrawable();
|
||||
Bitmap bitmap = mOrigin;
|
||||
Bitmap result = null;
|
||||
|
||||
if(mOrigin == null)
|
||||
{
|
||||
Log.e("error","mOrigin null");
|
||||
return null;
|
||||
}
|
||||
|
||||
Mat ori = new Mat();
|
||||
Utils.bitmapToMat(bitmap, ori);
|
||||
|
||||
|
||||
|
||||
double rt = (double)(ori.width() / 1920);
|
||||
|
||||
Log.i("size", rt+", " + ori.width() + ", " + ori.height());
|
||||
if (rt > 0)
|
||||
{
|
||||
Imgproc.resize(ori, ori, new Size(ori.width() / rt, ori.height() / rt));
|
||||
}
|
||||
|
||||
Log.i("size", rt+", " + ori.width() + ", " + ori.height());
|
||||
|
||||
Mat gray = new Mat();
|
||||
Mat edged = new Mat();
|
||||
Mat binary = new Mat();
|
||||
Mat bilateral_filter = new Mat();
|
||||
|
||||
Mat clone = ori.clone();
|
||||
|
||||
// Mat mat = findBigEdge(ori);
|
||||
// Utils.matToBitmap(mat, result);
|
||||
// img.setImageBitmap(result);
|
||||
|
||||
MatOfPoint2f pt = findBigEdge(ori);
|
||||
|
||||
if(pt == null)
|
||||
{
|
||||
Log.e("error","pt 0");
|
||||
return null;
|
||||
}
|
||||
|
||||
Mat core = warp(ori, pt);
|
||||
// Log.i("pt",pt.toList().get(0).x+","+pt.toList().get(0).y);
|
||||
// Log.i("pt",pt.toList().get(1).x+","+pt.toList().get(1).y);
|
||||
// Log.i("pt",pt.toList().get(2).x+","+pt.toList().get(2).y);
|
||||
// Log.i("pt",pt.toList().get(3).x+","+pt.toList().get(3).y);
|
||||
// //와핑처리 후 이미지
|
||||
// result = Bitmap.createBitmap(core.cols(), core.rows(), Bitmap.Config.ARGB_8888);
|
||||
// Utils.matToBitmap(core, result);
|
||||
|
||||
int blurH = (int)(core.height() * 0.05);
|
||||
blurH = blurH % 2 == 0 ? blurH -1 : blurH;
|
||||
Log.i("blurH",blurH+"");
|
||||
Imgproc.GaussianBlur(core, core, new Size(1,blurH), 1, 5, 4);
|
||||
|
||||
//노이즈 제거 로직
|
||||
Mat kernel = new Mat();
|
||||
kernel = Imgproc.getStructuringElement(Imgproc.MORPH_RECT,new Size(5, 5));
|
||||
Imgproc.morphologyEx(core, core, Imgproc.MORPH_OPEN, kernel);
|
||||
|
||||
// double rtt = core.width() / 480;
|
||||
double rtt = core.width() / 400;
|
||||
Log.i("rtt", rtt+"");
|
||||
Log.i("core", core.width() +"," + core.height() + "," + core.width() / rtt + "," + core.height() / rtt );
|
||||
|
||||
if(rtt == 0.0)
|
||||
{
|
||||
Log.e("error","rtt 0");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Imgproc.resize(core, core, new Size(core.width() / rtt, core.height() / rtt));
|
||||
// Imgproc.resize(core, core, new Size(core.width(), core.height()));
|
||||
//일반적인 경우
|
||||
{
|
||||
//안드로이드 같은경우는 기본 RGB로 되어있기때문에 BGR로 변환후 작업한다.
|
||||
Imgproc.cvtColor(core, core, Imgproc.COLOR_RGB2BGR);
|
||||
Imgproc.cvtColor(core, core, Imgproc.COLOR_BGR2HSV);
|
||||
|
||||
Mat paper0 = new Mat();
|
||||
Mat paper1 = new Mat();
|
||||
|
||||
Core.inRange(core, new Scalar(0, 30, 200), new Scalar(60, 255, 255), paper0);
|
||||
Core.inRange(core, new Scalar(130, 30, 200), new Scalar(180, 255, 255), paper1);
|
||||
Core.bitwise_or(paper0, paper1, core);
|
||||
|
||||
Imgproc.threshold(core, binary, 190, 255, Imgproc.THRESH_BINARY_INV);
|
||||
|
||||
//텍스트 살짝 회전
|
||||
binary = DisplayWarp(binary);
|
||||
|
||||
|
||||
//
|
||||
//텍스트 마디 사이 붙이기
|
||||
// binary = CorrectionDigit(binary);
|
||||
|
||||
//점 제거
|
||||
// binary = deleteDot(binary);
|
||||
dot = binary;
|
||||
|
||||
result = Bitmap.createBitmap(binary.cols(), binary.rows(), Bitmap.Config.ARGB_8888);
|
||||
Utils.matToBitmap(binary, result);
|
||||
|
||||
//검정 흰색 변환처리 쌩으로처리
|
||||
// for(int y = 0; y < result.getHeight(); y++){
|
||||
// for(int x = 0; x < result.getWidth(); x++){
|
||||
// int pixel = result.getPixel(x,y);
|
||||
// if (pixel == Color.WHITE){
|
||||
// result.setPixel(x, y, Color.BLACK);
|
||||
// } else {
|
||||
// result.setPixel(x, y, Color.WHITE);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
{
|
||||
TessBaseAPI tessBaseAPI = new TessBaseAPI();
|
||||
TessBaseAPI tessBaseAPISub = new TessBaseAPI();
|
||||
|
||||
String dir = getFilesDir() + "/tesseract";
|
||||
|
||||
Log.i("testocr",ocr);
|
||||
if(checkLanguageFile(dir+"/tessdata", ocr))
|
||||
{
|
||||
tessBaseAPI.init(dir, ocr);
|
||||
|
||||
tessBaseAPI.setPageSegMode(TessBaseAPI.PageSegMode.PSM_SINGLE_LINE); // 그외엔 별로 소용없음
|
||||
tessBaseAPI.setVariable(TessBaseAPI.VAR_CHAR_BLACKLIST, ",!?@#$%&*()<>_-+=/:;'\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz");
|
||||
tessBaseAPI.setVariable(TessBaseAPI.VAR_CHAR_WHITELIST, "1234567890.");
|
||||
tessBaseAPI.setVariable("classify_bln_numeric_mode", "1");
|
||||
}
|
||||
|
||||
|
||||
// result = Bitmap.createBitmap(value1.cols(), value1.rows(), Bitmap.Config.ARGB_8888);
|
||||
// Utils.matToBitmap(value1, result);
|
||||
|
||||
tessBaseAPI.setImage(result);
|
||||
Log.i("result text", tessBaseAPI.getUTF8Text());
|
||||
String str = tessBaseAPI.getUTF8Text();
|
||||
//tessBaseAPI.beginDocument();
|
||||
|
||||
str.replace(" ", "");
|
||||
char[] ch = str.toCharArray();
|
||||
|
||||
if(ch.length > 0)
|
||||
{
|
||||
Paint p = new Paint();
|
||||
p.setStyle(Paint.Style.STROKE);
|
||||
p.setAntiAlias(true);
|
||||
p.setFilterBitmap(true);
|
||||
p.setDither(true);
|
||||
p.setColor(Color.RED);
|
||||
|
||||
Canvas c = new Canvas(result);
|
||||
|
||||
//영역추출하기
|
||||
ResultIterator iterator = tessBaseAPI.getResultIterator();
|
||||
int[] lastBoundingBox;
|
||||
ArrayList< android.graphics.Rect> charBoxes = new ArrayList< android.graphics.Rect>();
|
||||
|
||||
iterator.begin();
|
||||
do {
|
||||
//박스 정보를 추가 및 출력
|
||||
lastBoundingBox =iterator.getBoundingBox(TessBaseAPI.PageIteratorLevel.RIL_SYMBOL);
|
||||
android.graphics.Rect lastRectBox = new android.graphics.Rect(lastBoundingBox[0], lastBoundingBox[1],
|
||||
lastBoundingBox[2], lastBoundingBox[3]);
|
||||
charBoxes.add(lastRectBox);
|
||||
|
||||
if(boxFlag)
|
||||
c.drawRect(lastRectBox, p);
|
||||
|
||||
} while (iterator.next(TessBaseAPI.PageIteratorLevel.RIL_SYMBOL));
|
||||
iterator.delete();
|
||||
|
||||
//좌표정보 및 후보정
|
||||
for (int i = 0; i<charBoxes.size();i++)
|
||||
{
|
||||
Log.i("tt", ch[i] + "");
|
||||
if(ch[i] == '8' || ch[i] == '0')
|
||||
{
|
||||
Log.i("tt11", ch[i] + "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resultStr = str;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public MatOfPoint2f findBigEdge(Mat src)
|
||||
// public Mat findBigEdge(Mat src)
|
||||
{
|
||||
Mat gray = new Mat();
|
||||
Mat binary = new Mat();
|
||||
Mat gaussian_blur = new Mat();
|
||||
Mat edged = new Mat();
|
||||
|
||||
Imgproc.cvtColor(src, gray, Imgproc.COLOR_RGB2GRAY);
|
||||
Imgproc.threshold(gray, binary, 100, 255, Imgproc.THRESH_BINARY);
|
||||
Imgproc.GaussianBlur(binary, gaussian_blur, new Size(37,37), 1, 1, 4);
|
||||
Imgproc.Canny(gaussian_blur, edged, 75, 200);
|
||||
|
||||
List<MatOfPoint> contours = new ArrayList<MatOfPoint>();
|
||||
Mat hierarchy = new Mat();
|
||||
|
||||
Imgproc.findContours(edged, contours, hierarchy, Imgproc.RETR_TREE, Imgproc.CHAIN_APPROX_SIMPLE);
|
||||
|
||||
new_contours = new ArrayList<MatOfPoint2f>();
|
||||
List<MatOfPoint> largest_contours = new ArrayList<MatOfPoint>();
|
||||
List<Double> areas = new ArrayList<Double>();
|
||||
|
||||
|
||||
int count = -50000;
|
||||
while(largest_contours.size() == 0)
|
||||
{
|
||||
Log.i("count", count+"");
|
||||
|
||||
for(int i = 0; 0<=i; i = (int) hierarchy.get(0, i)[0]) {
|
||||
|
||||
MatOfPoint matOfPoint = contours.get(i);
|
||||
MatOfPoint2f matOfPoint2f = new MatOfPoint2f(matOfPoint.toArray());
|
||||
MatOfPoint2f approx = new MatOfPoint2f();
|
||||
double epsilon = Imgproc.arcLength(matOfPoint2f, true);
|
||||
|
||||
Imgproc.approxPolyDP(matOfPoint2f, approx, 0.03 * epsilon, true);
|
||||
// Imgproc.approxPolyDP(matOfPoint2f, approx, 0.003 * epsilon, true);
|
||||
|
||||
double area = Imgproc.contourArea(approx, true);
|
||||
|
||||
// if (epsilon > src.width() / 2 && area < -30000) //1, 2, 3, 4, 6번 샘플만, 5번샘플은 아예 못찾음 // 디폴트
|
||||
if (epsilon > src.width() / 2 && area < count) //1, 2, 3, 4, 6번 샘플만, 5번샘플은 아예 못찾음
|
||||
{
|
||||
Log.i("findBigEdge", "area : " + area + ", epsilon : " + epsilon + ", width : " + src.width());
|
||||
|
||||
areas.add(area);
|
||||
new_contours.add(approx);
|
||||
largest_contours.add(matOfPoint);
|
||||
// Imgproc.drawContours(edged, largest_contours, -1, new Scalar(0, 255, 0), 3);
|
||||
}
|
||||
}
|
||||
|
||||
if(largest_contours.size() == 0)
|
||||
{
|
||||
count = count + 1000;
|
||||
}
|
||||
|
||||
if(largest_contours.size() > 0)
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
// for(int i = 0; i<largest_contours.size(); i++)
|
||||
// {
|
||||
// Log.i("gdgdgdd", "area : " + areas.get(i));
|
||||
// }
|
||||
|
||||
Log.i("findBigEdge", "contours : " + contours.size());
|
||||
Log.i("findBigEdge", "new_contours : " + new_contours.size());
|
||||
Log.i("findBigEdge", "largest_contours : " + largest_contours.size());
|
||||
|
||||
List<MatOfPoint2f> calc_contours = new ArrayList<MatOfPoint2f>();
|
||||
|
||||
for(int i = 0; i < new_contours.size(); i ++)
|
||||
{
|
||||
MatOfPoint2f pt = new_contours.get(i);
|
||||
|
||||
Point[] temp = new Point[4];
|
||||
|
||||
Point TopLeft = null;
|
||||
Point TopRight = null;
|
||||
|
||||
Point BottomLeft = null;
|
||||
Point BottomRight = null;
|
||||
|
||||
List<Point> top = pt.toList();
|
||||
List<Point> bottom = pt.toList();
|
||||
|
||||
////////harf찾기 위한 정렬처리
|
||||
//y축 오름차순
|
||||
Collections.sort(top, new Comparator<Point>() {
|
||||
@Override
|
||||
public int compare(Point o1, Point o2) {
|
||||
if(o1.y < o2.y) return -1;
|
||||
else if(o1.y > o2.y) return 1;
|
||||
else return 0;
|
||||
}
|
||||
});
|
||||
|
||||
//y축 내림차순
|
||||
Collections.sort(bottom, new Comparator<Point>() {
|
||||
@Override
|
||||
public int compare(Point o1, Point o2) {
|
||||
if(o1.y < o2.y) return 1;
|
||||
else if(o1.y > o2.y) return -1;
|
||||
else return 0;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
double half_Y = (bottom.get(0).y + top.get(0).y) / 2;
|
||||
|
||||
// Log.i("findBigEdge", "half_Y : " + half_Y);
|
||||
|
||||
// for(int j = 0; j<top.size(); j++)
|
||||
// {
|
||||
// Log.i(" top xy!! : ", "x : " +top.get(j).x + ", y : " + top.get(j).y);
|
||||
// }
|
||||
// for(int j = 0; j<top.size(); j++)
|
||||
// {
|
||||
// Log.i(" bottom xy!! : ", "x : " +bottom.get(j).x + ", y : " + bottom.get(j).y);
|
||||
// }
|
||||
|
||||
//y가 half_y보다 작은것중에 x 첫번째 작은것
|
||||
Collections.sort(top, new Comparator<Point>() {
|
||||
@Override
|
||||
public int compare(Point o1, Point o2) {
|
||||
if(o1.y < half_Y)
|
||||
{
|
||||
if(o1.x < o2.x) return -1;
|
||||
else if(o1.x > o2.x) return 1;
|
||||
else return 0;
|
||||
}
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
});
|
||||
|
||||
// for(int j = 0; j<top.size(); j++) Log.i(" top xy!! : ", "x : " +top.get(j).x + ", y : " + top.get(j).y);
|
||||
// Log.i("test", "---------------------");
|
||||
TopLeft = top.get(0);
|
||||
|
||||
|
||||
//y가 half_y보다 작은것중에 x 첫번째 큰것
|
||||
Collections.sort(top, new Comparator<Point>() {
|
||||
@Override
|
||||
public int compare(Point o1, Point o2) {
|
||||
if(o1.y < half_Y)
|
||||
{
|
||||
if(o1.x < o2.x) return 1;
|
||||
else if(o1.x > o2.x) return -1;
|
||||
else return 0;
|
||||
}
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
});
|
||||
|
||||
// for(int j = 0; j<top.size(); j++) Log.i(" top xy!! : ", "x : " +top.get(j).x + ", y : " + top.get(j).y);
|
||||
// Log.i("test", "---------------------");
|
||||
TopRight = top.get(0);
|
||||
|
||||
|
||||
//y가 half_y보다 큰것중에 x 첫번째 작은것
|
||||
Collections.sort(bottom, new Comparator<Point>() {
|
||||
@Override
|
||||
public int compare(Point o1, Point o2) {
|
||||
if(o1.y > half_Y)
|
||||
{
|
||||
if(o1.x < o2.x) return -1;
|
||||
else if(o1.x > o2.x) return 1;
|
||||
else return 0;
|
||||
}
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
});
|
||||
|
||||
// for(int j = 0; j<top.size(); j++) Log.i(" bottom xy!! : ", "x : " +bottom.get(j).x + ", y : " + bottom.get(j).y);
|
||||
// Log.i("test", "---------------------");
|
||||
BottomLeft = bottom.get(0);
|
||||
|
||||
|
||||
//y가 half_y보다 큰것중에 x 첫번째 작은것
|
||||
Collections.sort(bottom, new Comparator<Point>() {
|
||||
@Override
|
||||
public int compare(Point o1, Point o2) {
|
||||
if(o1.y > half_Y)
|
||||
{
|
||||
if(o1.x < o2.x) return 1;
|
||||
else if(o1.x > o2.x) return -1;
|
||||
else return 0;
|
||||
}
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
});
|
||||
|
||||
// for(int j = 0; j<top.size(); j++) Log.i(" bottom xy!! : ", "x : " +bottom.get(j).x + ", y : " + bottom.get(j).y);
|
||||
// Log.i("test", "---------------------");
|
||||
BottomRight = bottom.get(0);
|
||||
|
||||
|
||||
temp[0] = TopLeft;
|
||||
temp[1] = TopRight;
|
||||
temp[2] = BottomRight;
|
||||
temp[3] = BottomLeft;
|
||||
|
||||
// Log.i("TopLeft", "x : " + TopLeft.x + ", y : " + TopLeft.y);
|
||||
// Log.i("TopRight", "x : " + TopRight.x + ", y : " + TopRight.y);
|
||||
// Log.i("BottomLeft", "x : " + BottomLeft.x + ", y : " + BottomLeft.y);
|
||||
// Log.i("BottomRight", "x : " + BottomRight.x + ", y : " + BottomRight.y);
|
||||
|
||||
|
||||
double w1 = Math.sqrt(Math.pow(BottomRight.x - BottomLeft.x, 2)
|
||||
+ Math.pow(BottomRight.y - BottomLeft.y, 2));
|
||||
double w2 = Math.sqrt(Math.pow(TopRight.x - TopLeft.x, 2)
|
||||
+ Math.pow(TopRight.y - TopLeft.y, 2));
|
||||
|
||||
double h1 = Math.sqrt(Math.pow(TopRight.x - BottomRight.x, 2)
|
||||
+ Math.pow(TopRight.y - BottomRight.y, 2));
|
||||
double h2 = Math.sqrt(Math.pow(TopLeft.x - BottomLeft.x, 2)
|
||||
+ Math.pow(TopLeft.y - BottomLeft.y, 2));
|
||||
|
||||
float mw = (float)Math.max(w1, w2);
|
||||
float mh = (float)Math.max(h1, h2);
|
||||
|
||||
double rt = mw / mh;
|
||||
|
||||
// Log.i("test", rt+"");
|
||||
// if (4.3 < rt && rt < 5.7)
|
||||
{
|
||||
double u = (int)(mh * 0.07);
|
||||
|
||||
temp[0].x = temp[0].x - u;
|
||||
temp[0].y = temp[0].y - u;
|
||||
|
||||
temp[1].x = temp[1].x + u;
|
||||
temp[1].y = temp[1].y - u;
|
||||
|
||||
temp[2].x = temp[2].x + u;
|
||||
temp[2].y = temp[2].y + u;
|
||||
|
||||
temp[3].x = temp[3].x - u;
|
||||
temp[3].y = temp[3].y + u;
|
||||
|
||||
MatOfPoint2f mop= new MatOfPoint2f(temp);
|
||||
calc_contours.add(mop);
|
||||
}
|
||||
}
|
||||
|
||||
Log.i("calc ", calc_contours.size() + "");
|
||||
|
||||
// Imgproc.drawContours(src, largest_contours, -1, new Scalar(0, 0, 255), 5);
|
||||
//
|
||||
// return src;
|
||||
|
||||
|
||||
Collections.sort(calc_contours, new Comparator<MatOfPoint2f>() {
|
||||
@Override
|
||||
public int compare(MatOfPoint2f o1, MatOfPoint2f o2) {
|
||||
|
||||
double t1 = Imgproc.contourArea(o1);
|
||||
double t2 = Imgproc.contourArea(o2);
|
||||
|
||||
if(t1 < t2) return 1;
|
||||
else if(t1 < t2) return -1;
|
||||
else return 0;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
if(calc_contours.size() > 0)
|
||||
return calc_contours.get(0);
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
public Mat warp(Mat source, MatOfPoint2f pt)
|
||||
{
|
||||
Point TopLeft = null;
|
||||
Point TopRight = null;
|
||||
|
||||
Point BottomLeft = null;
|
||||
Point BottomRight = null;
|
||||
|
||||
List<Point> points = pt.toList();
|
||||
|
||||
// for(int i = 0; i<points.size(); i++)
|
||||
// {
|
||||
// Log.i("xy! : ", "x : " +points.get(i).x + ", y : " + points.get(i).y);
|
||||
// }
|
||||
|
||||
//정렬처리
|
||||
//if(points.size() == 4)
|
||||
{
|
||||
|
||||
//y축 오름차순
|
||||
Collections.sort(points, new Comparator<Point>() {
|
||||
@Override
|
||||
public int compare(Point o1, Point o2) {
|
||||
if(o1.y < o2.y) return -1;
|
||||
else if(o1.y > o2.y) return 1;
|
||||
else return 0;
|
||||
}
|
||||
});
|
||||
|
||||
List<Point> top = new ArrayList<Point>();
|
||||
top.add(points.get(0));
|
||||
top.add(points.get(1));
|
||||
List<Point> bottom = new ArrayList<Point>();
|
||||
bottom.add(points.get(2));
|
||||
bottom.add(points.get(3));
|
||||
|
||||
//y축 오름차순
|
||||
Collections.sort(bottom, new Comparator<Point>() {
|
||||
@Override
|
||||
public int compare(Point o1, Point o2) {
|
||||
if(o1.x < o2.x) return -1;
|
||||
else if(o1.x > o2.x) return 1;
|
||||
else return 0;
|
||||
}
|
||||
});
|
||||
|
||||
//y축 오름차순
|
||||
Collections.sort(top, new Comparator<Point>() {
|
||||
@Override
|
||||
public int compare(Point o1, Point o2) {
|
||||
if(o1.x < o2.x) return -1;
|
||||
else if(o1.x > o2.x) return 1;
|
||||
else return 0;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
TopLeft = top.get(0);
|
||||
TopRight = top.get(1);
|
||||
|
||||
BottomLeft = bottom.get(0);
|
||||
BottomRight = bottom.get(1);
|
||||
}
|
||||
|
||||
// for(int i = 0; i<points.size(); i++)
|
||||
// {
|
||||
// Log.i("xy!! : ", "x : " +points.get(i).x + ", y : " + points.get(i).y);
|
||||
// }
|
||||
|
||||
double w1 = Math.sqrt(Math.pow(BottomRight.x - BottomLeft.x, 2)
|
||||
+ Math.pow(BottomRight.y - BottomLeft.y, 2));
|
||||
double w2 = Math.sqrt(Math.pow(TopRight.x - TopLeft.x, 2)
|
||||
+ Math.pow(TopRight.y - TopLeft.y, 2));
|
||||
|
||||
double h1 = Math.sqrt(Math.pow(TopRight.x - BottomRight.x, 2)
|
||||
+ Math.pow(TopRight.y - BottomRight.y, 2));
|
||||
double h2 = Math.sqrt(Math.pow(TopLeft.x - BottomLeft.x, 2)
|
||||
+ Math.pow(TopLeft.y - BottomLeft.y, 2));
|
||||
|
||||
float mw = (float)Math.max(w1, w2);
|
||||
float mh = (float)Math.max(h1, h2);
|
||||
|
||||
// float mw = 100;
|
||||
// float mh = (float)mw * 1.414f;
|
||||
|
||||
Point[] src = new Point[4];
|
||||
Point[] dst = new Point[4];
|
||||
src[0] = TopLeft;
|
||||
src[1] = TopRight;
|
||||
src[2] = BottomRight;
|
||||
src[3] = BottomLeft;
|
||||
|
||||
|
||||
// Log.i("TopLeft", "x : " + TopLeft.x + ", y : " + TopLeft.y);
|
||||
// Log.i("TopRight", "x : " + TopRight.x + ", y : " + TopRight.y);
|
||||
// Log.i("BottomLeft", "x : " + BottomLeft.x + ", y : " + BottomLeft.y);
|
||||
// Log.i("BottomRight", "x : " + BottomRight.x + ", y : " + BottomRight.y);
|
||||
// Log.i("mw", ""+mw);
|
||||
// Log.i("mh", ""+mh);
|
||||
|
||||
dst[0] = new Point(0, 0);
|
||||
dst[1] = new Point(mw - 1, 0);
|
||||
dst[2] = new Point(mw - 1, mh - 1);
|
||||
dst[3] = new Point(0, mh - 1);
|
||||
|
||||
Mat warpMat = Imgproc.getPerspectiveTransform(new MatOfPoint2f(src), new MatOfPoint2f(dst));
|
||||
Mat warpDst = Mat.zeros( source.rows(), source.cols(), source.type() );
|
||||
|
||||
Imgproc.warpPerspective(source, warpDst, warpMat, new Size(mw, mh));
|
||||
|
||||
return warpDst;
|
||||
}
|
||||
|
||||
public Mat DisplayWarp(Mat binary)
|
||||
{
|
||||
Point[] warp1 = new Point[4];
|
||||
Point[] warp2 = new Point[4];
|
||||
|
||||
//jjh
|
||||
// double d = (int)(binary.height() * 0.175);
|
||||
double d = (int)(binary.height() * 0.1);
|
||||
// double d = (int)(binary.height() * 0.125);
|
||||
// double d = (int)(binary.height() * 0.105);
|
||||
|
||||
Log.i("testheight", binary.height() + "," + d);
|
||||
// d = 21;
|
||||
|
||||
warp1[0] = new Point(d, 0);
|
||||
warp1[1] = new Point(binary.width(), 0);
|
||||
warp1[2] = new Point(binary.width() - d, binary.height());
|
||||
warp1[3] = new Point(0, binary.height());
|
||||
|
||||
warp2[0] = new Point(0, 0);
|
||||
warp2[1] = new Point(binary.width(), 0);
|
||||
warp2[2] = new Point(binary.width(), binary.height());
|
||||
warp2[3] = new Point(0, binary.height());
|
||||
|
||||
|
||||
|
||||
|
||||
Mat warpMat = Imgproc.getPerspectiveTransform(new MatOfPoint2f(warp1), new MatOfPoint2f(warp2));
|
||||
Mat warpDst = Mat.zeros( binary.rows(), binary.cols(), binary.type() );
|
||||
|
||||
Imgproc.warpPerspective(binary, warpDst, warpMat, new Size(binary.width(), binary.height()));
|
||||
|
||||
return warpDst;
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,13 @@ import androidx.activity.result.ActivityResultLauncher;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.qtagger.Database.NuclideData;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class CommonHelper {
|
||||
|
||||
@@ -26,6 +32,10 @@ public class CommonHelper {
|
||||
public static String DefaultDBFolderPath = DefaultPath+"DB/";
|
||||
public static String DefaultImageFolderPath = DefaultPath+ "Image/";
|
||||
public static String DBName = "QTagger.db";
|
||||
// 년 기준
|
||||
private final static double stdrYear = 365.2422;
|
||||
// 시간 기준
|
||||
private final static double stdrHour = 24;
|
||||
|
||||
public static Bitmap CameraResult(ActivityResult result){
|
||||
if( result.getResultCode() == RESULT_OK && result.getData() != null){
|
||||
@@ -100,6 +110,77 @@ public class CommonHelper {
|
||||
return dir;
|
||||
}
|
||||
|
||||
public static double getTotalLad(double nuclideVal,long decayTime,double halfLife, String halfLifeUnit ) {
|
||||
|
||||
// 반감기를 일로 환산시킨다.
|
||||
switch (halfLifeUnit) {
|
||||
case "YY":
|
||||
halfLife = halfLife * stdrYear;
|
||||
break;
|
||||
case "SS":
|
||||
halfLife = halfLife / stdrHour;
|
||||
break;
|
||||
// DAY
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// 총방사능량을 계산한다.(핵종 * exp(-(log(2)*붕괴시간 / 반감기)))
|
||||
double result = nuclideVal * Math.exp(-(Math.log(2) * decayTime / halfLife));
|
||||
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
public static double getTotalLad(double nuclideVal,long decayTime,NuclideData nuclideData)
|
||||
{
|
||||
|
||||
|
||||
return getTotalLad(nuclideVal,decayTime,nuclideData.getHalfLife(),nuclideData.getHalfLifeUnit());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public static Map<String,NuclideData> getAllNuclideData(){
|
||||
Map<String,NuclideData> resultData = new HashMap<>();
|
||||
|
||||
resultData.put("Ag-110m",new NuclideData("Ag-110m","감마핵종","DD",0,249.7891406));
|
||||
resultData.put("C-14",new NuclideData("C-14","베타핵종","DD",222000,2092837.806));
|
||||
resultData.put("Ce-144",new NuclideData("Ce-144","감마핵종","DD",0,284.888916));
|
||||
resultData.put("Co-57",new NuclideData("Co-57","기타핵종","DD",0,271.7036726));
|
||||
resultData.put("Co-58",new NuclideData("Co-58","감마핵종","DD",0,70.8569868));
|
||||
resultData.put("Co-60",new NuclideData("Co-60","감마핵종","DD",37000000,1925.191636));
|
||||
resultData.put("Cr-51",new NuclideData("Cr-51","감마핵종","DD",0,27.68535876));
|
||||
resultData.put("Cs-134",new NuclideData("Cs-134","감마핵종","DD",0,754.225143));
|
||||
resultData.put("Cs-137",new NuclideData("Cs-137","감마핵종","DD",1110000,10971.87569));
|
||||
resultData.put("Eu-152",new NuclideData("Eu-152","베타핵종","YY",0,13.54));
|
||||
resultData.put("Eu-154",new NuclideData("Eu-154","베타핵종","YY",0,14.35));
|
||||
resultData.put("Fe-55",new NuclideData("Fe-55","베타핵종","DD",0,997.111206));
|
||||
resultData.put("Fe-59",new NuclideData("Fe-59","기타핵종","DD",0,44.48649996));
|
||||
resultData.put("G-Alpha",new NuclideData("G-Alpha","알파핵종","DD",3700,8805989.442));
|
||||
resultData.put("H-3",new NuclideData("H-3","베타핵종","DD",1110000,4503.436326));
|
||||
resultData.put("I-129",new NuclideData("I-129","베타핵종","DD",37,5734302540.0));
|
||||
resultData.put("Mn-54",new NuclideData("Mn-54","기타핵종","DD",0,312.0994599));
|
||||
resultData.put("Nb-94",new NuclideData("Nb-94","베타핵종","DD",111,7414416.66));
|
||||
resultData.put("Nb-95",new NuclideData("Nb-95","베타핵종","DD",0,34.99020276));
|
||||
resultData.put("Ni-59",new NuclideData("Ni-59","베타핵종","DD",74000,27758407.2));
|
||||
resultData.put("Ni-63",new NuclideData("Ni-63","베타핵종","DD",11100000,36560.74422));
|
||||
resultData.put("Sb-125",new NuclideData("Sb-125","감마핵종","DD",0,1007.337988));
|
||||
resultData.put("Sr-90",new NuclideData("Sr-90","베타핵종","DD",74000,10497.06083));
|
||||
resultData.put("Tc-99",new NuclideData("Tc-99","베타핵종","DD",1110,77102628.42));
|
||||
resultData.put("Zn-65",new NuclideData("Zn-65","기타핵종","DD",0,244.3105076));
|
||||
resultData.put("Zr-95",new NuclideData("Zr-95","기타핵종","DD",0,64.02695766));
|
||||
|
||||
|
||||
|
||||
return resultData;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -10,11 +10,13 @@ import com.qtagger.Database.ACCEPT_TEST;
|
||||
import com.qtagger.Database.AccountData;
|
||||
import com.qtagger.Database.DBHelper;
|
||||
import com.qtagger.Database.DISPOSAL_TEST;
|
||||
import com.qtagger.Database.NuclideData;
|
||||
import com.qtagger.Database.ORIGIN_CHRCT;
|
||||
import com.qtagger.Database.PKG;
|
||||
import com.qtagger.Database.PREPAR_TEST;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class DataManager {
|
||||
private DataManager(){}
|
||||
@@ -22,11 +24,13 @@ public class DataManager {
|
||||
public AccountData loginAccount;
|
||||
public FragmentManager fragmentManager;
|
||||
public DBHelper dbHelper;
|
||||
|
||||
public static TestEnum testEnum = TestEnum.선택안함;
|
||||
public static Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
public static final int CAMERA_PERMISSIONS_REQUEST_CODE = 100;
|
||||
public List<PKG> pkgList;
|
||||
public PKG selPkg;
|
||||
//public Map<String,NuclideData> nuclideDataMap;
|
||||
public int searchTabPosition = -1;
|
||||
public int testTabPosition = -1;
|
||||
|
||||
|
||||
@@ -1,16 +1,21 @@
|
||||
package com.qtagger.util;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.qtagger.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -70,13 +75,21 @@ public class ImageSliderAdapter extends RecyclerView.Adapter<ImageSliderAdapter.
|
||||
public MyViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
mImageView = itemView.findViewById(R.id.imageSlider);
|
||||
ConstraintLayout.LayoutParams titleParam = new ConstraintLayout.LayoutParams(
|
||||
LinearLayout.LayoutParams.MATCH_PARENT,
|
||||
LinearLayout.LayoutParams.MATCH_PARENT);
|
||||
mImageView.setLayoutParams(titleParam);
|
||||
mImageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
|
||||
|
||||
}
|
||||
|
||||
public void bindSliderImage(String imageURL) {
|
||||
if(imageURL != null) {
|
||||
mImageView.setImageBitmap(new BitmapDrawable(BitmapFactory.decodeFile(imageURL)).getBitmap());
|
||||
/*
|
||||
Glide.with(context)
|
||||
.load(imageURL)
|
||||
.into(mImageView);
|
||||
.into(mImageView);*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -305,7 +305,7 @@ public class OracleQueryStr {
|
||||
|
||||
public static String GetEnumQuery(TestEnum testEnum)
|
||||
{
|
||||
if(testEnum == TestEnum.발생지특성검사)
|
||||
if(testEnum == TestEnum.발생지특성규명)
|
||||
{
|
||||
return GetOriginChrct;
|
||||
}
|
||||
|
||||
BIN
app/src/main/res/drawable/arrows_left_blue_48.png
Normal file
BIN
app/src/main/res/drawable/arrows_left_blue_48.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
15
app/src/main/res/drawable/nuclide_item_background.xml
Normal file
15
app/src/main/res/drawable/nuclide_item_background.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<!-- -->
|
||||
<item>
|
||||
<shape>
|
||||
<solid android:color="#dddddd" />
|
||||
</shape>
|
||||
</item>
|
||||
<!-- -->
|
||||
<item android:top="2px"> <!-- -->
|
||||
<shape>
|
||||
<solid android:color="#ffffff" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
@@ -11,10 +11,10 @@
|
||||
android:topLeftRadius="12dp"
|
||||
android:topRightRadius="12dp" />
|
||||
<padding
|
||||
android:left="20dp"
|
||||
android:left="16dp"
|
||||
android:bottom="10dp"
|
||||
android:right="10dp"
|
||||
android:top="20dp"
|
||||
android:top="16dp"
|
||||
/>
|
||||
|
||||
</shape>
|
||||
BIN
app/src/main/res/drawable/upload_32.png
Normal file
BIN
app/src/main/res/drawable/upload_32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
@@ -78,14 +78,26 @@
|
||||
/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<android.widget.Button
|
||||
android:id="@+id/Item_Upload"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/upload_32"
|
||||
android:background="@drawable/button_list_background"
|
||||
android:paddingLeft="10dp"
|
||||
android:text=" 데이터 업로드"
|
||||
android:gravity="left|center"
|
||||
android:textSize="20sp"
|
||||
android:layout_gravity="left"
|
||||
/>
|
||||
<android.widget.Button
|
||||
android:id="@+id/Item_DBSync"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/sync_button_32"
|
||||
android:drawableLeft="@drawable/download_32"
|
||||
android:background="@drawable/button_list_background"
|
||||
android:paddingLeft="10dp"
|
||||
android:text=" 동기화"
|
||||
android:text=" 데이터 다운로드"
|
||||
android:gravity="left|center"
|
||||
android:textSize="20sp"
|
||||
android:layout_gravity="left"
|
||||
@@ -96,4 +108,5 @@
|
||||
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -17,7 +17,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="#FFFFFF"
|
||||
android:background="@android:color/transparent"
|
||||
android:minWidth="48dp"
|
||||
android:minHeight="48dp"
|
||||
android:src="@drawable/back_arrow_5821"
|
||||
@@ -30,6 +30,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="방폐물 선택"
|
||||
android:textColor="@color/black"
|
||||
android:textAlignment="center"
|
||||
android:textSize="24sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
@@ -10,37 +10,83 @@
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<androidx.constraintlayout.utils.widget.ImageFilterButton
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<android.widget.Button
|
||||
android:id="@+id/imageFilterButton_Back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#FFFFFF"
|
||||
android:minWidth="48dp"
|
||||
android:minHeight="48dp"
|
||||
android:src="@drawable/back_arrow_5821"
|
||||
android:layout_marginStart="16dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:drawableLeft="@drawable/arrows_left_48"
|
||||
android:textSize="18sp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:textColor="#007AFF"
|
||||
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<androidx.constraintlayout.utils.widget.ImageFilterButton
|
||||
android:id="@+id/imageFilterButton_Setting"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="#FFFFFF"
|
||||
android:minWidth="32dp"
|
||||
android:minHeight="32dp"
|
||||
android:src="@drawable/setting_32"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/textView_TestEnum"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewRadiation"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:autoSizeMaxTextSize="24sp"
|
||||
android:autoSizeMinTextSize="12sp"
|
||||
android:autoSizeStepGranularity="2sp"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:text="AR0000B000000"
|
||||
android:gravity="center"
|
||||
app:layout_constraintEnd_toStartOf="@+id/imageFilterButton_Setting"
|
||||
android:text="AR0000B000000"
|
||||
android:textColor="@color/black"
|
||||
app:layout_constraintEnd_toStartOf="@+id/textView_TestEnum"
|
||||
app:layout_constraintStart_toEndOf="@+id/imageFilterButton_Back"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_TestEnum"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:gravity="center"
|
||||
android:text="발생지\n특성규명"
|
||||
android:textColor="#2196F3"
|
||||
android:textSize="20sp"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintEnd_toStartOf="@+id/imageFilterButton_Setting"
|
||||
app:layout_constraintStart_toEndOf="@+id/textViewRadiation"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<TextView
|
||||
android:id="@+id/textView_TestEnum2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="18dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:gravity="center"
|
||||
android:text="예비검사"
|
||||
android:textColor="#2196F3"
|
||||
android:textSize="20sp"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintEnd_toStartOf="@+id/imageFilterButton_Setting"
|
||||
app:layout_constraintStart_toEndOf="@+id/textViewRadiation"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
|
||||
<View
|
||||
android:id="@+id/view2"
|
||||
android:layout_width="0dp"
|
||||
@@ -50,19 +96,6 @@
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<androidx.constraintlayout.utils.widget.ImageFilterButton
|
||||
android:id="@+id/imageFilterButton_Setting"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="#FFFFFF"
|
||||
android:minWidth="32dp"
|
||||
android:minHeight="32dp"
|
||||
android:src="@drawable/setting_32"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
@@ -98,7 +131,7 @@
|
||||
<com.google.android.material.tabs.TabItem
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="정보" />
|
||||
android:text="이력 정보" />
|
||||
</com.google.android.material.tabs.TabLayout>
|
||||
|
||||
<FrameLayout
|
||||
@@ -106,6 +139,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#F5F5F5"
|
||||
/>
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -13,6 +13,7 @@
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="검사 단계 선택"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="24sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -57,7 +58,7 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/view2">
|
||||
|
||||
<com.qtagger.CustomPalette.SquareButton
|
||||
android:id="@+id/button_발생지특성검사"
|
||||
android:id="@+id/button_발생지특성규명"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
@@ -69,7 +70,7 @@
|
||||
android:foreground="@drawable/originchrct_86"
|
||||
android:foregroundGravity="bottom|right"
|
||||
android:gravity="left|top"
|
||||
android:text="발생지 특성\n검사"
|
||||
android:text="발생지\n특성 규명"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<com.qtagger.CustomPalette.SquareButton
|
||||
|
||||
@@ -20,22 +20,68 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_defaultInfo"
|
||||
android:id="@+id/layout_defaultInfo1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="20dp"
|
||||
android:background="@drawable/default_fragment_background"
|
||||
android:orientation="vertical">
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_defaultInfo2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="20dp"
|
||||
android:background="@drawable/default_fragment_background"
|
||||
android:orientation="vertical">
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_nuclideInfo"
|
||||
android:id="@+id/layout_defaultInfo3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="20dp"
|
||||
android:background="@drawable/default_fragment_background"
|
||||
android:orientation="vertical">
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_nuclide"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:background="@drawable/default_fragment_background"
|
||||
android:orientation="vertical">
|
||||
<android.widget.Button
|
||||
android:id="@+id/button_folding_nuclide"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:drawableRight="@drawable/arrows_left_48"
|
||||
android:paddingLeft="10dp"
|
||||
android:text="핵종정보"
|
||||
android:textSize="24sp"
|
||||
android:textAlignment="textStart"
|
||||
/>
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_nuclideInfo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/default_fragment_background"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -49,6 +95,7 @@
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/TextView_addInfo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
@@ -94,11 +141,15 @@
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="500dp">
|
||||
android:layout_height="400dp">
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/sliderViewPager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
||||
@@ -8,129 +8,40 @@
|
||||
android:orientation="vertical"
|
||||
tools:context=".Activity.Test.PhotographFragment">
|
||||
|
||||
<LinearLayout
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="10dp"
|
||||
android:background="@drawable/default_fragment_background"
|
||||
android:layout_weight="1">
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/scroll2"
|
||||
android:fillViewport="true"
|
||||
android:scrollbars="none"
|
||||
android:layout_height="match_parent">
|
||||
<LinearLayout
|
||||
android:id="@+id/linearList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearList"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/default_fragment_background"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="24sp"
|
||||
android:text="사진">
|
||||
|
||||
</TextView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.qtagger.CustomPalette.SquareButton
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="300dp"
|
||||
android:layout_marginStart="3dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:layout_weight="1"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@drawable/weight_test_image"
|
||||
/>
|
||||
|
||||
<com.qtagger.CustomPalette.SquareButton
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="300dp"
|
||||
android:layout_marginStart="3dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:layout_weight="1"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@drawable/capture_test_image"
|
||||
android:foregroundGravity="center_vertical|center_horizontal" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.qtagger.CustomPalette.SquareButton
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="300dp"
|
||||
android:layout_marginStart="3dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:layout_weight="1"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@drawable/capture_test_image2"
|
||||
|
||||
android:foregroundGravity="center_vertical|center_horizontal" />
|
||||
|
||||
<com.qtagger.CustomPalette.SquareButton
|
||||
android:id="@+id/button_img_add"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="300dp"
|
||||
android:layout_marginStart="3dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:layout_weight="1"
|
||||
android:adjustViewBounds="true"
|
||||
android:foreground="@drawable/add_picture_32"
|
||||
android:foregroundGravity="center_vertical|center_horizontal" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:text="일반 사진 촬영"
|
||||
android:textSize="20sp"
|
||||
android:textColor="@color/black"/>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearlayout_tool"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="invisible"
|
||||
android:orientation="horizontal">
|
||||
<com.qtagger.CustomPalette.SquareButton
|
||||
android:id="@+id/button_img_add"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="500dp"
|
||||
android:layout_margin="20dp"
|
||||
android:foreground="@drawable/add_picture_32"
|
||||
android:foregroundGravity="center_vertical|center_horizontal"
|
||||
/>
|
||||
|
||||
<com.qtagger.CustomPalette.SquareButton
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:drawable/ic_menu_close_clear_cancel" />
|
||||
|
||||
<com.qtagger.CustomPalette.SquareButton
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:background="@drawable/trash_bin_icon_icons_com_67981" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/textViewAccountAccTitle" />
|
||||
|
||||
<android.widget.Button
|
||||
android:id="@+id/button_발생지특성검사"
|
||||
android:id="@+id/button_발생지특성규명"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginStart="20dp"
|
||||
@@ -62,7 +62,7 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/button_발생지특성검사" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/button_발생지특성규명" />
|
||||
|
||||
<android.widget.Button
|
||||
android:id="@+id/button_인수검사"
|
||||
|
||||
Reference in New Issue
Block a user