Skip to content

Instantly share code, notes, and snippets.

View shruti-basil-hs's full-sized avatar

shruti-basil-hs

View GitHub Profile
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
val w = Window()
with(w) {
setWidth(100)
setHeight(200)
setBackground(RED)
}
View.visible() {
this.visibility = View.Visible
}
textView  = (TextView) findViewById(R.id.text_foo);
textView.setText(“foo”);
text_foo.setText(“foo”);