All Projects → ashik94vc → Elegantnumberbutton

ashik94vc / Elegantnumberbutton

Licence: apache-2.0
Widget which acts as a number counter which changes its number on +/- press.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Elegantnumberbutton

Django Jsoneditor
Django JSONEditor input widget to provide javascript online JSON Editor
Stars: ✭ 124 (-11.43%)
Mutual labels:  widget
Spperspective
Widgets iOS 14 animation with 3D and dynamic shadow. Customisable transform and duration.
Stars: ✭ 127 (-9.29%)
Mutual labels:  widget
Tagger
Zero Dependency, Vanilla JavaScript Tag Editor
Stars: ✭ 135 (-3.57%)
Mutual labels:  widget
Clrcli
CLRCLI is an event-driven library for building line-art user interfaces in C#/.Net command-line applications.
Stars: ✭ 124 (-11.43%)
Mutual labels:  widget
Widgetexamples
A demo project showcasing different types of Widgets created with SwiftUI and WidgetKit.
Stars: ✭ 125 (-10.71%)
Mutual labels:  widget
Inwidget
inWidget - free Instagram widget for your website. Allows you to show photos from an Instagram account, by hashtags and more.
Stars: ✭ 132 (-5.71%)
Mutual labels:  widget
Ngresizable
Simple, tree-shakable, AoT, Universal and Web Worker friendly resizable component for Angular (2 and beyond).
Stars: ✭ 118 (-15.71%)
Mutual labels:  widget
Qcodeeditor
Qt Code Editor widget.
Stars: ✭ 136 (-2.86%)
Mutual labels:  widget
Tabtoolbar
A small library for creating tabbed toolbars
Stars: ✭ 129 (-7.86%)
Mutual labels:  widget
Ci Buildstats
Little widget to display AppVeyor, TravisCI, CircleCI, GitHub Actions or Azure Pipelines build history charts and other SVG badges.
Stars: ✭ 134 (-4.29%)
Mutual labels:  widget
Widget
A set of widgets based on jQuery&&javascript. 一套基于jquery或javascript的插件库 :轮播、标签页、滚动条、下拉框、对话框、搜索提示、城市选择(城市三级联动)、日历等
Stars: ✭ 1,579 (+1027.86%)
Mutual labels:  widget
Yii2 Date Picker Widget
Bootstrap DatePicker Widget for Yii2
Stars: ✭ 128 (-8.57%)
Mutual labels:  widget
Flutter hooks
React hooks for Flutter. Hooks are a new kind of object that manages a Widget life-cycles. They are used to increase code sharing between widgets and as a complete replacement for StatefulWidget.
Stars: ✭ 1,973 (+1309.29%)
Mutual labels:  widget
Uppload
📁 JavaScript image uploader and editor, no backend required
Stars: ✭ 1,673 (+1095%)
Mutual labels:  widget
Overflow Pager Indicator
Simple paging indicator widget with pager dataset ovewflow effect à la Instagram behavior
Stars: ✭ 136 (-2.86%)
Mutual labels:  widget
Vue2 Bootstrap Table
A sortable and searchable table, as a Vue2 component, using bootstrap styling.
Stars: ✭ 120 (-14.29%)
Mutual labels:  widget
Flutterweekview
Displays a highly customizable week view (or day view) which is able to display events, to be scrolled, to be zoomed-in & out and a lot more !
Stars: ✭ 130 (-7.14%)
Mutual labels:  widget
Qt Color Widgets
Color wheel widget and dialog for Qt
Stars: ✭ 138 (-1.43%)
Mutual labels:  widget
Upvotejs
UpvoteJS generates a voting widget like the one used on Stack Exchange sites
Stars: ✭ 137 (-2.14%)
Mutual labels:  widget
Jeelizglassesvtowidget
JavaScript/WebGL glasses virtual try on widget. Real time webcam experience, robust to all lighting conditions, high end 3D PBR rendering, easy to integrate, fallback to server-side rendering
Stars: ✭ 134 (-4.29%)
Mutual labels:  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

  • Just include the view as you do with any android widget.

  • Implement it in your java code as anyother widget.

  • To get the number simply call getNumber() method on the button object.

  • To get the number from the button as soon as the button is clicked add a setOnClickListener to the view.

    ElegantNumberButton button = (ElegantNumberButton) findViewById(R.id.button);
    button.setOnClickListener(new ElegantNumberButton.OnClickListener() {
            @Override
            public void onClick(View view) {
                String num = button.getNumber();
            }
        });
    
  • Or use a valueChangeListener to listen for changes in value.

    elegantNumberButton.setOnValueChangeListener(new ElegantNumberButton.OnValueChangeListener() {
            @Override
            public void onValueChange(ElegantNumberButton view, int oldValue, int newValue) {
                Log.d(TAG, String.format("oldValue: %d   newValue: %d", oldValue, newValue));
            }
        });
    

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

  • Added ValueChangeListener to listen for changes in values

Version 1.0.1

  • Added Range for the widget
  • Changed attribute from initialText to initialNumber

Version 1.0

  • Initial Release

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.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].