Skip to content

Instantly share code, notes, and snippets.

View mmlovesyy's full-sized avatar

Linus Chen mmlovesyy

View GitHub Profile
@mmlovesyy
mmlovesyy / Frequently used Kotlin extensions for Android
Last active November 18, 2021 10:04
Frequently used Kotlin extensions for Android
```kotlin
/**
* property extension
*/
var View.isVisible: Boolean
get() = visibility == View.VISIBLE
set(value) {
val v = if (value) View.VISIBLE else View.GONE
if (visibility != v) {