Skip to content

Commit

Permalink
[ADD/#46] 이름 인식 로직 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
b1urrrr committed Jan 13, 2023
1 parent ac8999c commit dec9550
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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<ActivityOcrBinding>(R.layout.activity_ocr) {
val viewModel by viewModels<OcrViewModel>()

Expand Down Expand Up @@ -165,7 +167,7 @@ class OcrActivity : BindingActivity<ActivityOcrBinding>(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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<BotSheetOcrResultBinding>(R.layout.bot_sheet_ocr_result) {
private val viewModel by viewModels<OcrResultViewModel>()
Expand Down

0 comments on commit dec9550

Please sign in to comment.