CurrencyField

General

Category
Free
Tag
Text Formatting
License
Apache License, Version 2.0
Registered
Sep 3, 2019
Favorites
1
Link
https://github.com/sulo61/CurrencyField
See also
Kirai
Linker
Input Mask
AnyNum
FormatEditText

Additional

Language
Kotlin
Version
N/A
Created
Aug 13, 2019
Updated
Nov 14, 2019
Owner
MikeSu (sulo61)
Contributor
MikeSu (sulo61)
1
Activity
Badge
Generate
Download
Source code

Advertising

CurrencyField

AppCompatEditText with auto formatting currencies. Current support:

  • USD
  • EUR

0. Preview

1. Dependency

implementation 'io.sulek:currencyfield:1.0.7'
repositories {
    maven {
        url  "https://jcenter.bintray.com"
    }
}

2. Usage

XML

<io.sulek.currencyfield.CurrencyField
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:attrCurrencyCode="USD" />

attrCurrencyCode

  • USD
  • EUR

3. Usage - Code

getValue()

setBigDecimalValue()

setDoubleValue()

setListener()

field.getValue()
field.setDoubleValue(2.0)
field.setListener(object: CurrencyField.Listener {
    override fun onChange(text: String, value: Double) {

    }
})

4. Licence

Copyright 2019 Michał Sułek

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.