pull/35/head^2
kunfei 5 years ago
parent 5346d3a721
commit 1c4672af7d
  1. 8
      app/src/main/java/io/legado/app/ui/rss/article/RssArticlesActivity.kt

@ -1,8 +1,10 @@
package io.legado.app.ui.rss.article package io.legado.app.ui.rss.article
import android.os.Bundle import android.os.Bundle
import androidx.core.content.ContextCompat
import androidx.lifecycle.LiveData import androidx.lifecycle.LiveData
import androidx.lifecycle.Observer import androidx.lifecycle.Observer
import androidx.recyclerview.widget.DividerItemDecoration
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import io.legado.app.App import io.legado.app.App
import io.legado.app.R import io.legado.app.R
@ -39,6 +41,12 @@ class RssArticlesActivity : VMBaseActivity<RssArticlesViewModel>(R.layout.activi
private fun initView() { private fun initView() {
ATH.applyEdgeEffectColor(recycler_view) ATH.applyEdgeEffectColor(recycler_view)
recycler_view.layoutManager = LinearLayoutManager(this) recycler_view.layoutManager = LinearLayoutManager(this)
recycler_view.addItemDecoration(
DividerItemDecoration(this, DividerItemDecoration.VERTICAL).apply {
ContextCompat.getDrawable(baseContext, R.drawable.ic_divider)?.let {
this.setDrawable(it)
}
})
adapter = RssArticlesAdapter(this, this) adapter = RssArticlesAdapter(this, this)
recycler_view.adapter = adapter recycler_view.adapter = adapter
refresh_progress_bar.isAutoLoading = true refresh_progress_bar.isAutoLoading = true

Loading…
Cancel
Save