pull/32/head
kunfei 5 years ago
parent 4cd4baa728
commit af7398464b
  1. 2
      app/src/main/java/io/legado/app/ui/replacerule/ReplaceRuleAdapter.kt

@ -12,6 +12,7 @@ import androidx.recyclerview.widget.RecyclerView
import io.legado.app.R
import io.legado.app.data.entities.ReplaceRule
import io.legado.app.help.ItemTouchCallback
import io.legado.app.lib.theme.backgroundColor
import kotlinx.android.synthetic.main.item_replace_rule.view.*
import org.jetbrains.anko.sdk27.listeners.onClick
@ -62,6 +63,7 @@ class ReplaceRuleAdapter(context: Context, var callBack: CallBack) :
class MyViewHolder(view: View) : RecyclerView.ViewHolder(view) {
fun bind(rule: ReplaceRule, callBack: CallBack) = with(itemView) {
this.setBackgroundColor(context.backgroundColor)
cb_name.text = rule.name
swt_enabled.isChecked = rule.isEnabled
swt_enabled.onClick {

Loading…
Cancel
Save