RxPicasso

Reactive Picasso callbacks

License

License

Categories

Categories

Net
GroupId

GroupId

net.samystudio.rxpicasso
ArtifactId

ArtifactId

rxpicasso
Last Version

Last Version

0.3.0
Release Date

Release Date

Type

Type

aar
Description

Description

RxPicasso
Reactive Picasso callbacks
Project URL

Project URL

https://github.com/SamYStudiO/RxPicasso/
Source Code Management

Source Code Management

https://github.com/SamYStudiO/RxPicasso/

Download rxpicasso

How to add to project

<!-- https://jarcasting.com/artifacts/net.samystudio.rxpicasso/rxpicasso/ -->
<dependency>
    <groupId>net.samystudio.rxpicasso</groupId>
    <artifactId>rxpicasso</artifactId>
    <version>0.3.0</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/net.samystudio.rxpicasso/rxpicasso/
implementation 'net.samystudio.rxpicasso:rxpicasso:0.3.0'
// https://jarcasting.com/artifacts/net.samystudio.rxpicasso/rxpicasso/
implementation ("net.samystudio.rxpicasso:rxpicasso:0.3.0")
'net.samystudio.rxpicasso:rxpicasso:aar:0.3.0'
<dependency org="net.samystudio.rxpicasso" name="rxpicasso" rev="0.3.0">
  <artifact name="rxpicasso" type="aar" />
</dependency>
@Grapes(
@Grab(group='net.samystudio.rxpicasso', module='rxpicasso', version='0.3.0')
)
libraryDependencies += "net.samystudio.rxpicasso" % "rxpicasso" % "0.3.0"
[net.samystudio.rxpicasso/rxpicasso "0.3.0"]

Dependencies

compile (5)

Group / Artifact Type Version
io.reactivex.rxjava2 : rxjava jar 2.2.2
io.reactivex.rxjava2 : rxandroid jar 2.1.0
com.squareup.picasso3 : picasso jar 3.0.0-SNAPSHOT
org.jetbrains.kotlin : kotlin-stdlib-jdk7 jar 1.2.71
androidx.annotation » annotation jar 1.0.0

Project Modules

There are no modules declared in this project.

RxPicasso

Android Reactive Picasso callbacks.

Warning: this library is only compatible with Picasso 3 which is under development for now and thus this library api may changes drastically as Picasso 3 makes its own changes.

Download

Java

implementation 'net.samystudio.rxpicasso:rxpicasso:0.3.0'

Kotlin

implementation 'net.samystudio.rxpicasso:rxpicasso-kotlin:0.3.0'

Snapshots are available from Sonatype's snapshots repository. If you want to run latest snapshot add its repository from your root build.gradle:

allprojects {
    repositories {
        google()
        jcenter()
        ...
        maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
    }
}

and change library version:

Java

implementation 'net.samystudio.rxpicasso:rxpicasso:0.4.0-SNAPSHOT'

Kotlin

implementation 'net.samystudio.rxpicasso:rxpicasso-kotlin:0.4.0-SNAPSHOT'

Usage

Java:

// load image into an imageView
RxPicasso
        .observeInto(picasso, path, imageView)
        .subscribe(() -> {
            // image loaded
        }, Throwable::printStackTrace);

// load image into an imageView building request directly from stream
RxPicasso
        .observeInto(picasso, path, imageView)
        .resize(500, 500)
        .rotate(180)
        .subscribe(() -> {
            // image loaded
        }, Throwable::printStackTrace);

// load image into a bitmap
RxPicasso
        .observeIntoBitmap(picasso, path)
        .subscribe(bitmap -> {
            // bitmap loaded
        }, Throwable::printStackTrace);

Check rxpicasso-sample for more examples.

Kotlin:

// load image into an imageView
picasso
    .observeInto(path, imageView)
    .subscribe({
        // image loaded
    }, {
        it.printStackTrace()
    })
    
// load image into an imageView building request directly from stream
picasso
    .observeInto(path, imageView)
    .resize(500, 500)
    .rotate(180f)
    .subscribe({
        // image loaded
    }, {
        it.printStackTrace()
    })

// load image into a bitmap
picasso
    .observeIntoBitmap(path)
    .subscribe({ bitmap ->
        // bitmap loaded
    }, {
        it.printStackTrace()
    })

Check rxpicasso-kotlin-sample for more examples.

License

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Versions

Version
0.3.0
0.2.0
0.1.0