All Projects → 0ximDigital → Rx2animations

0ximDigital / Rx2animations

Licence: apache-2.0
Repository for android animations Rx2 wrapper

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Rx2animations

Rxeventbus
A EventBus based on RxJava2, using Retention.CLASS annotation.
Stars: ✭ 68 (-28.42%)
Mutual labels:  rxjava2
Open Source Android Weather App
☔️ Open source android weather app. See "Issues" tab for current tasks queue. Tasks suitable for beginners are labeled with green "beginner friendly" tags.
Stars: ✭ 81 (-14.74%)
Mutual labels:  rxjava2
Pufferdb
🐡 An Android & JVM key-value storage powered by Protobuf and Coroutines
Stars: ✭ 91 (-4.21%)
Mutual labels:  rxjava2
Weexplus
🔨基于阿里WeexSDK跨平台方案,在原有的组件基础上,提供weex调用android native方法的一套扩展通信交互库,包含页面导航、数据存储、图片选择、二维码识别、权限等。
Stars: ✭ 73 (-23.16%)
Mutual labels:  rxjava2
Wanandroid
🔥项目采用 Kotlin 语言,基于 MVP + RxJava + Retrofit + Glide + EventBus 等架构设计,努力打造一款优秀的 [玩Android] 客户端
Stars: ✭ 1,223 (+1187.37%)
Mutual labels:  rxjava2
Functionalrx2
FunctionalRx2 is a collection of constructs to simplify a functional programming approach to Java and Android [STABLE]
Stars: ✭ 83 (-12.63%)
Mutual labels:  rxjava2
Weatherapplication
A WeatherApplication with usage of different libraries of Android.
Stars: ✭ 61 (-35.79%)
Mutual labels:  rxjava2
Timer
This is a simple rxjava2/rxjava3/kotlin-flow timer
Stars: ✭ 93 (-2.11%)
Mutual labels:  rxjava2
Kuroba Experimental
Free and open source image board browser
Stars: ✭ 76 (-20%)
Mutual labels:  rxjava2
Android Ripple Pulse Animation
A cool ripple and pulse background animation for android
Stars: ✭ 88 (-7.37%)
Mutual labels:  android-animation
Rxactivityresult
This is a library that can help you to receive results from startActivityForResult() as an Observable.
Stars: ✭ 76 (-20%)
Mutual labels:  rxjava2
Rxbus
Android reactive event bus that simplifies communication between Presenters, Activities, Fragments, Threads, Services, etc.
Stars: ✭ 79 (-16.84%)
Mutual labels:  rxjava2
Archetype
[DEPRECATED]Badass MVVM architecture.
Stars: ✭ 84 (-11.58%)
Mutual labels:  rxjava2
Android App Architecture Mvvm Databinding
A simple but complete project (in both Java & Kotlin) to demonstrate the Android application architecture with MVVM pattern, a client app for The Movie DB Web API. Dagger2 is used for dependency injection and RxJava is used for RFP (Reactive Functional Programming).
Stars: ✭ 69 (-27.37%)
Mutual labels:  rxjava2
Androidbase
Android project template for Gradle Kotlin DSL + 100% Kotlin + Base module + Extensions = ❤️
Stars: ✭ 92 (-3.16%)
Mutual labels:  rxjava2
Gankioclient
利用干货集中营的API自制练手之作
Stars: ✭ 63 (-33.68%)
Mutual labels:  rxjava2
Freesound Android
Unofficial Android client for the Freesound Project
Stars: ✭ 81 (-14.74%)
Mutual labels:  rxjava2
Fabfilter
Android app to showcase complex UI/Animations with and without MotionLayout
Stars: ✭ 1,333 (+1303.16%)
Mutual labels:  android-animation
Rxlife
使用Jetpack、Kotlin实现的RxJava自动注销库,你值得拥有!
Stars: ✭ 92 (-3.16%)
Mutual labels:  rxjava2
Android Base
Android Clean Architecture MVP RESTful client template app
Stars: ✭ 87 (-8.42%)
Mutual labels:  rxjava2

Rx2Animations

Download API

RxAnimations is a library with the main goal to make android animations more solid and cohesive.

Download

  compile 'oxim.digital:rx2anim:0.9.1'
    
  compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
  compile 'io.reactivex.rxjava2:rxjava:2.0.6'

RxJava version compatibility:

This Rx2Animations library is only compatible with rxJava 2.

If you are searching for the one compatible with rxJava 1, take a look over here.

Usage

A sample project which provides code examples that demonstrate uses of the classes in this project is available in the sample-app/ folder.

True power of this library is the ability to use animations as an observable asynchronous action.
That enables us to apply regular rxJava APIs on the animations.

It provides a couple of classes such as RxValueAnimator, RxValueObservable and RxAnimationBuilder.
Moreover, it also provides many regulary used animation methods (static import) such as fadeIn(), fadeOut(), slideIn(), leave() etc.

Examples:

  • Animating multiple views together
        animateTogether(fadeIn(firstView),
                        fadeIn(secondView));
  • Chaining multiple animations seamlessly
        fadeIn(firstView)
            .concatWith(fadeIn(secondView));
  • Simple ValueAnimator usage with RxValueAnimator
        final ValueAnimator opacityAnimator = ValueAnimator.ofFloat(0.f, 1.f);
        RxValueAnimator.from(opacityAnimator, animator -> view.setAlpha((float)animator.getAnimatedValue()))
  • Animating multiple values together with RxValueObservable
        xObservableAnimator = RxValueObservable.from(xAnimator);
        yObservableAnimator = RxValueObservable.from(yAnimator);
        
        Observable.combineLatest(xObservableAnimator.subscribe(),
                                 yObservableAnimator.subscribe(),
                                 (first, second) -> new Pair(first, second))
                  .subscribe(this::updateView);
  • Defining custom animations with RxAnimationBuilder
        RxAnimationBuilder.animate(view, DURATION)
                          .interpolator(INTERPOLATOR)
                          .fadeIn()
                          .rotate(DEGREES)
                          .translateBy(X, Y)
                          ...
                          .schedule([ | false]);

Animation created with RxAnimationBuilder automatically pretransforms the view, if not set otherwise.
I.e. if fadeIn() is called, views opacity will be set to 0.f before animation starts.

Managing animations

Starting animation - Every animation chain is started when we subscribe to it.
Ending animation - Animations can be easily stopped by unsubscribing animation subscription.

LICENSE

Copyright 2016 Mihael Franceković

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.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].