RubberLoaderView


Source link: https://github.com/greenfrvr/rubber-loader

RubberLoaderView

Version 1.1.2 available!

Android indeterminate loader widget with rubber shape and color animations. Inspired by

Click picture below to watch it in action.

Demo

Downlaod latest demo app from Play Market:

Gradle Dependency

Easily reference the library in your Android projects using this dependency in your module's build.gradle file:

dependencies {

  compile 'com.github.greenfrvr:rubber-loader:1.1.2@aar' 
}

Library available on both jCenter and Maven Central, but in case of any issues (library can't be resolved) use Bintray repo.

Add repository to your app's build.gradle file:

repositories {

  maven {

url 'https://dl.bintray.com/greenfrvr/maven/'
  
}
 
}

This will reference Bintray's Maven repository that contains hashtags widget directly, rather than going through jCenter first.

Customizing

All attributes can be defined in layout .xml file or programmatically. Below is a list of available attributes.

Loader modes

Different loader modes has different animation behaviour. Default mode is normal.

 <attr name="loaderMode" format="enum">

<enum name="normal" value="0"/>

<enum name="equal" value="1"/>

<enum name="centered" value="2"/>
  </attr>
Size

Currently 6 pre-defined sizes are available. Loader with ripple need more space.

Value Sizes Sizes with ripples
EXTRA_TINY 27dp * 12dp 36dp * 36dp
TINY 54dp * 24dp 72dp * 72dp
SMALL (default) 81dp * 36dp 108dp * 108dp
NORMAL 108dp * 48dp 144dp * 144dp
MEDIUM 135dp * 60dp 180dp * 180dp
LARGE 162dp * 72dp 216dp * 216dp
 <attr name="loaderSize" format="enum">

<enum name="extra_tiny" value="0"/>

<enum name="tiny" value="1"/>

<enum name="small" value="2"/>

<enum name="normal" value="3"/>

<enum name="medium" value="4"/>

<enum name="large" value="5"/>
  </attr>
Color

Define 2 colors which will form smooth color transition.

 <attr name="loaderPrimeColor" format="color|reference"/>
  <attr name="loaderExtraColor" format="color|reference"/>
  <attr name="loaderRippleColor" format="color|reference"/>

If you set only loaderPrimeColor, its value will be set to loaderExtraColor, so loader will be filled with solid prime color.

Ripples

Select loaderRippleMode to add ripple animations effect. Default mode is none. Loaders with ripple will have bigger sizes than without them.

 <attr name="loaderRippleMode" format="enum">

<enum name="none" value="0"/>

<enum name="normal" value="1"/>

<enum name="reverse" value="2"/>

<enum name="cycle" value="3"/>
  </attr>

Usage

There are 2 methods which starts RubberLoaderView animation: RubberLoaderView.startLoading() and RubberLoaderView.startLoading(long delay). To stop RubberLoader animation call RubberLoaderView.stopLoading().

Also you can set different interpolation functions by calling RubberLoaderView.setInterpolator(TimeInterpolator interpolator). It's highly recommended to use following interpolators: PulseInterpolator, PulseInverseInterpolator and LinearInterpolator.

License

 Copyright 2015 greenfrvr  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. 

Resources

Realm browser that can be used to see tables, structure and content. This browser can be accessed from localhost that hosted by the Android device.

Chuck is a simple in-app HTTP inspector for Android OkHttp clients. Chuck intercepts and persists all HTTP requests and responses inside your application, and provides a UI for inspecting their content.

An Android library that takes the standard Android Toast and takes it to the next level with a variety of styling options that gives your app and user experience that little extra unique feeling! Style your toast either by code or in styles.xml!

A Powerful AlphabetIndex FastScroller for Android's RecyclerView! Its shows Alphabets over scrolling the recycle view from A-Z.

A lightweight RxJava2 wrapper for the Android Firebase client SDK, the user is expected to own the lifecycle of an asynchronous request via RxJava2 Disposable handling, however elements in this library will properly unregister listeners when a Publisher is cancelled, except in the case of value setting where it is only possible to register a listener when making the request. In this case the emitter is checked for it's subscription state.

Whilst the FirebaseDatabase api is mirrored with RxFirebaseDatabase it only really uses the database reference, this is so that the reference hierarchy can easily be traversed through child and parent elements. Methods requiring FirebaseDatabase obtain this from the DatabaseReference and allow you to chain further requests by returning itself.

This library depends on RxTasks and RxJava2 to provide appropriate api responses. Therefore asynchronous responses will return, Single, Completable and Flowable respectively.

Two step picker dialog for Android that helps you easily pick nested data on android.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes