Android functioins : fromSdk{}other{}, toSdk{}other{}, afterSdk{}other{}, untilSdk{}other{}

#1

Source Code << << << click here

e.g.

fromSdk(16){   
    view.background = null
} other {
    view.setBackgroundDrawable(null)
}

functioins :

 fromSdk {...} other {...}
 toSdk {...} other {...}
 afterSdk {...} other {...}
 untilSdk {...} other {...}
#2

Wouldn’t that be shorter?

    when {
        sdkLevel(16) -> view.background = null
        else -> view.setBackroundDrawable(null)
    }