{"id":24912358,"url":"https://github.com/abhinayme/currency-edittext","last_synced_at":"2025-04-07T19:14:32.545Z","repository":{"id":123489071,"uuid":"164608321","full_name":"AbhinayMe/currency-edittext","owner":"AbhinayMe","description":" A Custom EditText implementation that allows formatting of currency-based numeric inputs.","archived":false,"fork":false,"pushed_at":"2024-03-26T13:27:07.000Z","size":6057,"stargazers_count":94,"open_issues_count":5,"forks_count":24,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T19:14:26.105Z","etag":null,"topics":["android","android-app","android-application","android-library","currency","edittext","java"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AbhinayMe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-08T09:04:07.000Z","updated_at":"2024-10-03T01:32:29.000Z","dependencies_parsed_at":"2025-03-24T11:13:29.909Z","dependency_job_id":null,"html_url":"https://github.com/AbhinayMe/currency-edittext","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbhinayMe%2Fcurrency-edittext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbhinayMe%2Fcurrency-edittext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbhinayMe%2Fcurrency-edittext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbhinayMe%2Fcurrency-edittext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AbhinayMe","download_url":"https://codeload.github.com/AbhinayMe/currency-edittext/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247713258,"owners_count":20983683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","android-app","android-application","android-library","currency","edittext","java"],"created_at":"2025-02-02T05:19:24.027Z","updated_at":"2025-04-07T19:14:32.518Z","avatar_url":"https://github.com/AbhinayMe.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Download](https://api.bintray.com/packages/abhinayme/currency-edittext/me.abhinay.input/images/download.svg) ](https://bintray.com/abhinayme/currency-edittext/me.abhinay.input/_latestVersion)\n[![Build Status](https://travis-ci.org/AbhinayMe/currency-edittext.svg?branch=master)](https://travis-ci.org/AbhinayMe/currency-edittext)\n[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg?)](https://www.apache.org/licenses/LICENSE-2.0.html)\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Currency--Edittext-yellow.svg?style=flat)](https://android-arsenal.com/details/1/7448)\n\n\n\n# Currency-Edittext\n A Custom EditText implementation that allows formatting of currency-based numeric inputs.\n\n![Alt text](/samplegif.gif \"Currency-Edittext Input Demo\")\n\n\n## 💻 Installation\nAdd this in your app's build.gradle file:\n```groovy\ndependencies {\n  implementation 'me.abhinay.input:currency-edittext:1.1'\n}\n```\n\nOr add ClapFab as a new dependency inside your pom.xml\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eme.abhinay.input\u003c/groupId\u003e\n  \u003cartifactId\u003ecurrency-edittext\u003c/artifactId\u003e\n  \u003cversion\u003e1.1\u003c/version\u003e\n  \u003ctype\u003epom\u003c/type\u003e\n\u003c/dependency\u003e\n```\n\n## Implementation Sample\n\nXML\n\n```\n\u003cme.abhinay.input.CurrencyEditText\n        android:id=\"@+id/etInput\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:hint=\"Type value\"\n        android:inputType=\"number\"\n        android:textSize=\"24sp\" /\u003e\n```\n\nCode\n\n```\nCurrencyEditText etInput;\n\n@Override\nprotected void onCreate(Bundle savedInstanceState) {\n    super.onCreate(savedInstanceState);\n    setContentView(R.layout.activity_main);\n\n    etInput = (CurrencyEditText) findViewById(R.id.etInput);\n    etInput.setCurrency(Currency.USA);\n    etInput.setDelimiter(false);\n    etInput.setSpacing(false);\n    etInput.setDecimals(true);\n    //Make sure that Decimals is set as false if a custom Separator is used\n    etInput.setSeparator(\".\");\n}\n```\n\n## Customizing\n\nThe following attributes can be manipulated:\n\n- Currency by specifying the country\n- Spacing between currency and value\n- Delimeter\n- Decimals\n- Thousands Separator Symbol\n\n### Currency\n\nSpecify the currency by setting the country of your choice.\n\n```\netInput.Currency = Currency.MALAYSIA;\n```\n\nCurrency can also be disabled by:\n\n```\netInput.Currency = Currency.NONE;\n```\n\n#### Custom Currency/Symbol\n\nIf a custom symbol that is not included in the library is required, any string value can be used since the the `Currency` attribute expects a `String` value.\n\n```\netInput.Currency = \"TEST\";\n```\n\nWhich produces:\n\u003eTEST 450.00\n\n**Note:** Currency is set to your app's Local currency by default.\n\n### Spacing\n\nThe spacing between the currency and the value can be specified by:\n\n```\netInput.Spacing = true;\n```\n\n**Note:** Spacing is `false` by default.\n\n### Delimeter\n\nThe delimeter attribute allows the addition of a `.` symbol after displaying the currency.\n\n\u003e Rs.100\n\n\u003e Rp.100\n\n**Note:** Delimeter is `false` by default.\n\n### Decimals\n\nDecimals can be turned off for the EditText using:\n\n```\netInput.Decimals = false;\n```\n\nThis outputs the following:\n\n\u003e $100,000\n\n### Separator\n\nThe Thousands Separator can be customized as required with any custom symbol to suit the currency formats of different countries. Example: Indonesia -\u003e 12.000.000 (Using . instead of , as the separator)\n\n**NOTE: Decimals must be set as `false` in order avoid conflicts in getting a clean Double or Integer output**\n\n### Getting Clean Output\n\nA `Double` value without Commas, Currency and Decimal places can be retrieved using:\n\n`double cleanOutput = etInput.getCleanDoubleValue();`\n\nAn `Integer` value without Commas, Currency and Decimal places can be retrieved using:\n\n`int cleanOutput = etInput.getCleanIntValue();`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhinayme%2Fcurrency-edittext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabhinayme%2Fcurrency-edittext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhinayme%2Fcurrency-edittext/lists"}