pull/94/head
parent
079f6ff5ae
commit
44570d0727
@ -0,0 +1,15 @@ |
||||
package io.legado.app.utils |
||||
|
||||
import androidx.core.content.ContextCompat |
||||
import androidx.recyclerview.widget.DividerItemDecoration |
||||
import androidx.recyclerview.widget.RecyclerView |
||||
import io.legado.app.R |
||||
|
||||
|
||||
fun RecyclerView.getVerticalDivider(): DividerItemDecoration { |
||||
return DividerItemDecoration(context, DividerItemDecoration.VERTICAL).apply { |
||||
ContextCompat.getDrawable(context, R.drawable.ic_divider)?.let { |
||||
this.setDrawable(it) |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue