Skip to content
Advertisement

ANDROID: Converting inputted numbers to words

Our assignment states that we write a program that will input a number up to 6 digits and will convert the numbers into words.. ex: 123 = one hundred twenty three. I AM CLUELESS! Then I found this site http://www.rgagnon.com/javadetails/java-0426.html but I don’t really understand how to convert it into android.

please help me..please.

here is my Main_Activity.xml:

JavaScript

and here is my Words.java

JavaScript

The only problem now is that nothing happens lol

Advertisement

Answer

You can make separate class for EnglishNumberToWords as in the example link.

and in your button click you have to just call

JavaScript

enter image description here

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement