-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master'
- Loading branch information
Showing
3 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|
||
 | ||
|
||
|
||
# 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 | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|