diff --git a/.gradle/7.2/executionHistory/executionHistory.bin b/.gradle/7.2/executionHistory/executionHistory.bin index a2c30293..e2925978 100644 Binary files a/.gradle/7.2/executionHistory/executionHistory.bin and b/.gradle/7.2/executionHistory/executionHistory.bin differ diff --git a/.gradle/7.2/executionHistory/executionHistory.lock b/.gradle/7.2/executionHistory/executionHistory.lock index 9ffd1d2a..9109f04d 100644 Binary files a/.gradle/7.2/executionHistory/executionHistory.lock and b/.gradle/7.2/executionHistory/executionHistory.lock differ diff --git a/.gradle/7.2/fileHashes/fileHashes.bin b/.gradle/7.2/fileHashes/fileHashes.bin index 3bb18dd9..61174cd4 100644 Binary files a/.gradle/7.2/fileHashes/fileHashes.bin and b/.gradle/7.2/fileHashes/fileHashes.bin differ diff --git a/.gradle/7.2/fileHashes/fileHashes.lock b/.gradle/7.2/fileHashes/fileHashes.lock index 2b029ef7..6b731b9b 100644 Binary files a/.gradle/7.2/fileHashes/fileHashes.lock and b/.gradle/7.2/fileHashes/fileHashes.lock differ diff --git a/.gradle/7.2/fileHashes/resourceHashesCache.bin b/.gradle/7.2/fileHashes/resourceHashesCache.bin index 7b575f19..a323d764 100644 Binary files a/.gradle/7.2/fileHashes/resourceHashesCache.bin and b/.gradle/7.2/fileHashes/resourceHashesCache.bin differ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index 1aff08b5..9d11f0fd 100644 Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/.gradle/buildOutputCleanup/outputFiles.bin b/.gradle/buildOutputCleanup/outputFiles.bin index 332ff134..9e9a8a52 100644 Binary files a/.gradle/buildOutputCleanup/outputFiles.bin and b/.gradle/buildOutputCleanup/outputFiles.bin differ diff --git a/adapter/src/main/java/com/one/adapter/ViewItemAdapter.kt b/adapter/src/main/java/com/one/adapter/ViewItemAdapter.kt index 266b2d33..ffc049a9 100644 --- a/adapter/src/main/java/com/one/adapter/ViewItemAdapter.kt +++ b/adapter/src/main/java/com/one/adapter/ViewItemAdapter.kt @@ -15,6 +15,11 @@ abstract class ViewItemAdapter var adapter: BaseAsyncAdapter<*, *>? = null + val className: String by lazy { + + this.javaClass.name + } + open fun getViewItemClass(): Class { return findGenericClassBySuperClass(ViewItemCloneable::class.java)!!.java @@ -49,6 +54,8 @@ abstract class ViewItemAdapter fun bindView(binding: @UnsafeVariance VB, viewType: Int, position: Int, item: @UnsafeVariance VI) { + binding.root.transitionName = "$className-$position" + binding.root.setOnClickListener { view -> getViewItem(position)?.let { onItemClick.invoke(view, it) } } diff --git a/app/src/main/java/com/tuanha/app/MainActivity.kt b/app/src/main/java/com/tuanha/app/MainActivity.kt index 5b989a8c..f195f7b3 100644 --- a/app/src/main/java/com/tuanha/app/MainActivity.kt +++ b/app/src/main/java/com/tuanha/app/MainActivity.kt @@ -12,7 +12,6 @@ import com.one.coreapp.utils.extentions.setImage import com.one.detect.data.usecase.DetectUseCase import com.one.detect.entities.DetectOption import com.one.translate.data.usecase.TranslateUseCase -import com.one.word.ui.WordDetailFragment import com.tuanha.app.utils.DrawTextTransformation import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch @@ -35,31 +34,31 @@ class MainActivity : AppCompatActivity() { lifecycleScope.launch(Dispatchers.IO) { Log.d("tuanha", "onCreate: detectUseCase start") - val path = "https://lh3.googleusercontent.com/jLlhxWVvGod_soN5aWDOZCDekFWkKnudzouQdU_f9jukkjFkbUYSZrKg_Nwf3kdy9QVuf4IlKMJti6jm73UjyWGEbyOdhh7IeJDOi5yIA907c0r_n8uqNeiTTbjtcv6Y8ar-sPUuLheCYCQOta0uaUD8C_MvyTmThnQvxeimGG0RqtIGfhOQ7IdTNK7lAkKcLeqJN-2xgEhh3OSlnhx40py7WRZgdb0UUhfRbjnfTYDM8rM_m-xhY_FjBHmj7Fzz8_W54CR3OKcAkknqhH-PKFLlAOD34GfmwrvCHFq458t7cdvThXT0YEm3O1v7o_sURG2HlVBg_c0IMZheM56sg9VM4UG36EgVfpcve2qylMzJAGcut-lYE4vouOU95LYlhnB9RrXN_MWeqVQ7NXni2-J877zQXXQCM5qWW8vkeW2uLUOGSvzWgk0FJKo0yT0FvSsWDdvhkrMGfr2Rta9v4CpZVKWNyThlDpSi_GvtE_wtnmw1LcX8JSHGPoJZOkKwDts6_PHgvolcR6EanC2ToFBhdr2aAcc5yQ5AP67vDhS4hihPoOn3PrzbkJBO_l5wDW6gl4UvIjHmAIsHmzxwNwMAWQGyyQgDVzFYC2htnhbg8cc0JHI6wQhR_zmUyoMMpTWGcSA0YUgRtYV7RuHH36g7vaCvAk_NJIuJ7BrCGmWERTWBrzF1EdmqzWT-1GBvMQDzNDDXUe-nefBghSQ15ebDaiDu2WyTzqcMmOAo_l0P-NeMDOPVpxlUNM7K2EM4Am0Fs5PLa11KTIWaoc_4rdCs5rzpHCgVWmX7pEhkCEE5Tb8G-asXHmErEzQSKlTLwl5AAxKf54VqLpEacOAIt2TmSE3SazcASf-DxFIjlAtL22s-jY3Aw4LWKuK8_77XGJh-GEx0n0rhdEzBHnV0zv5bIKXGKBVQWX6QW1pY-2u54bWG_k8MQ2HFEek2cuw9DHnYQWz8AtB4shMDUNDk2mgn3EBJ9BdtTlFg_3UhJC6VSNd-fD0dNyMDafDCi1c9o23HUVNaFqsJTit15bmKnthsYLLpOJl16JjdT7gslUy-dE0f9fsm6s20DvEQVdCj86WzYrh_8T25tT5J58LcVdpFckayN8MeTKn6GgPPs0rPZsVoJ-r_TK8jJE41H-r5iSaweA=w786-h220-no?authuser=1" - - - val sizeMax = 3000 - - - detectUseCase.execute(DetectUseCase.Param(path = path, "en", "en", DetectOption.TEXT_TRANSLATE, sizeMax)).let { state -> - - state.doSuccess { list -> - - lifecycleScope.launch(Dispatchers.Main) { - - findViewById(R.id.image).setImage(path, FitCenter(), DrawTextTransformation(sizeMax, list)) - } - - list.forEach { - Log.d("tuanha", "onCreate: detectUseCase languageCode:${it.languageCode} text:${it.text}") - } - } - - state.doFailed { - - Log.d("tuanha", "onCreate: detectUseCase", it) - } - } +// val path = "https://www.apkonline.net/imagescropped/viewinhindiicon128.jpgplus.webp" +// +// +// val sizeMax = 1500 +// +// +// detectUseCase.execute(DetectUseCase.Param(path = path, "en", "en", DetectOption.TEXT_TRANSLATE, sizeMax)).let { state -> +// +// state.doSuccess { list -> +// +// lifecycleScope.launch(Dispatchers.Main) { +// +// findViewById(R.id.image).setImage(path, FitCenter(), DrawTextTransformation(sizeMax, list)) +// } +// +// list.forEach { +// Log.d("tuanha", "onCreate: detectUseCase languageCode:${it.languageCode} text:${it.text}") +// } +// } +// +// state.doFailed { +// +// Log.d("tuanha", "onCreate: detectUseCase", it) +// } +// } } lifecycleScope.launch(Dispatchers.IO) {