ashik94vc / ElegantNumberButton

Widget which acts as a number counter which changes its number on +/- press.
Apache License 2.0
180 stars 63 forks source link
android android-library number-counter uistepper widget

Elegant Number Button

A simple Android library to implement a number counter with increment and decrement buttons.

Android Arsenal

Screens

Screen 1 Screen 1

Download

Grab the latest version on gradle using

compile 'com.cepheuen.elegant-number-button:lib:1.0.2'

or on maven

<dependency>
  <groupId>com.cepheuen.elegant-number-button</groupId>
  <artifactId>lib</artifactId>
  <version>1.0.2</version>
  <type>pom</type>
</dependency>

Usage

For Working implementation of this library check ElegantNumberButtonSample App

Customization

backgroundColor : Set button Background color

initialNumber: Set initial number for the button.

finalNumber : Set final number range for button.

textColor: Modify the text color of the button.

textSize: Change text size of the button.

backgroundDrawable: Add drawable background for the button.

Methods

setNumber(Integer number): Update the number of the widget.

setRange(Integer startNumber, Integer finalNumber) : Set the operational range for the widget

setOnValueChangeListener(OnValueChangedListener listener): listen for changes in the value

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request

Changelog

Version 1.0.2

Version 1.0.1

Version 1.0

Author

License

Copyright 2016 Ashik Vetrivelu

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.