Android Question EditText Input converts 12345678 to 1.23457e+07

JohnnyHamburg

Member
Licensed User
Longtime User
Hello everybody,
I have a problem that I can not find the solution to in the forum.

I use EditText for user input of a name and a password. Users can use letters and numbers. So the inputtype is 'text'.
But if a user writes "12345678" for example then the string will be transformed to "1.23457e+07".
But I need the original input string. How can I do that.

Thank You.
 

klaus

Expert
Licensed User
Longtime User
You need to give more information and show your code.
Where and when do get the text from EditText to see where it is modified from "12345678" to "1.23457e+07"?
It seems that the text is converted into a Float, but why!?
 
Upvote 0

JohnnyHamburg

Member
Licensed User
Longtime User
Ok, sorry, it is complicated to extract a small part from a lot of code. I will try to build a small example.
But I figuered out that it seems to happen when I put the String into a SQL database and read it from there. Maybe this can help someone while I build an example.
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
But I figuered out that it seems to happen when I put the String into a SQL database ...
That's the problem, you may have a look HERE.
How do you get the value back from the SQL database, as a number or as a string?
 
Upvote 0

JohnnyHamburg

Member
Licensed User
Longtime User
Thank You, Klaus. That is my problem. It seems to be complicated. But to solve it, I don`t allow to use only numbers as password. For my case it is the easiest solution.
 
Upvote 0
Top