Check out example codes for "android studio get id name from view". It will help you in understanding the concepts better.

Code Example 1

//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())

Learn ReactJs, React Native from akashmittal.com