This commit is contained in:
Horis
2025-01-06 16:30:58 +08:00
parent 9093dac250
commit 9bf7db4b55
37 changed files with 174 additions and 90 deletions
+2 -1
View File
@@ -451,7 +451,8 @@
android:foregroundServiceType="dataSync"
android:icon="@drawable/ic_web_service_noti"
android:label="legado Web Service"
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE"
tools:targetApi="24">
<intent-filter>
<action android:name="android.service.quicksettings.action.QS_TILE" />
</intent-filter>
@@ -396,10 +396,6 @@ data class Book(
}
}
fun update() {
appDb.bookDao.update(this)
}
fun delete() {
if (ReadBook.book?.bookUrl == bookUrl) {
ReadBook.book = null
@@ -252,6 +252,10 @@ fun Book.sync(oldBook: Book) {
canUpdate = curBook.canUpdate
}
fun Book.update() {
appDb.bookDao.update(this)
}
fun Book.getBookSource(): BookSource? {
return appDb.bookSourceDao.getBookSource(origin)
}
@@ -1,16 +1,29 @@
package io.legado.app.lib.prefs.fragment
import android.annotation.SuppressLint
import android.os.Bundle
import android.view.View
import androidx.fragment.app.DialogFragment
import androidx.preference.*
import androidx.preference.EditTextPreference
import androidx.preference.ListPreference
import androidx.preference.MultiSelectListPreference
import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import io.legado.app.lib.prefs.EditTextPreferenceDialog
import io.legado.app.lib.prefs.ListPreferenceDialog
import io.legado.app.lib.prefs.MultiSelectListPreferenceDialog
import io.legado.app.utils.applyNavigationBarPadding
abstract class PreferenceFragment : PreferenceFragmentCompat() {
private val dialogFragmentTag = "androidx.preference.PreferenceFragment.DIALOG"
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
listView.clipToPadding = false
listView.applyNavigationBarPadding()
}
@SuppressLint("RestrictedApi")
override fun onDisplayPreferenceDialog(preference: Preference) {
@@ -6,6 +6,7 @@ import android.graphics.drawable.ColorDrawable
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.core.view.ViewCompat
import com.google.android.material.bottomnavigation.BottomNavigationView
import io.legado.app.databinding.ViewNavigationBadgeBinding
import io.legado.app.help.config.AppConfig
@@ -34,6 +35,8 @@ class ThemeBottomNavigationVIew(context: Context, attrs: AttributeSet) :
isItemHorizontalTranslationEnabled = false
itemBackground = ColorDrawable(Color.TRANSPARENT)
}
ViewCompat.setOnApplyWindowInsetsListener(this, null)
}
fun addBadgeView(index: Int): BadgeView {
@@ -16,6 +16,7 @@ import io.legado.app.help.book.ContentProcessor
import io.legado.app.help.book.getBookSource
import io.legado.app.help.book.readSimulating
import io.legado.app.help.book.simulatedTotalChapterNum
import io.legado.app.help.book.update
import io.legado.app.help.coroutine.Coroutine
import io.legado.app.model.webBook.WebBook
import io.legado.app.service.AudioPlayService
@@ -16,6 +16,7 @@ import io.legado.app.help.book.isImage
import io.legado.app.help.book.isLocal
import io.legado.app.help.book.readSimulating
import io.legado.app.help.book.simulatedTotalChapterNum
import io.legado.app.help.book.update
import io.legado.app.help.config.AppConfig
import io.legado.app.help.config.ReadBookConfig
import io.legado.app.help.coroutine.Coroutine
@@ -6,6 +6,7 @@ import io.legado.app.constant.AppPattern.bookFileRegex
import io.legado.app.constant.BookType
import io.legado.app.data.entities.Book
import io.legado.app.exception.NoStackTraceException
import io.legado.app.help.book.update
import io.legado.app.help.config.AppConfig
import io.legado.app.lib.webdav.Authorization
import io.legado.app.lib.webdav.WebDav
@@ -11,6 +11,7 @@ import io.legado.app.constant.EventBus
import io.legado.app.constant.IntentAction
import io.legado.app.constant.NotificationId
import io.legado.app.data.appDb
import io.legado.app.help.book.update
import io.legado.app.help.config.AppConfig
import io.legado.app.model.CacheBook
import io.legado.app.model.webBook.WebBook
@@ -21,6 +21,7 @@ import io.legado.app.lib.dialogs.alert
import io.legado.app.lib.theme.primaryTextColor
import io.legado.app.ui.book.read.ReadBookActivity
import io.legado.app.ui.book.search.SearchActivity
import io.legado.app.utils.applyNavigationBarPadding
import io.legado.app.utils.applyTint
import io.legado.app.utils.cnCompare
import io.legado.app.utils.getInt
@@ -105,6 +106,7 @@ class ReadRecordActivity : BaseActivity<ActivityReadRecordBinding>() {
}
}
binding.recyclerView.adapter = adapter
binding.recyclerView.applyNavigationBarPadding()
}
private fun initSearchView() {
@@ -12,6 +12,7 @@ import io.legado.app.data.appDb
import io.legado.app.data.entities.Bookmark
import io.legado.app.databinding.ActivityAllBookmarkBinding
import io.legado.app.ui.file.HandleFileContract
import io.legado.app.utils.applyNavigationBarPadding
import io.legado.app.utils.showDialogFragment
import io.legado.app.utils.viewbindingdelegate.viewBinding
import kotlinx.coroutines.Dispatchers.IO
@@ -53,6 +54,7 @@ class AllBookmarkActivity : VMBaseActivity<ActivityAllBookmarkBinding, AllBookma
private fun initView() {
binding.recyclerView.addItemDecoration(BookmarkDecoration(adapter))
binding.recyclerView.adapter = adapter
binding.recyclerView.applyNavigationBarPadding()
}
override fun onCompatCreateOptionsMenu(menu: Menu): Boolean {
@@ -37,6 +37,7 @@ import io.legado.app.ui.about.AppLogDialog
import io.legado.app.ui.file.HandleFileContract
import io.legado.app.utils.ACache
import io.legado.app.utils.FileDoc
import io.legado.app.utils.applyNavigationBarPadding
import io.legado.app.utils.applyTint
import io.legado.app.utils.checkWrite
import io.legado.app.utils.cnCompare
@@ -200,6 +201,7 @@ class CacheActivity : VMBaseActivity<ActivityCacheBookBinding, CacheViewModel>()
private fun initRecyclerView() {
binding.recyclerView.layoutManager = layoutManager
binding.recyclerView.adapter = adapter
binding.recyclerView.applyNavigationBarPadding()
}
private fun initBookData() {
@@ -13,6 +13,7 @@ import io.legado.app.databinding.ViewLoadMoreBinding
import io.legado.app.ui.book.info.BookInfoActivity
import io.legado.app.ui.widget.recycler.LoadMoreView
import io.legado.app.ui.widget.recycler.VerticalDivider
import io.legado.app.utils.applyNavigationBarPadding
import io.legado.app.utils.startActivity
import io.legado.app.utils.viewbindingdelegate.viewBinding
@@ -43,6 +44,7 @@ class ExploreShowActivity : VMBaseActivity<ActivityExploreShowBinding, ExploreSh
private fun initRecyclerView() {
binding.recyclerView.addItemDecoration(VerticalDivider(this))
binding.recyclerView.adapter = adapter
binding.recyclerView.applyNavigationBarPadding()
adapter.addFooterView {
ViewLoadMoreBinding.bind(loadMoreView)
}
@@ -48,6 +48,7 @@ import io.legado.app.help.book.isLocal
import io.legado.app.help.book.isLocalTxt
import io.legado.app.help.book.isMobi
import io.legado.app.help.book.removeType
import io.legado.app.help.book.update
import io.legado.app.help.config.AppConfig
import io.legado.app.help.config.ReadBookConfig
import io.legado.app.help.config.ReadTipConfig
@@ -34,6 +34,8 @@ import io.legado.app.ui.about.AppLogDialog
import io.legado.app.ui.book.info.BookInfoActivity
import io.legado.app.ui.book.source.manage.BookSourceActivity
import io.legado.app.utils.ColorUtils
import io.legado.app.utils.applyNavigationBarMargin
import io.legado.app.utils.applyNavigationBarPadding
import io.legado.app.utils.applyTint
import io.legado.app.utils.getPrefBoolean
import io.legado.app.utils.gone
@@ -211,11 +213,14 @@ class SearchActivity : VMBaseActivity<ActivityBookSearchBinding, SearchViewModel
binding.rvHistoryKey.setEdgeEffectColor(primaryColor)
binding.rvBookshelfSearch.layoutManager = FlexboxLayoutManager(this)
binding.rvBookshelfSearch.adapter = bookAdapter
binding.rvBookshelfSearch.applyNavigationBarMargin()
binding.rvHistoryKey.layoutManager = FlexboxLayoutManager(this)
binding.rvHistoryKey.adapter = historyKeyAdapter
binding.rvHistoryKey.applyNavigationBarMargin()
binding.recyclerView.layoutManager = LinearLayoutManager(this)
binding.recyclerView.adapter = adapter
binding.recyclerView.itemAnimator = null
binding.recyclerView.applyNavigationBarPadding()
adapter.registerAdapterDataObserver(object : RecyclerView.AdapterDataObserver() {
override fun onItemRangeInserted(positionStart: Int, itemCount: Int) {
super.onItemRangeInserted(positionStart, itemCount)
@@ -28,6 +28,7 @@ import io.legado.app.lib.theme.primaryTextColor
import io.legado.app.ui.widget.recycler.UpLinearLayoutManager
import io.legado.app.ui.widget.recycler.VerticalDivider
import io.legado.app.utils.ColorUtils
import io.legado.app.utils.applyNavigationBarMargin
import io.legado.app.utils.applyTint
import io.legado.app.utils.hideSoftInput
import io.legado.app.utils.invisible
@@ -65,6 +66,7 @@ class SearchContentActivity :
val bbg = bottomBackground
val btc = getPrimaryTextColor(ColorUtils.isColorLight(bbg))
binding.llSearchBaseInfo.setBackgroundColor(bbg)
binding.llSearchBaseInfo.applyNavigationBarMargin()
binding.tvCurrentSearchInfo.setTextColor(btc)
binding.ivSearchContentTop.setColorFilter(btc)
binding.ivSearchContentBottom.setColorFilter(btc)
@@ -17,6 +17,7 @@ import io.legado.app.lib.theme.accentColor
import io.legado.app.lib.theme.primaryColor
import io.legado.app.ui.qrcode.QrCodeResult
import io.legado.app.ui.widget.dialog.TextDialog
import io.legado.app.utils.applyNavigationBarPadding
import io.legado.app.utils.launch
import io.legado.app.utils.setEdgeEffectColor
import io.legado.app.utils.showDialogFragment
@@ -61,6 +62,7 @@ class BookSourceDebugActivity : VMBaseActivity<ActivitySourceDebugBinding, BookS
private fun initRecyclerView() {
binding.recyclerView.setEdgeEffectColor(primaryColor)
binding.recyclerView.adapter = adapter
binding.recyclerView.applyNavigationBarPadding()
binding.rotateLoading.loadingColor = accentColor
}
@@ -16,6 +16,7 @@ import io.legado.app.lib.theme.primaryColor
import io.legado.app.ui.book.bookmark.BookmarkDialog
import io.legado.app.ui.widget.recycler.UpLinearLayoutManager
import io.legado.app.ui.widget.recycler.VerticalDivider
import io.legado.app.utils.applyNavigationBarPadding
import io.legado.app.utils.setEdgeEffectColor
import io.legado.app.utils.showDialogFragment
import io.legado.app.utils.viewbindingdelegate.viewBinding
@@ -50,6 +51,7 @@ class BookmarkFragment : VMBaseFragment<TocViewModel>(R.layout.fragment_bookmark
binding.recyclerView.layoutManager = mLayoutManager
binding.recyclerView.addItemDecoration(VerticalDivider(requireContext()))
binding.recyclerView.adapter = adapter
binding.recyclerView.applyNavigationBarPadding()
}
override fun upBookmark(searchKey: String?) {
@@ -23,6 +23,7 @@ import io.legado.app.lib.theme.getPrimaryTextColor
import io.legado.app.ui.widget.recycler.UpLinearLayoutManager
import io.legado.app.ui.widget.recycler.VerticalDivider
import io.legado.app.utils.ColorUtils
import io.legado.app.utils.applyNavigationBarMargin
import io.legado.app.utils.observeEvent
import io.legado.app.utils.viewbindingdelegate.viewBinding
import kotlinx.coroutines.CoroutineScope
@@ -74,6 +75,7 @@ class ChapterListFragment : VMBaseFragment<TocViewModel>(R.layout.fragment_chapt
tvCurrentChapterInfo.setOnClickListener {
mLayoutManager.scrollToPositionWithOffset(durChapterIndex, 0)
}
binding.llChapterBaseInfo.applyNavigationBarMargin()
}
@SuppressLint("SetTextI18n")
@@ -23,6 +23,7 @@ import io.legado.app.lib.theme.primaryTextColor
import io.legado.app.ui.file.utils.FilePickerIcon
import io.legado.app.ui.widget.recycler.VerticalDivider
import io.legado.app.utils.ConvertUtils
import io.legado.app.utils.applyNavigationBarPadding
import io.legado.app.utils.applyTint
import io.legado.app.utils.openFileUri
import io.legado.app.utils.viewbindingdelegate.viewBinding
@@ -56,6 +57,7 @@ class FileManageActivity : VMBaseActivity<ActivityFileManageBinding, FileManageV
binding.recyclerView.layoutManager = LinearLayoutManager(this)
binding.recyclerView.addItemDecoration(VerticalDivider(this))
binding.recyclerView.adapter = fileAdapter
binding.recyclerView.applyNavigationBarPadding()
onBackPressedDispatcher.addCallback(this) {
if (viewModel.lastDir != viewModel.rootDoc) {
gotoLastDir()
@@ -10,6 +10,7 @@ import android.view.ViewGroup
import android.widget.EditText
import androidx.activity.addCallback
import androidx.activity.viewModels
import androidx.core.view.ViewCompat
import androidx.core.view.postDelayed
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
@@ -45,6 +46,7 @@ import io.legado.app.ui.main.rss.RssFragment
import io.legado.app.ui.widget.dialog.TextDialog
import io.legado.app.utils.hideSoftInput
import io.legado.app.utils.isCreated
import io.legado.app.utils.navigationBarHeight
import io.legado.app.utils.observeEvent
import io.legado.app.utils.setEdgeEffectColor
import io.legado.app.utils.showDialogFragment
@@ -53,6 +55,7 @@ import io.legado.app.utils.viewbindingdelegate.viewBinding
import kotlinx.coroutines.Dispatchers.IO
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import splitties.views.bottomPadding
import kotlin.coroutines.resume
import kotlin.coroutines.suspendCoroutine
@@ -87,18 +90,7 @@ class MainActivity : VMBaseActivity<ActivityMainBinding, MainViewModel>(),
override fun onActivityCreated(savedInstanceState: Bundle?) {
upBottomMenu()
binding.run {
viewPagerMain.setEdgeEffectColor(primaryColor)
viewPagerMain.offscreenPageLimit = 3
viewPagerMain.adapter = adapter
viewPagerMain.addOnPageChangeListener(PageChangeCallback())
bottomNavigationView.elevation = elevation
bottomNavigationView.setOnNavigationItemSelectedListener(this@MainActivity)
bottomNavigationView.setOnNavigationItemReselectedListener(this@MainActivity)
if (AppConfig.isEInkMode) {
bottomNavigationView.setBackgroundResource(R.drawable.bg_eink_border_top)
}
}
initView()
upHomePage()
viewModel.deleteNotShelfBook()
onBackPressedDispatcher.addCallback(this) {
@@ -198,6 +190,24 @@ class MainActivity : VMBaseActivity<ActivityMainBinding, MainViewModel>(),
}
}
private fun initView() = binding.run {
viewPagerMain.setEdgeEffectColor(primaryColor)
viewPagerMain.offscreenPageLimit = 3
viewPagerMain.adapter = adapter
viewPagerMain.addOnPageChangeListener(PageChangeCallback())
bottomNavigationView.elevation = elevation
bottomNavigationView.setOnNavigationItemSelectedListener(this@MainActivity)
bottomNavigationView.setOnNavigationItemReselectedListener(this@MainActivity)
if (AppConfig.isEInkMode) {
bottomNavigationView.setBackgroundResource(R.drawable.bg_eink_border_top)
}
ViewCompat.setOnApplyWindowInsetsListener(root) { _, windowInsets ->
val height = windowInsets.navigationBarHeight
bottomNavigationView.bottomPadding = height
windowInsets.inset(0, 0, 0, height)
}
}
/**
* 用户隐私与协议
*/
@@ -21,6 +21,7 @@ import io.legado.app.lib.theme.primaryColor
import io.legado.app.ui.rss.read.ReadRssActivity
import io.legado.app.ui.widget.recycler.LoadMoreView
import io.legado.app.ui.widget.recycler.VerticalDivider
import io.legado.app.utils.applyNavigationBarPadding
import io.legado.app.utils.setEdgeEffectColor
import io.legado.app.utils.startActivity
import io.legado.app.utils.viewbindingdelegate.viewBinding
@@ -66,6 +67,7 @@ class RssArticlesFragment() : VMBaseFragment<RssArticlesViewModel>(R.layout.frag
private fun initView() = binding.run {
refreshLayout.setColorSchemeColors(accentColor)
recyclerView.setEdgeEffectColor(primaryColor)
recyclerView.applyNavigationBarPadding()
loadMoreView.setOnClickListener {
if (!loadMoreView.isLoading) {
scrollToBottom(true)
@@ -15,6 +15,7 @@ import io.legado.app.databinding.FragmentRssArticlesBinding
import io.legado.app.lib.theme.primaryColor
import io.legado.app.ui.rss.read.ReadRssActivity
import io.legado.app.ui.widget.recycler.VerticalDivider
import io.legado.app.utils.applyNavigationBarPadding
import io.legado.app.utils.setEdgeEffectColor
import io.legado.app.utils.startActivity
import io.legado.app.utils.viewbindingdelegate.viewBinding
@@ -51,6 +52,7 @@ class RssFavoritesFragment() : VMBaseFragment<RssFavoritesViewModel>(R.layout.fr
LinearLayoutManager(requireContext())
}
recyclerView.adapter = adapter
recyclerView.applyNavigationBarPadding()
}
private fun loadArticles() {
@@ -12,6 +12,7 @@ import io.legado.app.databinding.ActivitySourceDebugBinding
import io.legado.app.lib.theme.accentColor
import io.legado.app.lib.theme.primaryColor
import io.legado.app.ui.widget.dialog.TextDialog
import io.legado.app.utils.applyNavigationBarPadding
import io.legado.app.utils.gone
import io.legado.app.utils.setEdgeEffectColor
import io.legado.app.utils.showDialogFragment
@@ -59,6 +60,7 @@ class RssSourceDebugActivity : VMBaseActivity<ActivitySourceDebugBinding, RssSou
private fun initRecyclerView() {
binding.recyclerView.setEdgeEffectColor(primaryColor)
binding.recyclerView.adapter = adapter
binding.recyclerView.applyNavigationBarPadding()
binding.rotateLoading.loadingColor = accentColor
}
@@ -18,6 +18,7 @@ import io.legado.app.ui.association.ImportBookSourceDialog
import io.legado.app.ui.association.ImportReplaceRuleDialog
import io.legado.app.ui.association.ImportRssSourceDialog
import io.legado.app.ui.widget.recycler.ItemTouchCallback
import io.legado.app.utils.applyNavigationBarPadding
import io.legado.app.utils.showDialogFragment
import io.legado.app.utils.toastOnUi
import io.legado.app.utils.viewbindingdelegate.viewBinding
@@ -59,6 +60,7 @@ class RuleSubActivity : BaseActivity<ActivityRuleSubBinding>(),
private fun initView() {
binding.recyclerView.adapter = adapter
binding.recyclerView.applyNavigationBarPadding()
val itemTouchCallback = ItemTouchCallback(adapter)
itemTouchCallback.isCanDrag = true
ItemTouchHelper(itemTouchCallback).attachToRecyclerView(binding.recyclerView)
@@ -16,6 +16,7 @@ import android.view.View.GONE
import android.view.View.IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS
import android.view.View.INVISIBLE
import android.view.View.VISIBLE
import android.view.ViewGroup
import android.view.inputmethod.InputMethodManager
import android.widget.EdgeEffect
import android.widget.EditText
@@ -32,6 +33,7 @@ import androidx.core.graphics.withTranslation
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import androidx.core.view.get
import androidx.core.view.marginBottom
import androidx.recyclerview.widget.RecyclerView
import androidx.viewpager.widget.ViewPager
import io.legado.app.help.config.AppConfig
@@ -273,8 +275,17 @@ fun View.applyStatusBarPadding(withInitialPadding: Boolean = false) {
fun View.applyNavigationBarPadding(withInitialPadding: Boolean = false) {
val initialPadding = if (withInitialPadding) bottomPadding else 0
ViewCompat.setOnApplyWindowInsetsListener(this) { _, windowInsets ->
val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars())
bottomPadding = initialPadding + insets.bottom
bottomPadding = initialPadding + windowInsets.navigationBarHeight
windowInsets
}
}
fun View.applyNavigationBarMargin(withInitialMargin: Boolean = false) {
val initialMargin = if (withInitialMargin) marginBottom else 0
ViewCompat.setOnApplyWindowInsetsListener(this) { _, windowInsets ->
val lp = layoutParams as ViewGroup.MarginLayoutParams
lp.bottomMargin = initialMargin + windowInsets.navigationBarHeight
layoutParams = lp
windowInsets
}
}
@@ -3,7 +3,7 @@ package io.legado.app.utils
import androidx.core.view.WindowInsetsCompat
val WindowInsetsCompat.navigationBarHeight
get() = getInsets(WindowInsetsCompat.Type.systemBars()).bottom
get() = (getInsets(WindowInsetsCompat.Type.systemBars()).bottom - imeHeight).coerceAtLeast(0)
val WindowInsetsCompat.imeHeight
get() = getInsets(WindowInsetsCompat.Type.ime()).bottom
@@ -1,22 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
android:layout_height="match_parent">
<io.legado.app.ui.widget.TitleBar
android:id="@+id/title_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:title="@string/all_bookmark"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="parent"
app:title="@string/all_bookmark" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="0dp"
android:clipToPadding="false"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintTop_toBottomOf="@+id/title_bar"
app:layout_constraintBottom_toBottomOf="parent" />
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/title_bar" />
</androidx.constraintlayout.widget.ConstraintLayout>
@@ -32,6 +32,7 @@
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
tools:listitem="@layout/item_search" />
</io.legado.app.ui.widget.dynamiclayout.DynamicFrameLayout>
@@ -97,9 +98,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:contentDescription="@string/stop"
android:src="@drawable/ic_stop_black_24dp"
android:visibility="invisible"
android:contentDescription="@string/stop"
app:fabSize="mini"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent" />
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:orientation="vertical">
<io.legado.app.ui.widget.TitleBar
android:id="@+id/title_bar"
@@ -14,6 +14,7 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"
android:clipToPadding="false" />
</LinearLayout>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.book.search.SearchActivity">
@@ -26,6 +26,7 @@
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_search" />
@@ -9,19 +9,19 @@
android:id="@+id/titleBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:contentInsetRight="24dp"
app:contentLayout="@layout/view_search" />
app:contentLayout="@layout/view_search"
app:layout_constraintTop_toTopOf="parent" />
<!--path-->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_path"
android:layout_width="match_parent"
android:layout_height="24dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:background="@color/background_card"
android:elevation="5dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
app:layout_constraintTop_toBottomOf="@+id/titleBar" />
<FrameLayout
@@ -35,6 +35,7 @@
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
tools:ignore="SpeakableTextPresentCheck" />
<TextView
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical">
<io.legado.app.ui.widget.TitleBar
@@ -24,13 +24,13 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:padding="6dp"
android:textColor="@color/primaryText"
android:singleLine="true"
android:textColor="@color/primaryText"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintRight_toLeftOf="@+id/tv_remove"
tools:text="name"
tools:ignore="RtlHardcoded" />
app:layout_constraintTop_toTopOf="parent"
tools:ignore="RtlHardcoded"
tools:text="name" />
<TextView
android:id="@+id/tv_reading_time"
@@ -40,21 +40,21 @@
android:singleLine="true"
android:textColor="@color/secondaryText"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_book_name"
app:layout_constraintRight_toLeftOf="@+id/tv_remove"
app:layout_constraintTop_toBottomOf="@id/tv_book_name"
tools:text="readingTime" />
<TextView
android:id="@+id/tv_remove"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:padding="6dp"
android:text="@string/clear"
android:textColor="@color/primaryText"
android:background="?attr/selectableItemBackground"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent" />
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
@@ -62,6 +62,7 @@
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
</LinearLayout>
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<io.legado.app.ui.widget.TitleBar
@@ -20,6 +20,7 @@
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_rule_sub" />
@@ -27,15 +28,15 @@
android:id="@+id/tv_empty_msg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:layout_gravity="center"
android:layout_margin="16dp"
android:gravity="center"
android:visibility="gone"
android:text="@string/rule_sub_empty_msg"
app:layout_constraintTop_toBottomOf="@+id/title_bar"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/title_bar"
tools:text="TextView" />
</FrameLayout>
@@ -20,9 +20,10 @@
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="0dp"
android:clipToPadding="false"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintTop_toBottomOf="@+id/title_bar"
app:layout_constraintBottom_toBottomOf="parent" />
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/title_bar" />
<io.legado.app.ui.widget.anima.RotateLoading
android:id="@+id/rotate_loading"
@@ -45,15 +46,15 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp"
android:background="@color/background"
android:orientation="vertical">
android:orientation="vertical"
android:padding="16dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/secondaryText"
android:text="调试搜索>>输入关键字,如:"
android:textColor="@color/secondaryText"
tools:ignore="HardcodedText" />
<LinearLayout
@@ -69,14 +70,14 @@
android:background="@drawable/selector_fillet_btn_bg"
android:ellipsize="end"
android:gravity="center"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:paddingLeft="12dp"
android:paddingRight="12dp"
android:maxLines="1"
android:paddingLeft="12dp"
android:paddingTop="4dp"
android:paddingRight="12dp"
android:paddingBottom="4dp"
android:text="我的"
android:textColor="@color/primaryText"
android:textSize="14sp"
android:text="我的"
tools:ignore="HardcodedText,UnusedAttribute" />
<TextView
@@ -87,14 +88,14 @@
android:background="@drawable/selector_fillet_btn_bg"
android:ellipsize="end"
android:gravity="center"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:paddingLeft="12dp"
android:paddingRight="12dp"
android:maxLines="1"
android:paddingLeft="12dp"
android:paddingTop="4dp"
android:paddingRight="12dp"
android:paddingBottom="4dp"
android:text="系统"
android:textColor="@color/primaryText"
android:textSize="14sp"
android:text="系统"
tools:ignore="HardcodedText,UnusedAttribute" />
</LinearLayout>
@@ -102,8 +103,8 @@
android:id="@+id/text_fx_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/secondaryText"
android:text="调试发现>>输入发现URL,如:"
android:textColor="@color/secondaryText"
tools:ignore="HardcodedText" />
<TextView
@@ -114,21 +115,21 @@
android:background="@drawable/selector_fillet_btn_bg"
android:ellipsize="end"
android:gravity="center"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:paddingLeft="12dp"
android:paddingRight="12dp"
android:maxLines="1"
android:paddingLeft="12dp"
android:paddingTop="4dp"
android:paddingRight="12dp"
android:paddingBottom="4dp"
android:text="系统::http://xxx"
android:textColor="@color/primaryText"
android:textSize="14sp"
android:text="系统::http://xxx"
tools:ignore="HardcodedText,UnusedAttribute" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/secondaryText"
android:text="调试详情页>>输入详情页URL,如:"
android:textColor="@color/secondaryText"
tools:ignore="HardcodedText" />
<TextView
@@ -139,21 +140,21 @@
android:background="@drawable/selector_fillet_btn_bg"
android:ellipsize="end"
android:gravity="center"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:paddingLeft="12dp"
android:paddingRight="12dp"
android:maxLines="1"
android:paddingLeft="12dp"
android:paddingTop="4dp"
android:paddingRight="12dp"
android:paddingBottom="4dp"
android:text="https://m.qidian.com/book/1015609210"
android:textColor="@color/primaryText"
android:textSize="14sp"
android:text="https://m.qidian.com/book/1015609210"
tools:ignore="HardcodedText,UnusedAttribute" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/secondaryText"
android:text="调试目录页>>输入目录页URL,如:"
android:textColor="@color/secondaryText"
tools:ignore="HardcodedText" />
<TextView
@@ -164,21 +165,21 @@
android:background="@drawable/selector_fillet_btn_bg"
android:ellipsize="end"
android:gravity="center"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:paddingLeft="12dp"
android:paddingRight="12dp"
android:maxLines="1"
android:paddingLeft="12dp"
android:paddingTop="4dp"
android:paddingRight="12dp"
android:paddingBottom="4dp"
android:text="++https://www.zhaishuyuan.com/read/30394"
android:textColor="@color/primaryText"
android:textSize="14sp"
android:text="++https://www.zhaishuyuan.com/read/30394"
tools:ignore="HardcodedText,UnusedAttribute" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/secondaryText"
android:text="调试正文页>>输入正文页URL,如:"
android:textColor="@color/secondaryText"
tools:ignore="HardcodedText" />
<TextView
@@ -189,14 +190,14 @@
android:background="@drawable/selector_fillet_btn_bg"
android:ellipsize="end"
android:gravity="center"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:paddingLeft="12dp"
android:paddingRight="12dp"
android:maxLines="1"
android:paddingLeft="12dp"
android:paddingTop="4dp"
android:paddingRight="12dp"
android:paddingBottom="4dp"
android:text="--https://www.zhaishuyuan.com/chapter/30394/20940996"
android:textColor="@color/primaryText"
android:textSize="14sp"
android:text="--https://www.zhaishuyuan.com/chapter/30394/20940996"
tools:ignore="HardcodedText,UnusedAttribute" />
</LinearLayout>
@@ -8,6 +8,7 @@
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:overScrollMode="never" />
</androidx.constraintlayout.widget.ConstraintLayout>
@@ -7,6 +7,7 @@
<io.legado.app.ui.widget.recycler.RecyclerViewAtPager2
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"
android:clipToPadding="false" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>