In the application I am writing, I have a main class which extends the ListActivity – it contains a list of elements. I want these elements to link to a different page (an xml one, or perhaps a View object). However, I realised one cannot use the method setContentView(int) on a ListActivity object.
What’s to be done?
Thanks!
Looks like you are trying to launch a new activity.
You have to override the
onListItemClickmethod ofListActivity.Here is the code.
NOTE: You have to improve on this skeleton depending upon your needs.