Wrox Programmer Forums
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #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 ?
  #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.
  #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
  #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.
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...
  #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....


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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.