No. Both variants.
R.id.listView1: -
Represents the view identifier that is declared in the layout (your XML file) as android:id="@+id/listView1"
and
R.layout.listView1: -
Represents a layout file (xml file), which in res -> layout dir
You can do
ListView list= (ListView) findViewById(R.id.listView1);
because ListView has a View family.
But you cannot do
ListView list= (ListView) findViewById(R.layout.listView1);
source share