diff --git a/README.md b/README.md index 33e7b4b..67fa989 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,75 @@ Or add EasyMoney-Widgets as a new dependency inside your pom.xml pom ``` +Usage +===== +XML +--- +```EasyMoneyEditText``` in xml layouts (output will be ```$ 123,456,234```) +```xml + +``` +```EasyMoneyTextView``` in xml layouts (output will be ```$ 123,456,234```) +```xml + +``` +Customization in XML +--- +All customizable attributes for EasyFlipView +```xml + + + + + + + + + + +``` +In Code (Java) +---- +```java +// Set the value for money widgets +moneyEditText.setText("23456.01"); // $ 23,456.01 +moneyTextView.setText("1234"); // $ 1,234 + +// Get the value from money widgets +String valForm = moneyView.getFormattedString(); // $ 23,456.01 +String valRaw = moneyView.getValueString(); // 23456.01 + +// Set the currency of the money widgets +moneyView.setCurrency("€"); // € 23,456.01 +moneyView.setCurrency(Locale.UK); // £ 23,456.01 +moneyView.setCurrency(Currency.getInstance(Locale.US)); // $ 23,456.01 +// Show/hide currency of the money widgets +moneyView.showCurrencySymbol(); // $ 23,456.01 +moneyView.hideCurrencySymbol(); // 23,456.01 +boolean curr = moneyView.isShowCurrency(); // true if currency is shown + +// Show/hide commas of the money widgets +moneyView.showCommas(); // $ 23,456.01 +moneyView.hideCommas(); // $ 23456.01 +``` Developed By