diff --git a/app/src/main/java/io/legado/app/ui/dict/DictDialog.kt b/app/src/main/java/io/legado/app/ui/dict/DictDialog.kt
index 573e708ae..fc140d0c9 100644
--- a/app/src/main/java/io/legado/app/ui/dict/DictDialog.kt
+++ b/app/src/main/java/io/legado/app/ui/dict/DictDialog.kt
@@ -2,6 +2,7 @@ package io.legado.app.ui.dict
import android.os.Bundle
import android.text.Html
+import android.text.method.LinkMovementMethod
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
@@ -10,6 +11,7 @@ import androidx.fragment.app.viewModels
import io.legado.app.R
import io.legado.app.base.BaseDialogFragment
import io.legado.app.databinding.DialogDictBinding
+import io.legado.app.utils.invisible
import io.legado.app.utils.toastOnUi
import io.legado.app.utils.viewbindingdelegate.viewBinding
@@ -48,6 +50,7 @@ class DictDialog : BaseDialogFragment() {
}
override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) {
+ binding.tvDict.movementMethod = LinkMovementMethod()
val word = arguments?.getString("word")
if (word.isNullOrEmpty()) {
toastOnUi(R.string.cannot_empty)
@@ -55,6 +58,7 @@ class DictDialog : BaseDialogFragment() {
return
}
viewModel.dictHtmlData.observe(viewLifecycleOwner) {
+ binding.rotateLoading.invisible()
binding.tvDict.text = Html.fromHtml(it)
}
viewModel.dict(word)
diff --git a/app/src/main/res/layout/dialog_dict.xml b/app/src/main/res/layout/dialog_dict.xml
index acd6a42f3..7eed5f326 100644
--- a/app/src/main/res/layout/dialog_dict.xml
+++ b/app/src/main/res/layout/dialog_dict.xml
@@ -1,5 +1,5 @@
-
@@ -9,4 +9,10 @@
android:layout_width="match_parent"
android:layout_height="wrap_content" />
-
\ No newline at end of file
+
+
+
\ No newline at end of file