View Single Post
  #3 (permalink)  
Old March 7th, 2010, 09:36 AM
russray russray is offline
Registered User
 
Join Date: Mar 2010
Location: Charlotte, NC
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by alex_harding View Post
Not sure why the book failed to mention the proper imports needed for the chapter 2 to-do list example to compile correctly. If you're entering the code manually (this chpt. 2 to-do list example code is not available for download), add the following import statements or simply apply the control+shift+o import shortcut in eclipse.

import java.util.ArrayList;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnKeyListener;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.ListView;

Programming Android doesn't have to be like a raging hemorrhoid...
If you are doing this by hand, you will also need:
import android.os.Bundle;

This is used in your public void onCreate(Bundle savedInstanceState) method. Like the author mentioned, Eclipse will do this for you.
Reply With Quote