Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2
This is the forum to discuss the Wrox book Professional Android Application Development by Reto Meier; ISBN: 9780470344712
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 10th, 2009, 10:23 AM
Registered User
 
Join Date: Mar 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default chapter 2 todolist

I am just at the beginning
code typed from the book
in chapter 2 I have two error messages

1. onKeyListener cannot be resolved line 26
2. R.id cannot be resolved line 18 and 19

any suggestion how to fix this ?
Reply With Quote
  #2 (permalink)  
Old April 10th, 2009, 02:11 PM
Authorized User
 
Join Date: Mar 2009
Posts: 21
Thanks: 0
Thanked 3 Times in 3 Posts
Default

1. You must add

Code:
import android.view.View.*;
Book source code does not include all the import statements, so either get used to resolving them yourself or looking at the downloaded code.

2. You must not have successfully applied the changes to main.xml mentioned in the book. Go back to the 'Understanding Hello World' section and make sure you generate the EditText and ListView items.
Reply With Quote
  #3 (permalink)  
Old July 8th, 2010, 03:31 PM
Registered User
 
Join Date: Jul 2010
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default request to the above...

I am an absolute Nube...with no professional experience....but pls don neglect me....

I just wanted to ask how you figured out the particular import statement...

Where can i get the documentation for different import packages...??

and how long its been since u started programming android....?

please
Reply With Quote
  #4 (permalink)  
Old July 15th, 2010, 07:00 PM
Registered User
 
Join Date: Jul 2010
Posts: 2
Thanks: 0
Thanked 2 Times in 1 Post
Smile

Quote:
Originally Posted by rajathslr View Post
I am an absolute Nube...with no professional experience....but pls don neglect me....

I just wanted to ask how you figured out the particular import statement...

Where can i get the documentation for different import packages...??

and how long its been since u started programming android....?

please
I'm going to assume that you're using the Eclipse IDE.

After you type this line:

Code:
myEditText.setOnKeyListener(new OnKeyListener()
you should see little squiggly red lines below it.

Put your mouse pointer over the OnKeyListener() term and you should see a tool tip pop up.

Choose the option "import onKeyListener(android.view.View)" and that should take care of the issue by adding the "import android.view.View.OnKeyListener;" to the header.

If you get another error regarding the onKey function, refresh (F5) your project.
Reply With Quote
The Following 2 Users Say Thank You to joel.witherspoon For This Useful Post:
rajathslr (July 16th, 2010)
  #5 (permalink)  
Old July 16th, 2010, 03:48 AM
Registered User
 
Join Date: Jul 2010
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default reply to above...

Thank you very much ...Joel...

I never thought Eclipse would be so intelligent....

I did as wat you said...and finally got the todolist output on the screen..

I may come back with more problems Joel.....

thank you for now...
Reply With Quote
  #6 (permalink)  
Old July 16th, 2010, 03:59 AM
Registered User
 
Join Date: Jul 2010
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by joel.witherspoon View Post
I'm going to assume that you're using the Eclipse IDE.

After you type this line:

Code:
myEditText.setOnKeyListener(new OnKeyListener()
you should see little squiggly red lines below it.

Put your mouse pointer over the OnKeyListener() term and you should see a tool tip pop up.

Choose the option "import onKeyListener(android.view.View)" and that should take care of the issue by adding the "import android.view.View.OnKeyListener;" to the header.

If you get another error regarding the onKey function, refresh (F5) your project.
thanks Joel....i got the ouput....
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 4 - customizing ToDoList - ruled lines not working correctly gregking BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 1 April 3rd, 2009 09:44 AM
Chap 2 ToDoList - Stopped Unexpectedly sierawsk BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 1 March 4th, 2009 01:14 PM
Chapter 2 - End of chapter exercises whizzkid1892 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 July 30th, 2008 12:02 PM
Generics chapter 12 difficult chapter i found ...? Larryz C# 2005 1 July 4th, 2007 09:40 PM



All times are GMT -4. The time now is 09:14 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.