Last active
November 15, 2020 10:22
-
-
Save arifvn/fedba40486fedcb06acb2b62f799864d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MainActivity : AppCompatActivity() { | |
private val tvUsername: TextView by lazy { findViewById(R.id.tv_username) } | |
private var text: String by Delegates.observable("Initial Value") { property, oldvalue, newValue -> | |
tvUsername.text = newValue | |
} | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) | |
text = "Value has changed" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment