Skip to content

NewtonCradleLoading

Midhilaj edited this page Mar 18, 2017 · 12 revisions

NewtonCradleLoading

What is Newton's Cradle?

And the effect is here

Usage

Add NewtonCradleLoading to your xml.

  <com.victor.loading.newton.NewtonCradleLoading
        android:id="@+id/newton_cradle_loading"
        android:layout_width="wrap_content"
        android:layout_height="150dp"/>


When start() is called, the animation will start.

When stop() is called, the animation will stop.

Example Java code

NewtonCradleLoading newtonCradleLoading; newtonCradleLoading = (NewtonCradleLoading)findViewById(R.id.newton_cradle_loading); newtonCradleLoading.start(); newtonCradleLoading.setLoadingColor(R.color.colorPrimary);

Clone this wiki locally