aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt9
1 files changed, 3 insertions, 6 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt
index dc5ac6ac..4b6c9e4e 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt
@@ -6,9 +6,7 @@ import android.support.v7.widget.RecyclerView
import android.view.View
import android.widget.ImageView
import ca.allanwang.kau.iitems.KauIItem
-import ca.allanwang.kau.utils.bindView
-import ca.allanwang.kau.utils.fadeIn
-import ca.allanwang.kau.utils.toDrawable
+import ca.allanwang.kau.utils.*
import com.bumptech.glide.Glide
import com.bumptech.glide.load.DataSource
import com.bumptech.glide.load.engine.GlideException
@@ -30,7 +28,7 @@ class AccountItem(val cookie: CookieModel?) : KauIItem<AccountItem, AccountItem.
override fun bindView(viewHolder: ViewHolder, payloads: List<Any>?) {
super.bindView(viewHolder, payloads)
with(viewHolder) {
- text.visibility = View.INVISIBLE
+ text.invisible()
text.setTextColor(Prefs.textColor)
if (cookie != null) {
text.text = cookie.name
@@ -46,10 +44,9 @@ class AccountItem(val cookie: CookieModel?) : KauIItem<AccountItem, AccountItem.
}
}).into(image)
} else {
- text.visibility = View.VISIBLE
+ text.visible()
image.setImageDrawable(GoogleMaterial.Icon.gmd_add_circle_outline.toDrawable(itemView.context, 100, Prefs.textColor))
text.text = itemView.context.getString(R.string.kau_add_account)
- //todo add plus image
}
}
}