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

Android library that adds methods isForeground / isBackground / isReturnedFromBackground.

The Sweetest way into saving and loading to SharedPreferences.

Android RxJava library for Social auth (Google, Facebook) and Smart Lock For Passwords.

AssetCopier copies assets to real files then optionally uses MediaScannerConnection to scan them for media. The end result is real files in the file system all ready for consumption. It's especially useful for providing an app with test data (images/videos) for UI testing.

Fetch is a simple yet powerful Android library that allows you to manage downloads more efficiently in your Android apps. It uses a background service on the device to download and maintain requests.

Features:

  • Simple and easy to use API.
  • Continuous downloading in the background.
  • Ability to pause and resume downloads.
  • Set the priority of a download request.
  • Ability to retry failed downloads.
  • Easy progress and status tracking.
  • And more...

Android android.graphics.Color has a function for color-parsing and supports basic colors of w3c.

This project is for supporting more color keywords. It's based on W3C's Expanded Color.

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