diff --git a/app/src/main/java/io/legado/app/ui/sourcedebug/SourceDebugActivity.kt b/app/src/main/java/io/legado/app/ui/sourcedebug/SourceDebugActivity.kt index 46419d57d..9cbfd10e5 100644 --- a/app/src/main/java/io/legado/app/ui/sourcedebug/SourceDebugActivity.kt +++ b/app/src/main/java/io/legado/app/ui/sourcedebug/SourceDebugActivity.kt @@ -69,6 +69,7 @@ class SourceDebugActivity : BaseActivity(), SourceDebug.Callba adapter.logList.clear() adapter.notifyDataSetChanged() bookSource?.let { + rotate_loading.visibility = View.VISIBLE if (key.isAbsUrl()) { val book = Book() book.origin = it.bookSourceUrl @@ -84,5 +85,8 @@ class SourceDebugActivity : BaseActivity(), SourceDebug.Callba override fun printLog(state: Int, msg: String) { adapter.logList.add(msg) + if (state == -1 || state == 1000) { + rotate_loading.visibility = View.GONE + } } } \ No newline at end of file diff --git a/app/src/main/res/layout/activity_source_debug.xml b/app/src/main/res/layout/activity_source_debug.xml index 1efecb677..7f8059f74 100644 --- a/app/src/main/res/layout/activity_source_debug.xml +++ b/app/src/main/res/layout/activity_source_debug.xml @@ -24,6 +24,7 @@ android:layout_width="36dp" android:layout_height="36dp" android:layout_margin="6dp" + android:visibility="gone" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toBottomOf="@+id/title_bar"