pull/32/head
kunfei 5 years ago
parent aa4d7616ed
commit 4cd4baa728
  1. 9
      app/src/main/java/io/legado/app/ui/replacerule/ReplaceRuleActivity.kt
  2. 2
      app/src/main/res/layout/activity_replace_rule.xml

@ -18,7 +18,6 @@ import io.legado.app.data.entities.ReplaceRule
import io.legado.app.help.ItemTouchCallback import io.legado.app.help.ItemTouchCallback
import io.legado.app.lib.theme.ATH 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_book_source.*
import kotlinx.android.synthetic.main.activity_replace_rule.* import kotlinx.android.synthetic.main.activity_replace_rule.*
import org.jetbrains.anko.doAsync import org.jetbrains.anko.doAsync
@ -51,11 +50,11 @@ class ReplaceRuleActivity : VMBaseActivity<ReplaceRuleViewModel>(R.layout.activi
} }
private fun initRecyclerView() { private fun initRecyclerView() {
ATH.applyEdgeEffectColor(rv_replace_rule) ATH.applyEdgeEffectColor(recycler_view)
rv_replace_rule.layoutManager = LinearLayoutManager(this) recycler_view.layoutManager = LinearLayoutManager(this)
adapter = ReplaceRuleAdapter(this, this) adapter = ReplaceRuleAdapter(this, this)
rv_replace_rule.adapter = adapter recycler_view.adapter = adapter
rv_replace_rule.addItemDecoration( recycler_view.addItemDecoration(
DividerItemDecoration(this, DividerItemDecoration.VERTICAL).apply { DividerItemDecoration(this, DividerItemDecoration.VERTICAL).apply {
ContextCompat.getDrawable(baseContext, R.drawable.ic_divider)?.let { ContextCompat.getDrawable(baseContext, R.drawable.ic_divider)?.let {
this.setDrawable(it) this.setDrawable(it)

@ -14,7 +14,7 @@
app:title="@string/replace_purify" /> app:title="@string/replace_purify" />
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_replace_rule" android:id="@+id/recycler_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"

Loading…
Cancel
Save