Daniel
05/03/2017, 12:26 PMkingsley
05/03/2017, 12:29 PMDaniel
05/03/2017, 12:30 PMkingsley
05/03/2017, 12:32 PMvar View.isVisible: Boolean
get () = visibility == View.VISIBLE
set(value) {
visibility = if (value) View.VISIBLE else View.GONE
}
...Given INVISIBLE isn't a state I use so oftenDaniel
05/03/2017, 12:38 PMfun View.isTranslucent() = alpha < 1.0f
Extensions are just a great way to add domain specific things without cluttering the android apikingsley
05/03/2017, 12:40 PMDaniel
05/03/2017, 12:42 PMkingsley
05/03/2017, 12:43 PMDaniel
05/03/2017, 12:44 PM