RepositoryHTMLUSUnited States
kmdupr33

kmdupr33/RxLoader

DEPRECATED data loading solution for android to load data with no memory leaks, no boiler-plate, and no method count bloat

168stars
14forks
5issues
3views

Deprecated

The newer live data offers a better solution to this problem. If you're interested in using rx with live data, you can checkout the live data from reactive streams api

Download

RxLoader

compose() your Observables and Singles into ones that load data that's cached across activity orientation changes without leaking your Activity and without you having to worry about unsubscribing.

RxLoader accomplishes this by building on top of Android Loaders, so the library is super lightweight (only defines 47 methods).

There's a lot of data loading solutions already for Android. I detail why I felt we needed another one here

Code

Github repo is here. Note that it contains some rough sample code.

Javadoc

Here

Basic Usage

build.gradle

dependencies {
  compile 'com.philosophicalhacker.rxloader:rxloader:0.4.0'
}  

FooActivity

@Override
protected void onCreate(Bundle savedInstanceState) {
    final RxLoader rxLoader = new RxLoader(this, getSupportLoaderManager());
    storyApiService
        .getAskStories()
        .compose(rxLoader.<List<Integer>>makeSingleTransformer())
        .subscribe(new Consumer<List<Integer>>() {
          @Override public void accept(List<Integer> integers) {
            Log.d(TAG, "call() called with: integers = [" + integers + "]");
          }
        });
}

Notice that you don't have worry about calling subscribeOn or observeOn either. That's handled by RxLoader.

License

Copyright 2017 Kevin Matthew Dupree

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.

Similar Projects

Discover other similar projects and AI models.

RepositoryHTML
harvesthq/chosen

Deprecated - Chosen is a library for making long, unwieldy select boxes more friendly.

21.9k
Dec 2, 2024
RepositoryHTML
TimeForANinja/node-ytsr

Do anonymous YouTube search requests.

280
Jan 9, 2024
RepositoryHTML
TimeForANinja/node-ytpl

Anonymous YouTube playlist resolver.

199
Jan 9, 2024
RepositoryJavaScript
sampotts/plyr

Deprecated in favour of Video.js 10; security updates only. Simple HTML5, YouTube and Vimeo player.

30.0k
Oct 21, 2026
RepositoryJupyter Notebook
ageron/handson-ml

⛔️ DEPRECATED – See https://github.com/ageron/handson-ml3 or handson-mlp instead.

25.6k
May 19, 2026
RepositoryRuby
progit/progit

Pro Git Book Content, 1st Edition - This content is deprecated. See 2nd edition at [progit2](https://github.com/progit/progit2)

6.0k
Apr 4, 2019
RepositorySwift
NMAC427/SwiftOCR

Fast and simple OCR library written in Swift

4.6k
Dec 13, 2020
RepositoryJava
jdamcd/android-crop

Android library project for cropping images

4.5k
Jun 1, 2021
RepositoryJava
jenkinsci/blueocean-plugin

Blue Ocean is a reboot of the Jenkins CI/CD User Experience

2.9k
Aug 5, 2026