I am in need to give validation on my EditText such that it allows me to enter a valid
ip address format ( ?.?.?.? ) ie example 132.0.25.225
or
web url format ( http://www.?.? ) ie example http://www.example.com
logic is that if user type any numeric value first then validation(IP) will do action
else user must write “www” before any web String
Note: it must perform onKeyListener() of EditText, i mean while user giving input
In short – I am not going to check when user completes input and press OK button
Any idea appreciated,
Thanks.
ip
url