Giter Site home page Giter Site logo

easypath's Introduction

EasyPath

Including a light PathParser tool and animated PathView for Android, which is based on vector. PathParser is easy to EXTEND, welcome and have fun!

ScreenShots

Icons

icon1

icon2

Separate

EasyPathSeparate

Together

EasyPathTogether

Dynamic&Repeat

EasyPathRepeat

Gradle

Add to your root build.gradle:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

Add the dependency:

dependencies {
    compile 'com.github.huzenan:EasyPath:v1.0.2'
}

Usage

Step 1

Define your path string like this:

    <string name="path_string_android">
        m100,300    c130,20,470,20,500,300    m500,300
            l500,525  100,525  100,300  500,300
                m200,180  o215,180,10,1    m400,180  o385,180,10,2
                    m200,105  l175,75    m400,105  l425,75
    </string>

Step 2

layout

    <com.hzn.lib.EasyPathView
        android:id="@+id/easy_path_view"
        android:layout_width="50dp"
        android:layout_height="50dp"
        custom:epvAnimDurations="250,350,150,150,150,150"
        custom:epvAnimMode="separate"
        custom:epvDynamic="false"
        custom:epvFixedHeight="600"
        custom:epvFixedWidth="600"
        custom:epvPathString="@string/path_string_android"
        custom:epvState="show"
        custom:epvStrokeColor="#09991c"
        custom:epvStrokeFixedWidth="20"
        custom:epvStrokeIsRound="true"/>

Activity

    easyPathView.starDraw(true); // true if repeat
    ...
    easyPathView.starErase();
    ...
    easyPathView.stopRepeat();
    ...
    easyPathView.setAnimProgress(0.66f);
    ...
    easyPathView.addOnAnimatorListener(new EasyPathView.OnAnimatorListener() {
        @Override
        protected void onAnimStart(int state) {
            // your codes
        }
        
        @Override
        protected void onAnimEnd(int state) {
            // your codes
        }
        
        @Override
        protected void onAnimRepeat(int state) {
            // your codes
        }
    });

easypath's People

Contributors

huzenan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

easypath's Issues

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.