CottaCush / CurrencyEditText

💰 A library to dynamically format your EditTexts to take currency inputs
Apache License 2.0
131 stars 28 forks source link

Rounding error on display during entry #17

Open michael-reed-hampton opened 3 years ago

michael-reed-hampton commented 3 years ago

Very large amount resulted in rounding error in display. Entered 1 followed by zeros...eventually saw $ 99,999,999,999,999,990,000,000 when value should have been $ 100,000,000,000,000,000,000,000

Using Android Studio 4.2 Beta 6 Build #AI-202.7660.26.42.7188722, built on March 5, 2021 Runtime version: 11.0.8+10-b944.6916264 x86_64 VM: OpenJDK 64-Bit Server VM by N/A macOS 10.15.7

And AVD: Name: Nexus_10_API_27 CPU/ABI: Google APIs Intel Atom (x86) Path: /Users/michaelhampton/.android/avd/Nexus_10_API_27.avd Target: google_apis [Google APIs] (API level 27) Skin: nexus_10 SD Card: 100M hw.dPad: no hw.lcd.height: 1600 runtime.network.speed: full hw.accelerometer: yes hw.device.name: Nexus 10 vm.heapSize: 192 skin.dynamic: yes hw.device.manufacturer: Google hw.lcd.width: 2560 hw.gps: yes hw.initialOrientation: Portrait image.androidVersion.api: 27 hw.audioInput: yes image.sysdir.1: system-images/android-27/google_apis/x86/ tag.id: google_apis showDeviceFrame: yes hw.camera.back: virtualscene hw.mainKeys: no AvdId: Nexus_10_API_27 hw.camera.front: emulated hw.lcd.density: 320 avd.ini.displayname: Nexus 10 API 27 hw.arc: false hw.gpu.mode: auto hw.device.hash2: MD5:813203ac93d1d63cd91f729c376b1f3e hw.ramSize: 1536 hw.trackBall: no PlayStore.enabled: false fastboot.forceColdBoot: no hw.battery: yes hw.cpu.ncore: 4 hw.sdCard: yes tag.display: Google APIs runtime.network.latency: none hw.keyboard: yes hw.sensors.proximity: no disk.dataPartition.size: 800M hw.sensors.orientation: yes avd.ini.encoding: UTF-8 hw.gpu.enabled: yes

michael-reed-hampton commented 3 years ago

Detail - entered 1 followed by 23 0's to see the issue.

rasheedsulayman commented 3 years ago

@efguydan Could you please take a look? The number might be larger than what the formatters are set up to handle. You might be interested in this line.

I can also take a proper look as soon as I am chanced.

efguydan commented 3 years ago

Will take a look at this in the morning.