How does android use R.id.id_name to find views after inflating the XML?
R.id.id_name
1.Suppose I have two XML\'s with one button each with same id.
2.I have
Android takes the easy road: IDs are not application-wide unique, but layout-wide unique.
The value of R.id.foo is the same across two different layouts holding a control with foo id. Since they are not competing for uniqueness, it doesn't matter.
R.id.foo
foo