Omega-R / OmegaLint

3 stars 0 forks source link

Неверно выделяет контекст #37

Closed Just-D-A closed 3 years ago

Just-D-A commented 3 years ago

fun DividerItemDecoration.addInset(context: Context, insetResId: Int): DividerItemDecoration { val attrs = intArrayOf(android.R.attr.listDivider) val attr = context.obtainStyledAttributes(attrs) val divider = attr.getDrawable(0) val inset = context.resources.getDimensionPixelSize(insetResId) val insetDivider = InsetDrawable(divider, inset, 0, inset, 0) attr.recycle() setDrawable(insetDivider) return this }