I have learned from this question that resources are globally shared in an Android Studio project.
I have a project with 3 activities (and more are coming), and I already find pretty messy to have access to every resources in any given activity.
Is there a way to allow an activity to access ids only from the associated layout ?
eg : I have MainActivity.java, activity_main.xml, Main2Activity.java, activity_main2.xml .
I would like to restrict the resources (mainly ids) accessible by MainActivity.java to activity_main.xml (so no access to resources from activity_main2.xml)