velcro-parts
A bunch of little android libraries for throwing in your application to avoid having to lookup, copy and pasting from one application to another.
The Parts
velcro-betterviewanimator
Adapted from Jake Wharton’s U2020 application, BetterViewanimator is a view animator with an added methods setDisplayedChildId and getDisplayedChildId allowing you to do animations using resource ids.
Usage
Add
compile 'com.andrewreitz.velcro:velcro-betterviewanimator:1.0.1'
to your build.gradle and extend BetterviewAnimator.
velcro-bindableadapter
Adapted from Jake Wharton’s U2020 application, BindableAdapter is an adapter that makes it easier inflate and get view reusage from Adapters for Lists.
Usage
Add
compile 'com.andrewreitz.velcro:velcro-bindableadapter:1.0.1'
to your build.gradle and extend BindableAdapter.
velcro-infinitescroll
Adapted from Panayiotis Papageorgiou’s infinite scrolling post, infintescroll contains the class InfiniteScrollListener for extension and handing off to ListViews for easy infinte scrolling.
Usage
Add
compile 'com.andrewreitz.velcro:velcro-infinitescroll:1.0.1'
to your build.gradle and extend InfiniteScrollListener. Then attach it to the ListView you want infinite scrolling on.
velcro-rx
A bunch of useful RxJava classes.
-
EndlessObserverfrom Jake Wharton’s U2020 app, is an observer that only requires you to implementonNext, and thus "never ends" -
EndObserverfrom Jake Wharton’s U2020 app, that introduces a new method on the ObserveronEnd. This method is called whenonCompleteoronEndis called, always notify you that the Observer has ended receiving events. -
RetrofitObserveris an Observer to use with Retrofit. It will automatically give you an error as aRetrofitError. If there is an error other than retrofit you can handle this by overridingnonRetrofitError. This class also has the same qualities asEndObserver.
Usage
Add
compile 'com.andrewreitz.velcro:velcro-rx:1.0.1'
to your build.gradle and extends the classes as you need.
License
Copyright 2014 Andrew Reitz
Copyright 2014 Jake Wharton
Copyright 2014 Panayiotis Papageorgiou
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.