GithubHelp home page GithubHelp logo

night-kang / circleprogressmenu Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stewforani/circleprogressmenu

0.0 2.0 0.0 6.07 MB

A simple circle menu with progress effect.It's used for some projects that need to be done step by step.The default color of the circles around is dark grey, The color of a certain circle will turn green when you are doing tasks involved in it and then blue when you complete them.Of course ,you can change these three status colors as you like at xml.Just copy my code if you need such a menu, which is quite easy to understand. Any suggestion, please send to:[email protected]. Thank you!

Java 100.00%

circleprogressmenu's Introduction

CircleProgressMenu

Intro:

It's a simple circle menu with progress effect. It's used for some projects that need to be done step by step.The default color of the circles around is dark grey, The color of a certain circle will turn green when you are doing tasks involved in it and then blue when you complete them.Of course ,you can change these three status colors as you like at xml.Just copy my code if you need such a menu, which is quite easy to understand. Any suggestion, please send to:[email protected]. Thank you! (welcome star and fork :) )

show:

You can see it live downloading this apk

how to use:
//amount of the circles around
private int aroundCircleCount = 7;

//the currrent progress num(=<aroundCircleCount)
private int currentProgressNum = 3;

//Icons of around circle (set by yourself)
private int[] circleIcon = {R.drawable.xxx,"","","","","",""};

//the en and cn of the circles around
private int[] aroundCircleTitleEn = {R.string.xxx,"","","","","",""};
private int[] aroundCircleTitleCn = {R.string.xxx,"","","","","",""};

//status of every circle
//default->grey,doing->green,complete->blue
//three status and color set by yourself
private int[] circleCompleteStatusList = {"","","","","","",""};
final CircleLayout circleLayout = (CircleLayout) findViewById(R.id.circle_layout);

circleLayout.setView(aroundCircleTitleEn, 
                     aroundCircleTitleCn,
                     circleIcon,
                     aroundCircleCount,
                     circleCompleteStatusList);

circleLayout.setProgressNum(currentProgressNum);
circleLayout.initView();
circleLayout.startAnim(360f * currentProgressNum / 7);
circleLayout.setOnClickListener(new CircleLayout.circleClickListener() {
    @Override
    public void click(int tag) {
    //the tag of circle which you click
    }
});
<com.stew.myapplication.CircleLayout
    android:id="@+id/circle_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"                                   
    app:aroundCircleCompleteColor="@color/around_circle_complete_color"
    app:aroundCircleDefColor="@color/around_circle_def_color"
    app:aroundCircleDoingColor="@color/around_circle_doing_color"
    app:centerArcColor="@color/arc_change"
    app:centerArcColorDef="@color/arc_default"
    app:centerCircleColor="@color/center_circle_color"
    app:centerCircleText="Start"
    app:centerCircleTextColor="@color/white"
    app:centerCircleTextSize="22sp"
    app:aroundSmallCircleColor="@color/white"
    app:titleSize="12sp"
    app:titleColor="@color/white"/>

circleprogressmenu's People

Contributors

stewforani avatar

Watchers

James Cloos avatar  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.