Collection of custom views I use in my Android apps.
Work in progress 🏗
- If you would like to change
maxLength
, you can do it from layout attribute, or programmatically set it (DefaultmaxLength
is 13):
From layout:
<melih.android.customviews.PriceEditText
android:id="@+id/price"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLength="13"
android:layout_margin="16dp"
app:layout_constraintBottom_toBottomOf="parent" />
Programmatically:
price.maxLength = 13
- You can also set and get price value from PriceEditText:
price.priceValue = BigDecimal.valueOf(12000.50)
- DecimalFormat formats number by default locale unless you change it. You can change locale by setting it programmatically:
price.setLocale(Locale("tr", "TR"))
Changing locale will change group and fraction separator of DecimalFormat.
Library uses SemVer for versioning. For the versions available, see the tags on this repository.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.