To use it download first the library and edit it. Put on sketchware with moreblock.
And put this example on onCreate.
Example Code
final BoxLoaderView b = new BoxLoaderView(MainActivity.this);
b.setLayoutParams(new LinearLayout.LayoutParams(200,200));
linear1.addView(b);
b.setSpeed(5);
b.setStrokeColor(Color.parseColor("#995876"));
b.setLoaderColor(Color.parseColor("#C67890"));
b.setStrokeWidth(20);
For library download:
For example app download: