漫画背景
This commit is contained in:
@@ -828,6 +828,8 @@ class ReadMangaActivity : VMBaseActivity<ActivityMangaBinding, ReadMangaViewMode
|
|||||||
|
|
||||||
private fun setBackground() {
|
private fun setBackground() {
|
||||||
binding.webtoonFrame.setBackgroundColor(AppConfig.mangaBackground)
|
binding.webtoonFrame.setBackgroundColor(AppConfig.mangaBackground)
|
||||||
|
binding.recyclerView.setBackgroundColor(AppConfig.mangaBackground)
|
||||||
|
mAdapter.notifyItemRangeChanged(0, mAdapter.itemCount)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import io.legado.app.base.adapter.ItemViewHolder
|
|||||||
import io.legado.app.base.adapter.RecyclerAdapter.Companion.TYPE_FOOTER_VIEW
|
import io.legado.app.base.adapter.RecyclerAdapter.Companion.TYPE_FOOTER_VIEW
|
||||||
import io.legado.app.databinding.ItemBookMangaEdgeBinding
|
import io.legado.app.databinding.ItemBookMangaEdgeBinding
|
||||||
import io.legado.app.databinding.ItemBookMangaPageBinding
|
import io.legado.app.databinding.ItemBookMangaPageBinding
|
||||||
|
import io.legado.app.help.config.AppConfig
|
||||||
import io.legado.app.help.glide.progress.ProgressManager
|
import io.legado.app.help.glide.progress.ProgressManager
|
||||||
import io.legado.app.model.BookCover
|
import io.legado.app.model.BookCover
|
||||||
import io.legado.app.model.ReadManga
|
import io.legado.app.model.ReadManga
|
||||||
@@ -107,6 +108,7 @@ class MangaAdapter(private val context: Context) :
|
|||||||
|
|
||||||
fun onBind(item: MangaPage) {
|
fun onBind(item: MangaPage) {
|
||||||
setImageColorFilter()
|
setImageColorFilter()
|
||||||
|
setBackground()
|
||||||
val isLastImage = item.imageCount > 0 && item.index == item.imageCount - 1
|
val isLastImage = item.imageCount > 0 && item.index == item.imageCount - 1
|
||||||
loadImageWithRetry(item.mImageUrl, isHorizontal, isLastImage, mTransformation)
|
loadImageWithRetry(item.mImageUrl, isHorizontal, isLastImage, mTransformation)
|
||||||
}
|
}
|
||||||
@@ -128,6 +130,11 @@ class MangaAdapter(private val context: Context) :
|
|||||||
)
|
)
|
||||||
binding.image.colorFilter = ColorMatrixColorFilter(ColorMatrix(matrix))
|
binding.image.colorFilter = ColorMatrixColorFilter(ColorMatrix(matrix))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun setBackground() {
|
||||||
|
binding.rootView.setBackgroundColor(AppConfig.mangaBackground)
|
||||||
|
binding.flProgress.setBackgroundColor(AppConfig.mangaBackground)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inner class PageMoreViewHolder(val binding: ItemBookMangaEdgeBinding) :
|
inner class PageMoreViewHolder(val binding: ItemBookMangaEdgeBinding) :
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ class ThemeConfigFragment : PreferenceFragmentCompat(),
|
|||||||
|
|
||||||
themePref?.setOnPreferenceChangeListener { _, newValue ->
|
themePref?.setOnPreferenceChangeListener { _, newValue ->
|
||||||
colorPrimary?.isVisible = newValue == "12"
|
colorPrimary?.isVisible = newValue == "12"
|
||||||
colorImage?.isVisible = currentTheme == "12"
|
colorImage?.isVisible = newValue == "12"
|
||||||
customMode?.isVisible = newValue == "12"
|
customMode?.isVisible = newValue == "12"
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,6 @@
|
|||||||
android:id="@+id/loading"
|
android:id="@+id/loading"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:progress="50"
|
|
||||||
app:trackColor="?attr/colorOnSurfaceVariant"
|
app:trackColor="?attr/colorOnSurfaceVariant"
|
||||||
app:indicatorColor="?attr/colorPrimaryVariant"
|
app:indicatorColor="?attr/colorPrimaryVariant"
|
||||||
android:indeterminate="false"
|
android:indeterminate="false"
|
||||||
|
|||||||
Reference in New Issue
Block a user