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.ozanturcan:SmartNumericTextView:v0.0.1'
}
Smart Numeric TextView using for showing number with a symbol. integer and the decimal parts can be a different color and size
textSize: Set the text size to a given value for integer and decimal parts.
textPercentage: Set the default text size to a given value of percantage for decimal part.
textStyle: Set the text style as italic / bold / normal.
textColor: Sets the text color for all parts.
secondaryTextColor: Sets the text color for decimal part. if this not defined default color using for this.
suffixSymbol: set symbol or text as a suffix. exp: $ ₺ € ℓ or kg , mm, lt ....
text: Sets the text to be displayed.
<com.ozanturcan.smartnumerictextview.SmartNumericTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:textSize="30dp"
app:textPercentage="100"
app:textStyle="bold"
app:textColor="@color/colorPrimary"
app:secondaryTextColor="@color/colorPrimaryDark"
app:suffixSymbol="€"
app:text="750.00"/>