Skip to content

Commit 33bfe2c

Browse files
committed
📝 doc: update readme
1 parent 2ebe1ef commit 33bfe2c

1 file changed

Lines changed: 12 additions & 14 deletions

File tree

README.md

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ Create gradient animations like Instagram&Spotify.
1414
private lateinit var mSpark: Spark
1515

1616
override fun onCreate(savedInstanceState: Bundle?) {
17-
super.onCreate(savedInstanceState)
18-
setContentView(R.layout.activity_main)
17+
// ...
1918

2019
mSpark = Spark.Builder()
2120
.setView(frameLayout) // View or view group
@@ -26,14 +25,12 @@ override fun onCreate(savedInstanceState: Bundle?) {
2625
}
2726

2827
override fun onResume() {
29-
super.onResume()
30-
28+
// ...
3129
mSpark.startAnimation()
3230
}
3331

3432
override fun onPause() {
35-
super.onPause()
36-
33+
// ...
3734
mSpark.stopAnimation()
3835
}
3936
```
@@ -104,7 +101,7 @@ dependencies {
104101
</shape>
105102
```
106103

107-
### Create the animation list
104+
### Create the Animation List
108105
`custom_anim_list.xml`
109106

110107
```xml
@@ -123,18 +120,19 @@ dependencies {
123120
</animation-list>
124121
```
125122

126-
### Apply your custom animation list
123+
### Apply Your Custom Animation List
127124
```kotlin
128125
mSpark = Spark.Builder()
129-
.setView(frameLayout) // View or view group
130-
.setDuration(4000)
131-
.setAnimList(Spark.ANIM_GREEN_PURPLE) // Your custom animation list
132-
.build()
126+
// ...
127+
.setAnimList(R.drawable.custom_anim_list) // Your custom animation
128+
// ...
133129
```
134130

135-
For the colors, I referred to [Alexander Zaytsev](https://dribbble.com/anwaltzzz)'s [shot](https://dribbble.com/shots/3380672-Sketch-Gradients-Freebie) on Dribbble.
131+
## Thanks
132+
133+
Designed by [Alexander Zaytsev](https://dribbble.com/anwaltzzz).
136134

137135
![Sketch Gradients](./art/Sketch_Gradients.png)
138136

139137
## License
140-
Charles is under the MIT license. See the [LICENSE](LICENSE) for more information.
138+
Spark is under the MIT license. See the [LICENSE](LICENSE) for more information.

0 commit comments

Comments
 (0)