Skip to content
A TextView used for inputing and adding money
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gradle/wrapper
moneytextview
sample
.gitignore
README.md
build.gradle
gradlew
gradlew.bat misc:add MoneyTextview Mar 15, 2016
settings.gradle change: change the module name to moneytextview Feb 9, 2017

README.md

MoneyTextView

A EditText used for inputing and adding money.

Installation

Add the dependency to your build.gradle.

compile 'com.github.andyken:moneytextview:1.2'

Usage

Add the moneytextview to your layout.

<com.github.andyken.moneytextview.MoneyTextView
    android:id="@+id/main_moneyTextView"
    android:layout_width="130dp"
    android:layout_height="65dp"
    android:layout_marginLeft="10dp"
    android:layout_gravity="right"
    android:gravity="end|center_vertical"
    moneytextview:integerFontSize="32sp"
    moneytextview:decimalPlaceFontSize="32sp"/>
  • you can set the part of integer size by using xml attribute integerFontSize or the decimal size by using decimalPlaceFontSize.
  • you can set the part of integer number by using xml attribute integerNum or the decimal number by using decimalNum.
  • you can set the currency flag hidden by setting xml attribute needFlag to false.
  • you can set the focus text color by using xml attribute focusTextColor.
  • you can set the default money by using xml attribute initMoney.
  • you can get the money by using getMoney or getMoneyStr.
You can’t perform that action at this time.