Skip to content

Instantly share code, notes, and snippets.

@arifvn
Created November 15, 2020 06:59
Show Gist options
  • Save arifvn/befeb65da6a22bdcf8537c37fb612fdc to your computer and use it in GitHub Desktop.
Save arifvn/befeb65da6a22bdcf8537c37fb612fdc to your computer and use it in GitHub Desktop.
class MainActivity: AppCompatActivity {
val buttonLogin by id(R.id.btn_login)
// other stuff
// ..
// ..
fun AppCompatActivity.id(viewId: Int) = ViewDelegate(viewId)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment