Giter Club home page Giter Club logo

stepview's Introduction

StepView

一个用自定义View实现的用于签到的小组件。

使用

1.布局文件中添加

 <com.rensw.stepview.HorizontalStepsViewIndicator
         android:id="@+id/stepView"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_centerInParent="true" />

2.填入数据

        stepsView = (HorizontalStepsViewIndicator) findViewById(R.id.stepView);
        //名称 签到状态  标记定位  是否有红包
        stepsBeanList.add(new PointBean("第1天", PointBean.STEP_SIGN, false, true));
        stepsBeanList.add(new PointBean("第2天", PointBean.STEP_SIGN));
        stepsBeanList.add(new PointBean("第3天", PointBean.STEP_SIGN, true));
        stepsBeanList.add(new PointBean("第4天", PointBean.STEP_UNSIGN));
        stepsBeanList.add(new PointBean("第5天", PointBean.STEP_UNSIGN,false,true));
        stepsBeanList.add(new PointBean("第6天", PointBean.STEP_UNSIGN));
        stepsBeanList.add(new PointBean("第7天", PointBean.STEP_UNSIGN));
        stepsBeanList.add(new PointBean("第8天", PointBean.STEP_UNSIGN));
        stepsBeanList.add(new PointBean("第9天", PointBean.STEP_UNSIGN));
        stepsView.setStepNum(stepsBeanList);

3.点击签到

stepsView.signAction();
or
stepsView.scrollToDays(6); 跳到指定的位置

Preview

Preview

stepview's People

Contributors

rensw avatar

Watchers

 avatar  avatar

Forkers

chinaredking

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.