GithubHelp home page GithubHelp logo

ps-jimmy / incrementproductview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from steelkiwi/incrementproductview

0.0 1.0 0.0 256 KB

Interesting concept of products incrementation

Home Page: http://steelkiwi.com/

Java 100.00%

incrementproductview's Introduction

IncrementProductView

Made in SteelKiwi Download

Description

Interesting concept of products incrementation inspired this Design

View

Animation

Download

For project API 21+. For arc animation used this library components ArcAnimator

Gradle

compile 'com.steelkiwi:increment-product-view:1.2.0'

Usage

Add IncrementProductView to your xml layout

<com.steelkiwi.library.IncrementProductView
    android:id="@+id/productView"
    android:layout_width="200dp"
    android:layout_height="200dp"
    android:background="@android:color/transparent"
    android:layout_centerInParent="true"
    app:ipv_middle_icon="@drawable/box"
    app:ipv_highlight_background_color="@color/highlight_background_color"
    app:ipv_default_background_color="@color/default_background_color"
    app:ipv_text_color="@android:color/white"
    app:ipv_text_size="@dimen/text_size"/>

You can customize view, through this attributes

* app:ipv_middle_icon - main view icon
* app:ipv_highlight_background_color - background color when view is expand
* app:ipv_default_background_color - background color when view is idle
* app:ipv_text_color - counter text color
* app:ipv_text_size - counter text size
* app:ipv_add_icon - icon for expand board view state
* app:ipv_decrement_icon - icon for decrease view
* app:ipv_increment_icon - icon for increase view
* app:ipv_confirm_icon - icon for confirmation view state
* app:ipv_counter_background_color - background color for board view

Inside your client code need to implement listener OnStateListener to handle view state. IncrementProductView state:

* onCountChange(int count) - call after each incrementation
* onConfirm(int count) - call after click on confirmation view
* onClose() - call after closing board view

License

Copyright © 2017 SteelKiwi, http://steelkiwi.com

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.

incrementproductview's People

Contributors

soulyaroslav avatar

Watchers

 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.