pull/35/head^2
kunfei 5 years ago
parent f3b2e296e7
commit b5565a96c5
  1. 10
      app/src/main/java/io/legado/app/ui/rss/article/RssArticlesAdapter.kt

@ -5,6 +5,9 @@ import io.legado.app.R
import io.legado.app.base.adapter.ItemViewHolder
import io.legado.app.base.adapter.SimpleRecyclerAdapter
import io.legado.app.data.entities.RssArticle
import io.legado.app.help.ImageLoader
import io.legado.app.utils.gone
import io.legado.app.utils.visible
import kotlinx.android.synthetic.main.item_rss_article.view.*
import org.jetbrains.anko.sdk27.listeners.onClick
@ -19,6 +22,13 @@ class RssArticlesAdapter(context: Context, val callBack: CallBack) :
onClick {
callBack.readRss(item)
}
if (item.image.isNullOrBlank()) {
image_view.gone()
} else {
image_view.visible()
ImageLoader.load(context, item.image)
.setAsBitmap(image_view)
}
}
}

Loading…
Cancel
Save