Skip to content

Alltheend/Loading-Icon

Repository files navigation

Loading-Icon

Just add LoadingIcon.java to your project and customize your loading icon as you like. Add it like any other View:

    LoadingIcon icon;
    RelativeLayout layout;
    layout = (RelativeLayout) findViewById(R.id.layout);
    params = new RelativeLayout.LayoutParams(500, 500);
    icon = new LoadingIcon(this);
    icon.setLayoutParams(params);
    layout.addView(icon);

Default icon:

Methods:

setIconDuration(long duration);
setIconColor(String[] color);
setIconInverted(boolean inverted);
setIconBgColor(String color);
setIconStroke(int stroke);
setIconLines(int lineCount);
setIconSpacing(int spacing);
setIconInterpolator(BaseInterpolator interpolator);

Customized example:

        icon.setIconColor(new String[]{
                "#DA0124" , "#000000"});
        icon.setIconBgColor("#ffffff");
        icon.setIconSpacing(9);
        icon.setIconLines(4);
        icon.setIconInterpolator(new OvershootInterpolator());

About

Dynamic loading icon for android

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages