Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
imallan committed Feb 25, 2016
1 parent 2b8c856 commit 6294cae
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Toothpick
A light Kotlin library that replicates ButterKnife's function

## Usage
```kotlin
val mButton: Button by bind(R.id.button_press_me) //simple lazy delegation

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
Toothpick.bind(this) // use this when you bind @OnClick
}

@OnClick(R.id.button_press_me) fun showToast() {
// ...
}
```

0 comments on commit 6294cae

Please sign in to comment.