Skip to content

Commit

Permalink
Updated usage
Browse files Browse the repository at this point in the history
  • Loading branch information
cioccarellia authored Nov 27, 2020
1 parent ad00492 commit 8f82a4a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,25 @@ implementation 'com.cioccarellia:kite:1.0.1'
- :heart: Kotlin powered, 100%.

## Usage
Initialize the kite global object (ideally inside your `Application` class) and pass to it the application context.
Initialize kite (ideally inside your `Application` class) and pass to it the application context.

```kotlin
class App : Application() {

override fun onCreate() {
super.onCreate()
Kite.fly(this)
}
}
```

You're all set. Simply import the `kite` object, select what you want to use and access it with the bracket notation `[]`.
You're all set. Import the `Kite` object, select what you want to use and access it with the bracket notation `[]`.

```kotlin
// Kite
fab.rippleColor = kite.color[R.color.md_light_lime]
fab.backgroundTintList = kite.colorStateList[R.color.md_lime]
fab.text = kite.string[R.string.ride]
fab.rippleColor = Kite.color[R.color.md_light_lime]
fab.backgroundTintList = Kite.colorStateList[R.color.md_lime]
fab.text = Kite.string[R.string.ride]

// Standard
fab.rippleColor = ContextCompact.getColor(appContext, R.color.md_light_lime)
Expand Down

0 comments on commit 8f82a4a

Please sign in to comment.