How to validate data being entered into an EditText control?

by Videoguy » Tue, 14 Apr 2009 02:05:17 GMT


Sponsored Links
 Hi
I have an EditText control to accept IP address fields. Its xml input
attribute allows everything else except IP addresses.
How to make the control accept dotted IP quad addresses only?

Thanks
Videoguy
--~--~---------~--~----~------------~-------~--~----~



How to validate data being entered into an EditText control?

by MrChaz » Tue, 14 Apr 2009 02:49:24 GMT


 Could you could create your own KeyListener and pass it into the
TextView via setKeyListener()?



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


How to validate data being entered into an EditText control?

by Videoguy » Tue, 14 Apr 2009 03:00:06 GMT


 That is what I thought initially. But Editable has all types of
InputFilters you can register to validate/constrain input being
entered.
I didn't find any filter so far that can validate IP quads.
I will write one probably.

Thanks
Videoguy
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Is it possible to share one 'Canvas' in multiple custom-views within a single Activity?

Hello.
I'm trying to develop an app which mimic the MicrosoftPaint
application. My current setup is that I have a single activity which
contains multiple custom-view. These views correlate to the different
tool that program can do. Example: 'pencilView' to simulate the
pencilStrokes, 'rectangleView' to simulate the rectangle drawing, etc.
Based on onOptionsItemSelected, I setContentView to the selected view,
and then requestFocus. But I'm not sure of how to show the different
strokes made to be on-top of each other. I tried to pass the canvas
object around and call save (at the end) and restore (in the
beginning) but that didn't work.

Any suggestions?

--~--~---------~--~----~------------~-------~--~----~

2. how to add class path to build.xml file generated by android tool

I have an old project and I just update it with android tool from
SDK1.5. It replaced my old build.xml with a new one. The new one does
not pick up my old classpath setting. How to add class path to
build.xml file generated by android tool?

Thanks,
Hong

--~--~---------~--~----~------------~-------~--~----~

3. catching points with the Gps

4. looking for push mobile mail libs/framewor

5. Transfert a call using DTMF

6. texture map ,opengl es ,gallery

7. Possible to change BroadcastReceiver priority from within Activity