Marc (34) [Avatar] Offline
#1
Hi,
In Chapter 10 there are 2 .axml files, each defining
android:id="@+id/toolbar_layout">
But, there is only 1 Resource.Designer.cs file defining its value
public const int toolbar_layout = 2131296397;

In the 2 xxxView modules
var toolbar = FindViewById<Toolbar>(Resource.Id.toolbar);
how is this resolved to the toobar for each View?

Are there conditions that would require unique names within each View?

Thx,
M.
Jim Bennett (88) [Avatar] Offline
#2
The resource ids scoped per activity - so multiple activities can have layouts with controls that share the same id, such as a toolbar.