Skip to content

Commit

Permalink
Fix: fixed the Bitmap to Drawable didn't become drawable.
Browse files Browse the repository at this point in the history
  • Loading branch information
pokk committed Aug 30, 2018
1 parent 8f5e451 commit d0247af
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ allprojects {
And add our dependency to your app `bundle.gradle`.

```gradle
implementation 'com.devrapid.jieyi:kotlinknifer:1.5.8'
implementation 'com.devrapid.jieyi:kotlinknifer:1.5.9'
implementation 'com.devrapid.jieyi:kotlinshaver:0.2.3'
implementation 'com.devrapid.jieyi:kotlinshaver:0.2.4'
```

Then you can use it!!!
Expand All @@ -100,14 +100,14 @@ Then you can use it!!!
<dependency>
<groupId>com.devrapid.jieyi</groupId>
<artifactId>kotlinknifer</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.devrapid.jieyi</groupId>
<artifactId>kotlinshaver</artifactId>
<version>0.2.3</version>
<version>0.2.4</version>
<type>pom</type>
</dependency>
```
Expand All @@ -127,14 +127,14 @@ Then you can use it!!!
If you'd not like to use them to your project, you can add the exclude as like below

```gradle
implementation('com.devrapid.jieyi:kotlinknifer:1.5.8', {
implementation('com.devrapid.jieyi:kotlinknifer:1.5.9', {
exclude group: 'com.google.code.gson', module: 'gson'
exclude group: 'com.github.bumptech.glide', module: 'glide'
})
```

```gradle
implementation('com.devrapid.jieyi:kotlinshaverr:0.2.3', {
implementation('com.devrapid.jieyi:kotlinshaverr:0.2.4', {
exclude group: 'io.reactivex.rxjava2', module: 'rxjava'
exclude group: 'io.reactivex.rxjava2', module: 'rxkotlin'
})
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ proj_name=kotlinknifer
proj_libname=KotlinKnifer
proj_group=com.devrapid.jieyi
proj_artifactid=kotlinknifer
proj_version=1.5.8
proj_version=1.5.9
proj_description=For developing an Android conveniently and rapidly.
proj_websiteurl=https://github.com/pokk/KotlinKnifer
proj_issuetrackerurl=https://github.com/pokk/KotlinKnifer/issues
Expand All @@ -36,4 +36,4 @@ [email protected]
proj_kotlin_name=kotlinshaver
proj_kotlin_libname=KotlinShaver
proj_kotlin_artifactid=kotlinshaver
proj_kotlin_version=0.2.3
proj_kotlin_version=0.2.4
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ fun Context.scaledDrawable(@DrawableRes drawableId: Int, ratio: Float) =

inline fun Int.toDrawable(context: Context) = context.getDrawable(this)

inline fun Bitmap.toDrawable(context: Context) = BitmapDrawable(context.resources, this).bitmap
inline fun Bitmap.toDrawable(context: Context) = BitmapDrawable(context.resources, this)

inline fun Bitmap.palette() = Palette.from(this)

Expand Down

0 comments on commit d0247af

Please sign in to comment.