diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksAdapterGrid.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksAdapterGrid.kt
index c6d1cbba4..f6761ce78 100644
--- a/app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksAdapterGrid.kt
+++ b/app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksAdapterGrid.kt
@@ -20,7 +20,7 @@ class BooksAdapterGrid(context: Context, private val callBack: CallBack) :
if (payloads.isEmpty()) {
ATH.applyBackgroundTint(this)
tv_name.text = item.name
- tv_author.text = item.author
+ bv_author.text = item.author
item.getDisplayCover()?.let {
ImageLoader.load(context, it)//Glide自动识别http://和file://
.placeholder(R.drawable.image_cover_default)
diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksFragment.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksFragment.kt
index fe2363b5c..765c06697 100644
--- a/app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksFragment.kt
+++ b/app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksFragment.kt
@@ -71,7 +71,7 @@ class BooksFragment : BaseFragment(R.layout.fragment_books),
booksAdapter = BooksAdapterList(requireContext(), this)
} else {
rv_bookshelf.layoutManager = GridLayoutManager(context, bookshelfLayout + 2)
- booksAdapter = BooksAdapterGrid(requireContext(), this)
+ booksAdapter = BooksAdapterGrid(requireContext(),this)
}
rv_bookshelf.adapter = booksAdapter
}
diff --git a/app/src/main/java/io/legado/app/ui/widget/BadgeView.kt b/app/src/main/java/io/legado/app/ui/widget/BadgeView.kt
index d9d5e1ee8..a0764724e 100644
--- a/app/src/main/java/io/legado/app/ui/widget/BadgeView.kt
+++ b/app/src/main/java/io/legado/app/ui/widget/BadgeView.kt
@@ -74,6 +74,10 @@ class BadgeView @JvmOverloads constructor(
}
init {
+ val typedArray = context.obtainStyledAttributes(attrs, R.styleable.BadgeView)
+ val radios =
+ typedArray.getDimensionPixelOffset(R.styleable.BadgeView_bv_radius, 8)
+
if (layoutParams !is LayoutParams) {
val layoutParams = LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT,
@@ -88,7 +92,7 @@ class BadgeView @JvmOverloads constructor(
//setTypeface(Typeface.DEFAULT_BOLD);
setTextSize(TypedValue.COMPLEX_UNIT_SP, 11f)
setPadding(dip2Px(5f), dip2Px(1f), dip2Px(5f), dip2Px(1f))
- radius = 8f
+ radius = radios.toFloat()
// set default background
setBackground(radius, context.accentColor)
diff --git a/app/src/main/res/layout/item_bookshelf_grid.xml b/app/src/main/res/layout/item_bookshelf_grid.xml
index 4ed7e8158..c36b288c5 100644
--- a/app/src/main/res/layout/item_bookshelf_grid.xml
+++ b/app/src/main/res/layout/item_bookshelf_grid.xml
@@ -49,35 +49,39 @@
tools:ignore="RtlHardcoded" />
+
+
+
+
+
+
-
-
\ No newline at end of file
diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml
index 0bf3c2f05..de2fe5dc5 100644
--- a/app/src/main/res/values/attrs.xml
+++ b/app/src/main/res/values/attrs.xml
@@ -140,4 +140,8 @@
+
+
+
+
\ No newline at end of file