All Projects → sh3lan93 → Counterview

sh3lan93 / Counterview

Android View that have a value that can be incremented and decremented by one

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Counterview

Mylittlecanvas
🎨Need to create a custom view ? You don't know how to use Canvas, use MyLittleCanvas instead !
Stars: ✭ 870 (+1791.3%)
Mutual labels:  view
Instories
iOS app for viewing Instagram stories anonymously.
Stars: ✭ 31 (-32.61%)
Mutual labels:  view
Codegen
A model-view based code generator written in Java
Stars: ✭ 36 (-21.74%)
Mutual labels:  view
Androidlibs
🔥正在成为史上最全分类 Android 开源大全~~~~(长期更新 Star 一下吧)
Stars: ✭ 7,148 (+15439.13%)
Mutual labels:  view
Timerview
a timer which ectends an View
Stars: ✭ 28 (-39.13%)
Mutual labels:  view
Markdownview
Android library to display markdown text.
Stars: ✭ 970 (+2008.7%)
Mutual labels:  view
Trianglelabelview
Show triangle view.
Stars: ✭ 870 (+1791.3%)
Mutual labels:  view
Jprogressview
一个灵活的进度条,支持图形:圆形、圆角矩形、矩形等等,陆续会添加更多的图形,如果对你有帮助,请在右上角 star 一下,感谢
Stars: ✭ 46 (+0%)
Mutual labels:  view
Fillingbutton
🔥Replace typical onLongClickListener with this library!
Stars: ✭ 31 (-32.61%)
Mutual labels:  view
Hhcustomcorner
Awesome library to customize corners of UIView and UIButton. Now you can customize each corner differently
Stars: ✭ 36 (-21.74%)
Mutual labels:  view
Candyview
Implement any RecyclerView in just 1 Line. CandyView handles everything for you.
Stars: ✭ 15 (-67.39%)
Mutual labels:  view
Viewcomposer
Compose views using enums swiftly: `let label: UILabel = [.text("Hello"), .textColor(.red)]`
Stars: ✭ 27 (-41.3%)
Mutual labels:  view
Readablebottombar
Yet another material bottom bar library for Android
Stars: ✭ 977 (+2023.91%)
Mutual labels:  view
Iconswitch
🍭 Custom Android Switch widget
Stars: ✭ 874 (+1800%)
Mutual labels:  view
Tangramkit
TangramKit is a powerful iOS UI framework implemented by Swift. It integrates the functions with Android layout,iOS AutoLayout,SizeClass, HTML CSS float and flexbox and bootstrap. So you can use LinearLayout,RelativeLayout,FrameLayout,TableLayout,FlowLayout,FloatLayout,LayoutSizeClass to build your App 自动布局 UIView UITableView UICollectionView
Stars: ✭ 984 (+2039.13%)
Mutual labels:  view
Suitlines
[DEPRECATED]一个小巧且高效的线性图表组件。
Stars: ✭ 870 (+1791.3%)
Mutual labels:  view
Laravel Guided Image
Simplified and ready image manipulation for Laravel through intervention image.
Stars: ✭ 32 (-30.43%)
Mutual labels:  view
Speedview
Dynamic Speedometer and Gauge for Android. amazing, powerful, and multi shape ⚡️
Stars: ✭ 1,035 (+2150%)
Mutual labels:  view
Viewtooltip
A fluent tooltip for Android
Stars: ✭ 1,029 (+2136.96%)
Mutual labels:  view
Egg View
Stars: ✭ 35 (-23.91%)
Mutual labels:  view

CounterView Download API Android Arsenal

Android View that have a value that can be incremented and decremented by one.

Screenshot Video Demo

Download Debug APK

https://goo.gl/TAA7Pu

Usage

Adding Dependency

Add this to build.gradle Project level

allprojects {
  repositories {
    maven{
      url 'https://dl.bintray.com/sh3lan93/Android'
    }
  }
}

Add this to build.gradle Module:app

compile 'com.mohamed.shalan:inc-dec-view:1.0'

for maven usage

<dependency>
  <groupId>com.mohamed.shalan</groupId>
  <artifactId>inc-dec-view</artifactId>
  <version>1.0</version>
  <type>pom</type>
</dependency>

Adding The View

  • XML
<com.shalan.mohamed.itemcounterview.IncDecView
        android:id="@+id/itemCounter"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:border_color="@android:color/holo_red_dark"
        app:border_width="5dp"
        app:dec_icon="@drawable/ic_remove"
        app:inc_icon="@drawable/ic_add"
        app:counterValueColor="@android:color/holo_orange_dark"
        app:inc_dec_button_color="@drawable/btn_background"
        app:startCounterValue="5"/>
  • This is the screenshot of previous code
  • Java
IncDecView incDecView = findViewById(R.id.itemCounter);
incDecView.setIncButtonIcon(R.drawable.ic_add);
incDecView.setDecButtonIcon(R.drawable.ic_remove);
incDecView.setBorderColor(android.R.color.darker_gray);
incDecView.setBorderWidth(R.dimen.inc_dec_counter_view_stroke_width);
incDecView.setStartCounterValue(R.string._5);
incDecView.setCounterListener(new CounterListener() {
   @Override
   public void onIncClick(String value) {
      Toast.makeText(MainActivity.this, value, Toast.LENGTH_SHORT).show();
   }
   
   @Override
   public void onDecClick(String value) {
      Toast.makeText(MainActivity.this, value, Toast.LENGTH_SHORT).show();
   }});

Java Methods

Method Description
setStartCounterValue(String startValue) for setting the start value of counter
setStartCounterValue(@StringRes int startValue) for setting the start value of counter
setCounterListener(CounterListener counterListener) for setting listener for vounter value when increment or decrement
setIncButtonIcon(@DrawableRes int incButtonIcon) for setting the icon of increment button
setDecButtonIcon(@DrawableRes int decButtonIcon) for setting the icon of decrement button
setBorderWidth(@DimenRes int strokeWidth) for setting the border width of the view
setBorderWidth(float value) for setting the border width of the view
setBorderColor(@ColorRes int strokeColor) for setting view border color
setBorderColor_(int color) for setting view border color
String getCounterValue() for getting counter value

License

Copyright 2017 Mohamed Fotouh Shalan

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].