2
I am developing app and noticed that I can put the same id in two different xmls. For example:
Imagine a Textview.
In the 1st Layout I define your id:
<TextView
android:id="@+id/textViewExemplo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text=" XML 1"
/>
the 2nd Layout I define your id:
<TextView
android:id="@+id/textViewExemplo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text=" XML 2"
/>
That is, I set the same ID to different textViews each contained in a different layout.xml file.
I don’t have trouble with compilation. But I want to know if there is any problem doing this way and if this can harm the functioning of the application in any way?