Created
January 18, 2021 08:33
-
-
Save erdalkaymak/3ed3b5535f5564805b7504d8df3048a4 to your computer and use it in GitHub Desktop.
test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| val task: Task<MLText> = analyzer.asyncAnalyseFrame(frame) | |
| task.addOnSuccessListener { | |
| txt_translate_result.visibility= View.VISIBLE | |
| txt_to.visibility= View.VISIBLE | |
| txt_translation.visibility= View.VISIBLE | |
| toSpinner.visibility= View.VISIBLE | |
| selected_img.visibility= View.VISIBLE | |
| text_recognition_device_text.visibility= View.VISIBLE | |
| text_recognition_device_text.setText(it.stringValue) | |
| detectAndTranslateLanguage(it.stringValue, txt_translation,languageCode.toString(),applicationContext) | |
| mytext=SharedPreferencesUtil.getInstance(applicationContext)!!.getStringValue("detectedLanguage") | |
| Log.i("myDetectedLanguage",mytext!!) | |
| txt_detect_result.text="Detected Result " + "("+getLanguage(mytext!!)+")" | |
| txt_detect_result.visibility= View.VISIBLE | |
| detectedText=it.stringValue | |
| isEntered=true | |
| SharedPreferencesUtil.getInstance(applicationContext)!!.deleteValue("detectedLanguage") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment