1

Lets say i have a few views and I want to get the id name of their IDs

view.getId() returns an int value but instead i want to get the name of the id

android:id="@+id/valueFrance"

So is there any method on java that can return the name/value of the id ( "valueFrance" ) ?

Thank you very much.

inrob
  • 4,721
  • 10
  • 34
  • 50
  • see this post http://stackoverflow.com/questions/10137692/how-to-get-resource-name-from-resource-id ,where resid is the id you got. – Giru Bhai May 26 '14 at 12:04

1 Answers1

1

try this

getResources().getResourceEntryName(int resid);
Milan Maharjan
  • 3,868
  • 1
  • 20
  • 28