In Android there is this method to get the id
of a view:
int id = view.getId();
But this returns a dynamically generated integer value that has been assigned to the view at runtime.
I need to access the original string id. For example, for the following view, I want to get @+id/likesCount
:
<TextView
android:id="@+id/likesCount"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
How can I get that?