Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
mykola-dev committed Oct 24, 2017
2 parents ee5d7ae + 3166978 commit f98f472
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ withBindable(viewModel) {
}
```

### Shared Preferences
### Shared Preferences binding
It's so annoying to deal with SharedPreferences directly:
```java
final String ageKey = "age";
Expand Down Expand Up @@ -120,7 +120,7 @@ prefs.isAdmin = true
println("the name is ${prefs.userName}")
```

### Bundle arguments tricks
### Bundle arguments binding
Dealing with args bundle has never been such simple before. Let's declare another one activity:
```kotlin
class SecondActivity : AppCompatActivity() {
Expand Down Expand Up @@ -153,10 +153,13 @@ val args = bundle {
}
```

### Resources
### Resources binding
Same rules can be used when using resources:
```kotlin
private val appName: String by res(R.string.app_name)
...
println(appName)
```
```

### Projects using this lib
- https://github.com/deviant-studio/energy-meter-scanner

0 comments on commit f98f472

Please sign in to comment.