I understand that it has to do with the App layout, but when do I have to use it? I tried to look for a link that explained this method, but I couldn\'t find it. Thank you i
As per the documentation :
Set the activity content from a layout resource. The resource will be inflated, adding all top-level views to the activity.
Your Launcher activity in the manifest first gets called and it set the layout view as specified in respective java files setContentView(R.layout.main);. Now this activity uses setContentView(R.layout.main) to set xml layout to that activity which will actually render as the UI of your activity.