I have noticed in my main.xml layout, I’m creating a Tab Layout, that the declaration of “android:id” is different from what I’ve used for button, textview, etc.
For example:
<TabWidget android:id="@android:id/tabs" />
and example on Buttons:
<Button
android:id="@+id/button_next" />
What is the difference of the two declarations?
Certain id’s are used by the android framework. Like tabwidget,list etc. When the activity is launched it finds its required elements by searching the layout for these id’s.
But when you are setting and id to a view for your own apps purpose, you only use id/yourid.
This is only going to be used by your application code.