Git Product home page Git Product logo

rxt4a's Introduction

NAME

RxT4A - RxJava Toolbox for Android

Download

SYNOPSIS

// AndroidSchedulers

Scheduler scheduler = AndroidSchedulers.mainThread();
Scheduler scheduler = AndroidSchedulers.from(new Handler());

// AndroidCompositeSubscription

final AndroidCompositeSubscription s = new AndroidCompositeSubscription();

s.add(subscription1);
s.add(subscription2);

s.unsubscribe(); // unsubscribe 1 and 2

// it is reusable!
s.add(subscription3);
s.add(subscription4);

s.unsubscribe(); // unsubscribe 3 and 4, too!

// OperatorAddToCompositeSubscription

Observable.just("foo")
        .lift(new OperatorAddToCompositeSubscription<String>(s))
        .delay(5, TimeUnit.MILLISECONDS)
        .subscribe(...);

s.unsubscribe(); // unsubscribe the above subscription

DESCRIPTION

This is a fork of RxAndroid.

AndroidSchedulers

This is almost the same as RxAndroid's AndroidSchedulers.

AndroidCompositeSubscription

This is a variation of CompositeSubscription but can be reused multiple times.

OperatorAddToCompositeSubscription

Add a subscription to AndroidCompositeSubscription in operator chains.

AndroidSubscriptions

This class provides a way to create subscriptions for Android applications.

Subscription subscription = observable.subscribe(subscriber);

// Like Subscriptions.create(Action0), but the action is called on the main thread.
subscription.add(AndroidSubscriptions.unsubscribeOnMainThread(new Action0() {
    @Override
    public void call() {
        // You can touch touch views.
    }
}));

INSTALL

dependencies {
    compile 'com.cookpad.android.rxt4a:rxt4a:1.0.0'
}

LICENSE

The MIT License

AUTHOR

Cookpad Inc.

rxt4a's People

Contributors

gfx avatar gotokatsuya avatar

Watchers

James Cloos avatar Kohei Matsumoto avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.