Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

android studio get id name from view

//Don't get the ID name/string from the view ID.

//Instead use the 
android:tag = "String"
//in your xml 

//Then in Java use 
View.getTag()
  
//To still get the ID name/string from view ID.
getResources().getResourceEntryName(View.getId())
 
PREVIOUS NEXT
Tagged: #android #studio #id #view
ADD COMMENT
Topic
Name
5+4 =