A book (“Android Recipes” by Smith and Friesen) shows this:
public class ContactsListListActivity extends ListActivity implements AdapterView.OnItemClickListener {
…yet not only was “AdapterView.OnItemClickListener” not available in Eclipse via New | Class | Interfaces (“Add” button) but when I added added “AdapterView.OnItemClickListener” it wasn’t recognized (“AdapterView cannot be resolved to a type”). Is this deprecated, or…???
A common error when working with
Object.OnXXXListener()is that eclipse doesn’t import it automatically.You can easily fixed it manually by adding:
As another note: