glomadrian / loading-balls Goto Github PK
View Code? Open in Web Editor NEWA highly configurable library to do loading progress with animated balls
A highly configurable library to do loading progress with animated balls
Just got a Crashlytics report for this library used in a production app for java.lang.VerifyError
Please fix
I have included the balls in the xml of several fragments complete with customization but it only a few of them respect the customization. The other instances default to the configuration that comes with the library, i.e 3 balls of yellow, blue and red color.
This is my implementation:
<com.github.glomadrian.loadingballs.BallView android:id="@+id/ballView" android:layout_width="100dp" android:layout_height="100dp" android:layout_centerInParent="true" android:layout_gravity="center" android:layout_margin="30dp" lib:ball_colors="@array/color" lib:balls="5" lib:enable_size_animation="true" lib:max_ball_size="12dp" lib:min_ball_size="5dp" lib:movement_cycle_time="1500" lib:size_cycle_time="500" />
where the array of color has 5 different shades of red.
You have a wrong gradle depencency in your readme:
compile 'com.github.glomadrian:loading-balls:1.1@aar'
It should be (according to your maven repository):
compile 'com.github.glomadrian:loadingballs:1.1@aar'
-> without the dash between "loading" and "balls".
Using the above in the line is causing manifest merger failed.
Crashes in Android 5.0.x, but it is normal in other system version. No stacktrace.
It would be nice if you add support for creating the BallView
programmtically. You should add getters and setters for all the custom attributes (numberOfBalls, ballSize, minBallSize, maxBallSize, .....).
Otherwise I have to implement AttributSet just available as an interface.
Hi,,
On some devices (eg : my Asus Zenfone 2), using BallView make my app crash (i receive a SIGSERV error).
After some researches, i found that the error was due to the usage of BaseInterpolator class that cannot be found.
Indeed, this class is only available from API 22, making the app crash.
http://developer.android.com/reference/android/view/animation/BaseInterpolator.html
One solution is to replace the BaseInterpolator reference with Interpolator interface.
Calling stop() does not disable the animation fully and takes a lot of CPU. The stop method incorrectly calls start() instead of stop on the ballSizeAnimator:
public void stop() {
ballPathAnimator.stop();
if (sizeAnimationEnabled) {
ballSizeAnimator.start();
}
}
Hi the loader is awesome.
Just wanted to add not an issue actually but a suggestion.
Can we have setCancelable("false") something like Dialog.
Thanks,
Abhijit
Could you please add an option to auto start and stop the animations when the visibility changes i.e. start animations when View.VISIBLE
otherwise stop animations (both INVISIBLE
and GONE
)?
I am trying to to manually start, stop and restart animations but I am getting a lot of NullPointerExceptions
because of null ballPathAnimator
. The animator is created in the onSizeChanged(...)
and that method is not yet called when a Fragment's onResume()
is called, thus NPE crash. Automatic start/stop will solve all this troubles. Thank you for this beautiful loading indicator.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.