Simple Number Separator

Additional

Language
Java
Version
1.0.3 (Apr 15, 2019)
Created
Oct 9, 2017
Updated
Apr 15, 2019
Owner
Rahmad Setiawan Mukminullah (NaturalizerINA)
Contributor
Rahmad Setiawan Mukminullah (NaturalizerINA)
1
Activity
Badge
Generate
Download
Source code

Commercial

Android Number Separator

The Android Number Separator is the lightweight library for separate number with coma in android or dot or dynamically by your locale device.

Getting Started

Make sure your internet connection was on

Prerequisites

First, add the JitPack repository to your root-level build.gradle file:

allprojects {
 repositories {
 ...
  maven{url 'https://jitpack.io'}
 }
}

Then, in your module Gradle file (usually the app/build.gradle), add the dependencies for the Simple Number Separator

implementation 'com.github.NaturalizerINA:AndroidNumberSeparator:1.0.2'

How to use

You can define your separator using coma or dot using custom locale

Example for coma:

String get_number_value="1000";
Separator.getInstance().doSeparate(get_number_value, Locale.US);

Example for dot:

String get_number_value="1000";
Separator.getInstance().doSeparate(get_number_value, Locale.GERMANY);

or you can dynamically set the separator symbol by your locale device

Example for dynamicaly symbol:

Separator.getInstance().doSeparate(get_number_value, Locale.getDefault());

Example for Decimal Number value:

String get_decimal_number="1000.65"; //Always using dot for insert the decimal number
Separator.getInstance().doSeparate(get_decimal_number, Locale.getDefault());

Image Demo

My Reference

Thanks to <3 JAVA <3 library

Authors

Rahmad Setiawan Mukminullah

License

This project is licensed under the MIT License