tags:

views:

28

answers:

0

HI, I have a imageView iv1 in my app, and i want to set a phone number as id to the imagview,so that whenever i click i need to do some operation using the phone no. i have done like this : String res = util.removeCharacters(value, "0123456789"); Long var = Long.parseLong(res); System.out.println("Sketch"+var.intValue()); iv2.setId(var.intValue()); Here removerCharacters returns String, that i was converted to long and then i was converted to integer. But i got -1 as the id when i click. Please help whats wrong with this ?