Coder Social home page Coder Social logo

submitdemo's Introduction

This is library project with a custom view that implements concept of Submit Button (https://dribbble.com/shots/1426764-Submit-Button?list=likes&offset=3) made by Colin Garven.

###Demo###

###Usage###

 <com.tuesda.submit.SubmitView
        android:layout_centerInParent="true"
        android:id="@+id/submit"
        android:layout_width="200dp"
        android:layout_height="200dp" />
mSubmit.setOnProgressStart(new SubmitView.OnProgressStart() {
            @Override
            public void progressStart() {
                // do something when progress start
            }
        });
        
        mSubmit.setOnProgressDone(new SubmitView.OnProgressDone() {
            @Override
            public void progressDone() {
                // do something when progress is done
            }
        });

###public interface###

函数名 作用
setBackColor(int color) 设置图标背景色,默认是绿色(0xff00cd97),上图Demo设置为蓝色(0xff0097cd)
setText(String str) 设置按钮名字,默认是Submit
reset() 将按钮重置到初始状态
setProgress(float progress) 设置正在执行工作的执行进程
isProgressDone() 正在执行工作是否完成
setOnProgressStart(OnProgressStart listener) 设置progress开始回调
setOnProgressDone(OnProgressDone listener) 设置progress完成回调

submitdemo's People

Contributors

tuesda avatar

Watchers

Chew Chit Siang avatar 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.