Commit 28c9746b authored by wanglei's avatar wanglei

...

parent 6275e498
......@@ -37,7 +37,9 @@ class BookmarkAdapter : BaseQuickAdapter<BookmarkBean, BookmarkAdapter.BookmarkH
binding.iv.visibility = View.GONE
binding.tvLetters.visibility = View.VISIBLE
binding.tvLetters.background = ColorDrawable(item.color)
binding.tvLetters.text = item.name.first().toString()
if (item.name.isNotEmpty()) {
binding.tvLetters.text = item.name.first().toString()
}
} else {
binding.card.radius = 0f
binding.tvLetters.visibility = View.GONE
......@@ -80,7 +82,9 @@ class BookmarkAdapter : BaseQuickAdapter<BookmarkBean, BookmarkAdapter.BookmarkH
binding.iv.visibility = View.GONE
binding.tvLetters.visibility = View.VISIBLE
binding.tvLetters.background = ColorDrawable(item.color)
binding.tvLetters.text = item.name.first().toString()
if (item.name.isNotEmpty()) {
binding.tvLetters.text = item.name.first().toString()
}
} else {
binding.card.radius = 0f
binding.tvLetters.visibility = View.GONE
......
......@@ -63,7 +63,9 @@ class WebsiteAdapter(val uiType: Int = 0, val click: (bean: WebSiteBean) -> Unit
binding.ivAdd.visibility = View.GONE
binding.ivIcon.visibility = View.VISIBLE
binding.tvBookmarkNav.visibility = View.VISIBLE
binding.tvBookmarkNav.text = bean.name.first().toString()
if (bean.name.isNotEmpty()) {
binding.tvBookmarkNav.text = bean.name.first().toString()
}
Glide.with(context).load(ColorDrawable(bean.color)).into(binding.ivIcon)
binding.ivIcon.borderColor = ContextCompat.getColor(context, R.color.color_cbcdd7)
binding.ivIcon.borderWidth = 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment