AlertDialog in SDK 0.9

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

AlertDialog in SDK 0.9

Postby sm » Sat Sep 13, 2008 1:36 am

I get the error:

Description Resource Path Location Type
The method showAlert(String, String, String, boolean) is undefined for the type new View.OnClickListener(){} Abc.java Abc/src/com/android/abc line 52 Java Problem


Pls help!

Rest all is fine
sm
Junior Developer
Junior Developer
 
Posts: 10
Joined: Fri Sep 05, 2008 2:54 am

Top

Postby plusminus » Sat Sep 13, 2008 2:51 pm

Hello sm,

use code similar to this:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. new AlertDialog.Builder(MyActivity.this)
  2.  
  3.         .setTitle(aTitle)
  4.  
  5.         .setMessage(aMessage)
  6.  
  7.         .setIcon(aDrawable)
  8.  
  9.         .setPositiveButton(aOkButtonText)
  10.  
  11.         .create().show();
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 5 guests