File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Android and the fly likes Validating Comma Separated Values Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "Validating Comma Separated Values" Watch "Validating Comma Separated Values" New topic

Validating Comma Separated Values

Muhammad Imad Qureshi
Ranch Hand

Joined: Sep 13, 2005
Posts: 238
Is it possible to validate each of my comma separated values in the layout.xml file? I know I can do it in Activity class but I was hoping if I could somehow enforce it in the xml file. I have an EditText box and I want input from user which is an array of double separated by commas in the text box. Here is the current code.

I don't want users to enter "1.1.1" because that's not a number. However "23.5,-5,100" is perfectly acceptable.

Kudret Serin
Ranch Hand

Joined: Aug 02, 2005
Posts: 167

did you try this?
I agree. Here's the link:
subject: Validating Comma Separated Values
It's not a secret anymore!