What is the difference between
setContentView(R.layout.main);
and
ArrayAdapter arrayAdapter = new ArrayAdapter(this,
R.layout.* is provided in our application that is built by us whereas android.R.* is something that comes with Android SDK that means they are predefined.
R.layout.*
android.R.*