SimpleArcLoader
- bored of seeing the same old Android Loader ? SimpleArcLoader is one thing you should try.
Preview
Setup
Gradle
Example 1
To show dialog
SimpleArcDialog mDialog = new SimpleArcDialog(this);
mDialog.setConfiguration(new ArcConfiguration(this));
mDialog.show();
Example 2
Making use of just the Loader
<com.leo.simplearcloader.SimpleArcLoader
android:visibility="visible"
android:id="@+id/loader"
android:layout_centerInParent="true"
android:layout_width="60dp"
android:layout_height="60dp"
custom:arc_style="simple_arc"
custom:arc_speed="medium"
custom:arc_margin="3dp">
</com.leo.simplearcloader.SimpleArcLoader>
Example 3
Customizing Dialog/SimpleArcLoader View using ArcConfiguration
ArcConfiguration configuration = new ArcConfiguration(context);
configuration.setLoaderStyle(SimpleArcLoader.STYLE.COMPLETE_ARC);
configuration.setText("Please wait..");
// Using this configuration with Dialog
mDialog.setConfiguration(configuration);
// Using this configuration with ArcLoader
mSimpleArcLoader.refreshArcLoaderDrawable(configuration);
You can customize Arc/Dialog with ArcConfiguration methods -
- setLoaderStyle(SimpleArcLoader.STYLE mLoaderStyle)
- setArcMargin(int mArcMargin)
- setArcWidthInPixel(int mStrokeWidth)
- setColors(int[] colors)
- setTypeFace(Typeface typeFace)
- setText(String mText)
- setTextColor(int mTextColor)
- setTextSize(int size)
- setAnimationSpeedWithIndex(int mAnimationIndex) Values to be passed SimpleArcLoader.SPEED_SLOW, SimpleArcLoader.SPEED_MEDIUM, SimpleArcLoader.SPEED_FAST
Please refer the examples for some of the customization.
No comments:
Post a Comment