Revert "书架动画与性能优化 #291"
This commit is contained in:
@@ -124,7 +124,9 @@ class BooksFragment() : BaseFragment(R.layout.fragment_books),
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun initRecyclerView() {
|
private fun initRecyclerView() {
|
||||||
|
//binding.rvBookshelf.setEdgeEffectColor(primaryColor)
|
||||||
upFastScrollerBar()
|
upFastScrollerBar()
|
||||||
|
//binding.refreshLayout.setColorSchemeColors(accentColor)
|
||||||
binding.refreshLayout.setOnRefreshListener {
|
binding.refreshLayout.setOnRefreshListener {
|
||||||
val books = booksAdapter.getItems()
|
val books = booksAdapter.getItems()
|
||||||
val refreshList = if (AppConfig.bookshelfRefreshingLimit > 0) {
|
val refreshList = if (AppConfig.bookshelfRefreshingLimit > 0) {
|
||||||
@@ -281,6 +283,8 @@ class BooksFragment() : BaseFragment(R.layout.fragment_books),
|
|||||||
/**
|
/**
|
||||||
* 将 RecyclerView 中的视图全部回收到 RecycledViewPool 中
|
* 将 RecyclerView 中的视图全部回收到 RecycledViewPool 中
|
||||||
*/
|
*/
|
||||||
|
upLastUpdateTimeJob?.cancel()
|
||||||
|
booksFlowJob?.cancel()
|
||||||
binding.rvBookshelf.setItemViewCacheSize(0)
|
binding.rvBookshelf.setItemViewCacheSize(0)
|
||||||
binding.rvBookshelf.adapter = null
|
binding.rvBookshelf.adapter = null
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -84,7 +84,7 @@ abstract class BaseBooksAdapter<VB : ViewBinding>(context: Context) :
|
|||||||
fun notification(bookUrl: String) {
|
fun notification(bookUrl: String) {
|
||||||
getItems().forEachIndexed { i, it ->
|
getItems().forEachIndexed { i, it ->
|
||||||
if (it.bookUrl == bookUrl) {
|
if (it.bookUrl == bookUrl) {
|
||||||
notifyItemChanged(i, bundleOf(Pair("refresh", null), Pair("lastUpdateTime", null)))
|
notifyItemChanged(i, bundleOf("refresh" to true, "lastUpdateTime" to true))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-8
@@ -9,7 +9,6 @@ import io.legado.app.databinding.ItemBookshelfGridBinding
|
|||||||
import io.legado.app.help.book.isLocal
|
import io.legado.app.help.book.isLocal
|
||||||
import io.legado.app.help.config.AppConfig
|
import io.legado.app.help.config.AppConfig
|
||||||
import io.legado.app.utils.gone
|
import io.legado.app.utils.gone
|
||||||
import io.legado.app.utils.invisible
|
|
||||||
import io.legado.app.utils.visible
|
import io.legado.app.utils.visible
|
||||||
|
|
||||||
class BooksAdapterGrid(context: Context, private val callBack: CallBack) :
|
class BooksAdapterGrid(context: Context, private val callBack: CallBack) :
|
||||||
@@ -45,7 +44,7 @@ class BooksAdapterGrid(context: Context, private val callBack: CallBack) :
|
|||||||
|
|
||||||
private fun upRefresh(binding: ItemBookshelfGridBinding, item: Book) {
|
private fun upRefresh(binding: ItemBookshelfGridBinding, item: Book) {
|
||||||
if (!item.isLocal && callBack.isUpdate(item.bookUrl)) {
|
if (!item.isLocal && callBack.isUpdate(item.bookUrl)) {
|
||||||
binding.cdUnread.invisible()
|
binding.cdUnread.gone()
|
||||||
binding.rlLoading.visible()
|
binding.rlLoading.visible()
|
||||||
} else {
|
} else {
|
||||||
binding.rlLoading.gone()
|
binding.rlLoading.gone()
|
||||||
@@ -55,25 +54,25 @@ class BooksAdapterGrid(context: Context, private val callBack: CallBack) :
|
|||||||
binding.cdUnread.visible()
|
binding.cdUnread.visible()
|
||||||
binding.tvUnread.text = unreadCount.toString()
|
binding.tvUnread.text = unreadCount.toString()
|
||||||
} else {
|
} else {
|
||||||
binding.cdUnread.invisible()
|
binding.cdUnread.gone()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
binding.cdUnread.invisible()
|
binding.cdUnread.gone()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun registerListener(holder: ItemViewHolder, binding: ItemBookshelfGridBinding) {
|
override fun registerListener(holder: ItemViewHolder, binding: ItemBookshelfGridBinding) {
|
||||||
|
|
||||||
holder.itemView.setOnClickListener {
|
binding.cvContent.setOnClickListener {
|
||||||
getItem(holder.layoutPosition)?.let {
|
getItem(holder.layoutPosition)?.let {
|
||||||
callBack.open(it, binding.root)
|
callBack.open(it, binding.cdCover)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
holder.itemView.setOnLongClickListener {
|
binding.cvContent.setOnLongClickListener {
|
||||||
getItem(holder.layoutPosition)?.let {
|
getItem(holder.layoutPosition)?.let {
|
||||||
callBack.openBookInfo(it, binding.root)
|
callBack.openBookInfo(it, binding.cdCover)
|
||||||
}
|
}
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -73,15 +73,15 @@ class BooksAdapterGridCompact(context: Context, private val callBack: CallBack)
|
|||||||
binding: ItemBookshelfGridCompactBinding
|
binding: ItemBookshelfGridCompactBinding
|
||||||
) {
|
) {
|
||||||
|
|
||||||
holder.itemView.setOnClickListener {
|
binding.cvContent.setOnClickListener {
|
||||||
getItem(holder.layoutPosition)?.let {
|
getItem(holder.layoutPosition)?.let {
|
||||||
callBack.open(it, binding.root)
|
callBack.open(it, binding.cvContent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
holder.itemView.setOnLongClickListener {
|
binding.cvContent.setOnLongClickListener {
|
||||||
getItem(holder.layoutPosition)?.let {
|
getItem(holder.layoutPosition)?.let {
|
||||||
callBack.openBookInfo(it, binding.root)
|
callBack.openBookInfo(it, binding.cvContent)
|
||||||
}
|
}
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -74,15 +74,15 @@ class BooksAdapterGridCover(context: Context, private val callBack: CallBack) :
|
|||||||
binding: ItemBookshelfGridCompactBinding
|
binding: ItemBookshelfGridCompactBinding
|
||||||
) {
|
) {
|
||||||
|
|
||||||
holder.itemView.setOnClickListener {
|
binding.cvContent.setOnClickListener {
|
||||||
getItem(holder.layoutPosition)?.let {
|
getItem(holder.layoutPosition)?.let {
|
||||||
callBack.open(it, binding.root)
|
callBack.open(it, binding.cvContent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
holder.itemView.setOnLongClickListener {
|
binding.cvContent.setOnLongClickListener {
|
||||||
getItem(holder.layoutPosition)?.let {
|
getItem(holder.layoutPosition)?.let {
|
||||||
callBack.openBookInfo(it, binding.root)
|
callBack.openBookInfo(it, binding.cvContent)
|
||||||
}
|
}
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -108,13 +108,13 @@ class BooksAdapterListCompact(
|
|||||||
holder.itemView.apply {
|
holder.itemView.apply {
|
||||||
binding.cvContent.setOnClickListener {
|
binding.cvContent.setOnClickListener {
|
||||||
getItem(holder.layoutPosition)?.let {
|
getItem(holder.layoutPosition)?.let {
|
||||||
callBack.open(it, binding.cvContent)
|
callBack.open(it, binding.cdCover)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.cvContent.onLongClick {
|
binding.cvContent.onLongClick {
|
||||||
getItem(holder.layoutPosition)?.let {
|
getItem(holder.layoutPosition)?.let {
|
||||||
callBack.openBookInfo(it, binding.cvContent)
|
callBack.openBookInfo(it, binding.cdCover)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -111,10 +111,10 @@ class BooksAdapterListCompact(context: Context, callBack: CallBack) :
|
|||||||
|
|
||||||
fun registerListener(item: Any) {
|
fun registerListener(item: Any) {
|
||||||
binding.cvContent.setOnClickListener {
|
binding.cvContent.setOnClickListener {
|
||||||
callBack.onItemClick(item, binding.cvContent)
|
callBack.onItemClick(item, binding.cdCover)
|
||||||
}
|
}
|
||||||
binding.cvContent.onLongClick {
|
binding.cvContent.onLongClick {
|
||||||
callBack.onItemLongClick(item, binding.cvContent)
|
callBack.onItemLongClick(item, binding.cdCover)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -170,7 +170,6 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="16dp"
|
android:layout_marginHorizontal="16dp"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:layout_marginBottom="4dp"
|
|
||||||
android:text="@string/page_anim"
|
android:text="@string/page_anim"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
@@ -269,6 +268,7 @@
|
|||||||
style="@style/Widget.Material3Expressive.Button.TonalButton"
|
style="@style/Widget.Material3Expressive.Button.TonalButton"
|
||||||
android:checkable="true"
|
android:checkable="true"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
|
android:layout_marginVertical="2dp"
|
||||||
app:icon="@drawable/ic_share_layout"
|
app:icon="@drawable/ic_share_layout"
|
||||||
app:iconGravity="textStart"
|
app:iconGravity="textStart"
|
||||||
app:iconPadding="0dp"
|
app:iconPadding="0dp"
|
||||||
@@ -293,7 +293,7 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="16dp"
|
android:layout_width="16dp"
|
||||||
android:layout_height="44dp"
|
android:layout_height="48dp"
|
||||||
app:layout_constraintStart_toEndOf="@id/cb_share_layout"
|
app:layout_constraintStart_toEndOf="@id/cb_share_layout"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
|||||||
@@ -1,20 +1,40 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:clickable="true"
|
|
||||||
android:focusable="true"
|
|
||||||
app:strokeWidth="0dp">
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<com.google.android.material.card.MaterialCardView
|
||||||
android:id="@+id/cv_content"
|
android:id="@+id/cv_content"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="8dp"
|
app:cardBackgroundColor="@android:color/transparent"
|
||||||
|
android:layout_marginBottom="4dp"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
app:strokeWidth="0dp"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
android:id="@+id/cd_cover"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
app:cardCornerRadius="6dp"
|
||||||
|
android:layout_marginHorizontal="8dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:transitionName="img_cover"
|
||||||
app:strokeWidth="0dp">
|
app:strokeWidth="0dp">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<io.legado.app.ui.widget.image.CoverImageView
|
<io.legado.app.ui.widget.image.CoverImageView
|
||||||
android:id="@+id/iv_cover"
|
android:id="@+id/iv_cover"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -32,9 +52,9 @@
|
|||||||
android:indeterminate="true"
|
android:indeterminate="true"
|
||||||
android:visibility="invisible"
|
android:visibility="invisible"
|
||||||
android:layout_gravity="top"
|
android:layout_gravity="top"
|
||||||
app:layout_constraintEnd_toEndOf="@id/iv_cover"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="@id/iv_cover"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="@id/iv_cover" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
<com.google.android.material.card.MaterialCardView
|
||||||
android:id="@+id/cd_unread"
|
android:id="@+id/cd_unread"
|
||||||
@@ -45,8 +65,8 @@
|
|||||||
app:cardCornerRadius="4dp"
|
app:cardCornerRadius="4dp"
|
||||||
app:strokeWidth="0dp"
|
app:strokeWidth="0dp"
|
||||||
app:cardBackgroundColor="?attr/colorSecondaryVariant"
|
app:cardBackgroundColor="?attr/colorSecondaryVariant"
|
||||||
app:layout_constraintEnd_toEndOf="@id/iv_cover"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="@id/iv_cover">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_unread"
|
android:id="@+id/tv_unread"
|
||||||
@@ -62,6 +82,10 @@
|
|||||||
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
<!-- 书名 -->
|
<!-- 书名 -->
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_name"
|
android:id="@+id/tv_name"
|
||||||
@@ -69,14 +93,14 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
android:layout_marginBottom="6dp"
|
android:layout_marginBottom="6dp"
|
||||||
|
android:layout_marginHorizontal="8dp"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
|
android:gravity="left"
|
||||||
android:lines="2"
|
android:lines="2"
|
||||||
android:text="@string/book_name"
|
android:text="@string/book_name"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
tools:ignore="RtlHardcoded"
|
tools:ignore="RtlHardcoded" />
|
||||||
app:layout_constraintTop_toBottomOf="@id/iv_cover"/>
|
</LinearLayout>
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
|
||||||
|
|||||||
@@ -4,16 +4,25 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:clickable="true"
|
app:cardBackgroundColor="@android:color/transparent"
|
||||||
android:focusable="true"
|
app:strokeWidth="0dp">
|
||||||
app:strokeWidth="0dp"
|
|
||||||
app:cardCornerRadius="8dp"
|
|
||||||
android:layout_margin="8dp">
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingHorizontal="8dp"
|
||||||
|
android:paddingTop="2dp"
|
||||||
|
android:paddingBottom="12dp">
|
||||||
|
|
||||||
|
<com.google.android.material.card.MaterialCardView
|
||||||
android:id="@+id/cv_content"
|
android:id="@+id/cv_content"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
android:background="?attr/selectableItemBackground"
|
||||||
|
app:cardCornerRadius="6dp"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:strokeWidth="0dp">
|
app:strokeWidth="0dp">
|
||||||
|
|
||||||
<io.legado.app.ui.widget.image.CoverImageView
|
<io.legado.app.ui.widget.image.CoverImageView
|
||||||
@@ -22,48 +31,43 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
android:src="@drawable/image_cover_default"
|
android:src="@drawable/image_cover_default"
|
||||||
|
android:transitionName="img_cover"
|
||||||
tools:ignore="ImageContrastCheck" />
|
tools:ignore="ImageContrastCheck" />
|
||||||
|
|
||||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||||
android:id="@+id/rl_loading"
|
android:id="@+id/rl_loading"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginVertical="4dp"
|
|
||||||
android:layout_marginHorizontal="12dp"
|
|
||||||
android:indeterminate="true"
|
|
||||||
android:visibility="invisible"
|
|
||||||
android:layout_gravity="top"
|
android:layout_gravity="top"
|
||||||
app:layout_constraintEnd_toEndOf="@id/iv_cover"
|
android:layout_marginHorizontal="12dp"
|
||||||
app:layout_constraintStart_toStartOf="@id/iv_cover"
|
android:layout_marginVertical="4dp"
|
||||||
app:layout_constraintTop_toTopOf="@id/iv_cover" />
|
android:indeterminate="true"
|
||||||
|
android:visibility="invisible" />
|
||||||
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
<com.google.android.material.card.MaterialCardView
|
||||||
android:id="@+id/cd_unread"
|
android:id="@+id/cd_unread"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="top|end"
|
||||||
android:layout_margin="4dp"
|
android:layout_margin="4dp"
|
||||||
android:visibility="visible"
|
android:visibility="visible"
|
||||||
app:cardCornerRadius="4dp"
|
|
||||||
app:strokeWidth="0dp"
|
|
||||||
app:cardBackgroundColor="?attr/colorSecondaryVariant"
|
app:cardBackgroundColor="?attr/colorSecondaryVariant"
|
||||||
app:layout_constraintEnd_toEndOf="@id/iv_cover"
|
app:cardCornerRadius="4dp"
|
||||||
app:layout_constraintTop_toTopOf="@id/iv_cover">
|
app:strokeWidth="0dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_unread"
|
android:id="@+id/tv_unread"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:includeFontPadding="false"
|
||||||
|
android:padding="4dp"
|
||||||
android:textColor="?attr/colorOnSecondary"
|
android:textColor="?attr/colorOnSecondary"
|
||||||
android:textSize="10sp"
|
android:textSize="10sp"
|
||||||
android:padding="4dp"
|
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:includeFontPadding="false"
|
tools:ignore="SmallSp"
|
||||||
tools:text="5"
|
tools:text="5" />
|
||||||
tools:ignore="SmallSp" />
|
|
||||||
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
<!-- 书名 -->
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_name"
|
android:id="@+id/tv_name"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -79,9 +83,10 @@
|
|||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
tools:ignore="RtlHardcoded"
|
tools:ignore="RtlHardcoded" />
|
||||||
app:layout_constraintBottom_toBottomOf="@id/iv_cover"/>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
|
|||||||
@@ -15,21 +15,36 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
tools:ignore="UnusedAttribute">
|
tools:ignore="UnusedAttribute">
|
||||||
|
|
||||||
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
android:id="@+id/cd_cover"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:cardCornerRadius="6dp"
|
||||||
|
app:strokeWidth="0dp"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
android:transitionName="img_cover"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent">
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/cl_cover"
|
||||||
|
android:layout_width="55dp"
|
||||||
|
android:layout_height="77dp">
|
||||||
|
|
||||||
<io.legado.app.ui.widget.image.CoverImageView
|
<io.legado.app.ui.widget.image.CoverImageView
|
||||||
android:id="@+id/iv_cover"
|
android:id="@+id/iv_cover"
|
||||||
android:layout_width="55dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="77dp"
|
android:layout_height="match_parent"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
android:layout_margin="8dp"
|
|
||||||
android:src="@drawable/image_cover_default"
|
android:src="@drawable/image_cover_default"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
tools:ignore="ImageContrastCheck" />
|
tools:ignore="ImageContrastCheck" />
|
||||||
|
|
||||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||||
android:id="@+id/rl_loading"
|
android:id="@+id/rl_loading"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginVertical="4dp"
|
android:layout_marginVertical="4dp"
|
||||||
android:layout_marginHorizontal="6dp"
|
android:layout_marginHorizontal="6dp"
|
||||||
@@ -66,6 +81,8 @@
|
|||||||
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
@@ -75,7 +92,7 @@
|
|||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@id/iv_cover"
|
app:layout_constraintStart_toEndOf="@id/cd_cover"
|
||||||
app:layout_constraintEnd_toEndOf="parent">
|
app:layout_constraintEnd_toEndOf="parent">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
app:cardCornerRadius="8dp"
|
app:cardCornerRadius="8dp"
|
||||||
app:strokeColor="?attr/colorOutlineVariant"
|
app:strokeColor="?attr/colorOutlineVariant"
|
||||||
app:strokeWidth="2dp"
|
app:strokeWidth="2dp"
|
||||||
android:layout_marginHorizontal="4dp"
|
android:layout_margin="4dp"
|
||||||
android:foreground="?android:attr/selectableItemBackground">
|
android:foreground="?android:attr/selectableItemBackground">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
|||||||
Reference in New Issue
Block a user