I have created one ListView by defining ListView lv=new ListView(this) in one of my activity.I have a Array of Strings which i want to add to this listview.How can i define a list adapter for this listview? Anyone having any idea? Can we create ListView like this as i mentioned above.Because it will show error "Your activity must have a listview with id android.R.id.list.