I have a list view declared in my xml:
In xml layout use,
In Java Code:
ListView listview=(ListView)findViewById(R.id.list);// it takes id of listview from xml
if you need to use android id for listview then replace your code as
It may help you..