INNER CODE UNIT · Kotlin
run
Keyspace-cloud/android · app/src/main/kotlin/cloud/keyspace/android/AddCard.kt:192
override fun run() {
tagId = tagPicker.getSelectedTagId()
tagIdGrabber.postDelayed(this, 100)
}
})
}
favoriteButton = findViewById(R.id.favoriteButton)
favoriteButton.setImageDrawable(ContextCompat.getDrawable(applicationContext, R.drawable.ic_baseline_star_border_24))
favoriteButton.setOnClickListener {
favorite = if (!favorite) {
favoriteButton.setImageDrawable (ContextCompat.getDrawable(applicationContext, R.drawable.ic_baseline_star_24))
favoriteButton.startAnimation(AnimationUtils.loadAnimation(applicationContext, R.anim.heartbeat))
true
} else {
favoriteButton.setImageDrawable (ContextCompat.getDrawable(applicationContext, R.drawable.ic_baseline_star_border_24))
false
}