I\'m attempting to work with through some tutorial code and add in an OnItemClick Listener, but keep throwing an exception when it hits the listener and crashing my app. This is
ListActivity doesn't require you to assign a layout via setContentView()
that is if you want to show only a list but if you add a another view, your ListView should contain the android:id
attribute set to @android:id/list
like this xml below
try changing your code
ListView lv = (ListView)findViewById(R.id.list);
to this
ListView lv = getListView();
lv.setOnItemClickListener(newsSelectListener);