pull/2129/head
821938089 2 years ago
parent 87537617c9
commit c8521d24a3
  1. 29
      app/src/main/java/io/legado/app/ui/book/source/debug/BookSourceDebugActivity.kt
  2. 3
      app/src/main/res/layout/activity_source_debug.xml

@ -109,6 +109,35 @@ class BookSourceDebugActivity : VMBaseActivity<ActivitySourceDebugBinding, BookS
searchView.setQuery(binding.textFx.text, true) searchView.setQuery(binding.textFx.text, true)
} }
} }
binding.textInfo.onClick {
if (!searchView.query.isNullOrBlank()) {
searchView.setQuery(searchView.query, true)
}
}
binding.textToc.onClick {
val query = searchView.query
if (query.isNullOrBlank() || query.length <= 2) {
searchView.setQuery("++", false)
} else {
if (!query.startsWith("++")) {
searchView.setQuery("++$query", true)
} else {
searchView.setQuery(query, true)
}
}
}
binding.textContent.onClick {
val query = searchView.query
if (query.isNullOrBlank() || query.length <= 2) {
searchView.setQuery("--", false)
} else {
if (!query.startsWith("--")) {
searchView.setQuery("--$query", true)
} else {
searchView.setQuery(query, true)
}
}
}
} }
/** /**

@ -132,6 +132,7 @@
tools:ignore="HardcodedText" /> tools:ignore="HardcodedText" />
<TextView <TextView
android:id="@+id/text_info"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="3dp" android:layout_margin="3dp"
@ -156,6 +157,7 @@
tools:ignore="HardcodedText" /> tools:ignore="HardcodedText" />
<TextView <TextView
android:id="@+id/text_toc"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="3dp" android:layout_margin="3dp"
@ -180,6 +182,7 @@
tools:ignore="HardcodedText" /> tools:ignore="HardcodedText" />
<TextView <TextView
android:id="@+id/text_content"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="3dp" android:layout_margin="3dp"

Loading…
Cancel
Save