Wrox Programmer Forums
|
BOOK: Beginning Android Application Development
This is the forum to discuss the Wrox book Beginning Android Application Development by Wei-Meng Lee; ISBN: 978-1-1180-1711-1
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Android Application Development 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
 
Old November 30th, 2011, 11:29 PM
Registered User
 
Join Date: Nov 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 2 Dialog Program

I'm getting an error that I'm not sure how to fix.

Code:
.setMultiChoiceItems(items, itemsChecked, new DialogInterface.OnMultiChoiceClickListener() {					
     @Override
     public void onClick(DialogInterface dialog, int which, boolean isChecked) {
          Toast.makeText(getBaseContext(), items[which] + (isChecked ? " checked!": " unchecked!"), Toast.LENGTH_SHORT).show();
     }
})
Specifically for the onClick method there, I get the following error:
"The method of onClick() of type new DialogInterface.OnMultiChoiceClickListener() {} must override a superclass method."

I only get it for this one instance, and it's the only error I'm getting. I get the same error using the downloaded code and I'm using the 2.3.3 SDK for the program. Any ideas?

Thanks for the help!
 
Old December 2nd, 2011, 11:06 PM
Registered User
 
Join Date: Nov 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hm... it appears taking out the @Override clears it up and the program runs fine.

Last edited by cokebootle; December 2nd, 2011 at 11:10 PM..
 
Old December 9th, 2011, 02:09 AM
Registered User
 
Join Date: Dec 2011
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Default How do i fix this error

[2011-12-08 22:02:48 - PeerDroidSample] Unable to resolve target 'android-5'
[2011-12-08 22:05:02 - Notifications] Unable to resolve target 'android-9'
[2011-12-08 22:05:02 - Intents] Unable to resolve target 'android-9'
 
Old March 17th, 2012, 09:23 AM
Registered User
 
Join Date: Mar 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default reply

first i want code for dialog example
 
Old March 17th, 2012, 09:25 AM
Registered User
 
Join Date: Mar 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default rely

code for"Dialog"
 
Old March 17th, 2012, 09:25 AM
Registered User
 
Join Date: Mar 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

code for"dialog"





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 2 Dialog problem undifend vars Cliff2310 BOOK: Beginning Android Application Development 7 November 20th, 2011 07:33 PM
Chapter-17 TryITout..Adding and Using an open file Dialog raghavraam BOOK: Beginning Microsoft Visual C# 2008 ISBN: 978-0-470-19135-4 0 July 17th, 2009 02:12 AM
Chapter 6 : Message Contract Program Example thsun BOOK: Professional WCF Programming: .NET Dev with Windows Communication Found ISBN: 9780470089842 16 January 11th, 2008 12:34 PM
replace Word dialog with my designing dialog doublelucky Visual C++ 0 March 19th, 2007 02:27 AM
Chapter 17 - Displaying the dialog box davidd31415 BOOK: Beginning Visual C++ 6 1 September 24th, 2006 04:46 PM





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