simplify list_item layout

This commit is contained in:
Conny Duck 2018-02-03 13:24:12 +01:00
commit 3524a67a7f
2 changed files with 11 additions and 22 deletions

View file

@ -169,13 +169,10 @@ class ListsActivity : BaseActivity(), ListsView {
.let(this::ListViewHolder)
.apply {
val context = nameTextView.context
val icon = IconicsDrawable(context, GoogleMaterial.Icon.gmd_list)
val size = Utils.dpToPx(context, 20)
val icon = IconicsDrawable(context, GoogleMaterial.Icon.gmd_list).sizeDp(20)
ThemeUtils.setDrawableTint(context, icon, android.R.attr.textColorTertiary)
icon.setBounds(0, 0, size, size)
nameTextView.compoundDrawablePadding = Utils.dpToPx(context, 8)
TextViewCompat.setCompoundDrawablesRelative(
nameTextView, icon, null, null, null)
TextViewCompat.setCompoundDrawablesRelativeWithIntrinsicBounds(nameTextView, icon, null, null, null)
}
}