|
|
@ -12,7 +12,8 @@ import io.legado.app.lib.theme.ATH |
|
|
|
import io.legado.app.utils.getViewModel |
|
|
|
import io.legado.app.utils.getViewModel |
|
|
|
import kotlinx.android.synthetic.main.activity_rss_artivles.* |
|
|
|
import kotlinx.android.synthetic.main.activity_rss_artivles.* |
|
|
|
|
|
|
|
|
|
|
|
class RssArticlesActivity : VMBaseActivity<RssArticlesViewModel>(R.layout.activity_rss_artivles) { |
|
|
|
class RssArticlesActivity : VMBaseActivity<RssArticlesViewModel>(R.layout.activity_rss_artivles), |
|
|
|
|
|
|
|
RssArticlesAdapter.CallBack { |
|
|
|
|
|
|
|
|
|
|
|
override val viewModel: RssArticlesViewModel |
|
|
|
override val viewModel: RssArticlesViewModel |
|
|
|
get() = getViewModel(RssArticlesViewModel::class.java) |
|
|
|
get() = getViewModel(RssArticlesViewModel::class.java) |
|
|
@ -33,7 +34,7 @@ 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) |
|
|
|
adapter = RssArticlesAdapter(this) |
|
|
|
adapter = RssArticlesAdapter(this, this) |
|
|
|
recycler_view.adapter = adapter |
|
|
|
recycler_view.adapter = adapter |
|
|
|
refresh_progress_bar.isAutoLoading = true |
|
|
|
refresh_progress_bar.isAutoLoading = true |
|
|
|
} |
|
|
|
} |
|
|
@ -45,4 +46,8 @@ class RssArticlesActivity : VMBaseActivity<RssArticlesViewModel>(R.layout.activi |
|
|
|
adapter?.setItems(it) |
|
|
|
adapter?.setItems(it) |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override fun readRss(rssArticle: RssArticle) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |