LoadingView

Posted by steven on September 15, 2016

android Loading view animation

demo:

image

Usage:

layout:

<com.dx.dxloadingview.DxLoadingView
       android:id="@+id/loading_view"
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       android:layout_gravity="center"
       app:loadingColor="@color/colorPrimary"
       app:animationDuration="2400"
       app:loadingViewSize="large"
       />

animationDuration:单次动画的时间长度

开始动画:

DxLoadingView loadingView = (DxLoadingView) findViewById(R.id.loading_view);
loadingView.startAnimation();

取消加载动画:

loadingView.cancelAnimation();


参考:https://www.uplabs.com/posts/liquid-motion-marketing




source