From dec9550160b969f77b861d0e2cbab69b704ef5dd Mon Sep 17 00:00:00 2001 From: b1urrrr Date: Fri, 13 Jan 2023 21:06:39 +0900 Subject: [PATCH] =?UTF-8?q?[ADD/#46]=20=EC=9D=B4=EB=A6=84=20=EC=9D=B8?= =?UTF-8?q?=EC=8B=9D=20=EB=A1=9C=EC=A7=81=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/com/keyneez/presentation/ocr/OcrActivity.kt | 4 +++- .../com/keyneez/presentation/ocr/dialog/OcrResultFragment.kt | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/keyneez/presentation/ocr/OcrActivity.kt b/app/src/main/java/com/keyneez/presentation/ocr/OcrActivity.kt index 7dba0eb..ebc3598 100644 --- a/app/src/main/java/com/keyneez/presentation/ocr/OcrActivity.kt +++ b/app/src/main/java/com/keyneez/presentation/ocr/OcrActivity.kt @@ -19,11 +19,13 @@ import com.keyneez.util.extension.setOnSingleClickListener import com.keyneez.util.extension.showSnackbar import com.lab.keyneez.R import com.lab.keyneez.databinding.ActivityOcrBinding +import dagger.hilt.android.AndroidEntryPoint import timber.log.Timber import java.nio.ByteBuffer import java.util.concurrent.ExecutorService import java.util.concurrent.Executors +@AndroidEntryPoint class OcrActivity : BindingActivity(R.layout.activity_ocr) { val viewModel by viewModels() @@ -165,7 +167,7 @@ class OcrActivity : BindingActivity(R.layout.activity_ocr) { if (isSuccess && viewModel.idName.value == "" && word.length == 3) viewModel.setIdName( word ) - if (isSuccess && viewModel.idName.value == "" && word.startsWith("명:")) viewModel.setIdName( + if (isSuccess && viewModel.idName.value == "" && word.startsWith("명:") && word.length == 5) viewModel.setIdName( word.substring(2, 5) ) if (isSuccess && viewModel.idName.value == "" && word.startsWith(":") && word.length == 4) viewModel.setIdName( diff --git a/app/src/main/java/com/keyneez/presentation/ocr/dialog/OcrResultFragment.kt b/app/src/main/java/com/keyneez/presentation/ocr/dialog/OcrResultFragment.kt index 0a8cf86..23173cd 100644 --- a/app/src/main/java/com/keyneez/presentation/ocr/dialog/OcrResultFragment.kt +++ b/app/src/main/java/com/keyneez/presentation/ocr/dialog/OcrResultFragment.kt @@ -14,7 +14,9 @@ import com.keyneez.util.extension.setOnSingleClickListener import com.keyneez.util.extension.showSnackbar import com.lab.keyneez.R import com.lab.keyneez.databinding.BotSheetOcrResultBinding +import dagger.hilt.android.AndroidEntryPoint +@AndroidEntryPoint class OcrResultFragment : BindingBottomSheetDialog(R.layout.bot_sheet_ocr_result) { private val viewModel by viewModels()