Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
tompadz committed Jun 24, 2022
2 parents d00fa7f + 1c0a9c6 commit c07ad79
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
53 changes: 53 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Badge Counter View

A simple library that adds an animated counter.

![preview](https://github.com/tompadz/BadgeCounterView/blob/master/info/ezgif-3-97fecc12f4.gif?raw=true)


# Installation

Add it in your root build.gradle at the end of repositories:


allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}

Add the dependency


dependencies {
implementation 'com.github.tompadz:BadgeCounterView:1.0.0'
}

# Usage

using xml

<com.dapadz.counterview.CounterBadgeView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:counterTextSize="12s111p"
app:counterShowIfZero="true"
app:counterMaxValue="10"
app:counterViewDefaultValue="0"
app:counterViewTextColor="@color/white"
app:counterViewBackgroundColor="@color/black"
app:counterPaddingHorizontal="10dp"
app:counterPaddingVertical="5dp">

| `CODE` | Description |
|--|--|
| `setPadding(vertical : Float?, horizontal : Float?)` |Sets indents for the counter text |
| `setTextSize(size:Float)` | Sets the text size of the counter|
| `setCounterBackgroundColor(color:Int)` | Sets the background of the counter |
| `setCounterBackgroundColor(color:String)` | Sets the background of the counter |
| `setMaxCounterValue(value:Int)` | Sets the maximum value for the counter |
| `setDefaultCounterValue(value:Int)` | Sets the default value for the counter |
| `setShowIfValueZero(state:Boolean)` | Whether to display the counter if its value is less than or equal to zero |
| `setCounterTextColor(color:Int)` | Sets the text color of the counter |
| `setCounterTextColor(color:String)` | Sets the text color of the counter |
Binary file added info/ezgif-3-97fecc12f4.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions info/info
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

0 comments on commit c07ad79

Please sign in to comment.