I just started learning the SDK and I don’t really know Java , and I have such a problem. I put a couple of pictures on the form "@+id/i00" "@+id/i01" them an id in Properties such as "@+id/i00" "@+id/i01" and so on, in general, now I want to use this id as an index to process a 2-dimensional array, but I can't get it out The OnClick handler comes ( View v ) using v.getId() but it returns a set of numbers to me, some sort of internal id campaign. And how can I get from the code exactly the Id that I specified and translate it into a string?

    2 answers 2

     context.getResources().getResourceEntryName(v.getId()); 

    well, or if it is straightforward in Activity, then simply:

     getResources().getResourceEntryName(v.getId()); 

      if(v.getId()==R.id.i00 {}