GithubHelp home page GithubHelp logo

jiubadao / simplearcloader Goto Github PK

View Code? Open in Web Editor NEW

This project forked from prathameshsawant9/simplearcloader

0.0 2.0 0.0 1.23 MB

Bored of seeing the same old Android Loader ? SimpleArcLoader is one thing you should try.

Java 100.00%

simplearcloader's Introduction

Android Arsenal

SimpleArcLoader

  • bored of seeing the same old Android Loader ? SimpleArcLoader is one thing you should try.

Preview

Setup

Gradle

  dependencies {
      compile 'com.leo.simplearcloader:simplearcloader:1.0.+'
  }

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.

Developed By

License

Copyright 2016 Prathamesh Sawant

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

simplearcloader's People

Contributors

prathameshsawant9 avatar

Watchers

James Cloos avatar gopher avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.