Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Response to alert dialog button programatically

Response to alert dialog button programatically

Put your problem here if it does not fit any of the other categories.

Response to alert dialog button programatically

Postby sasuke » Mon May 12, 2008 3:26 pm

I have an alert dialog like this
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. new AlertDialog.Builder(mContext)
  3.  
  4. .setTitle("Testing")
  5.  
  6. .setMessage("Buy this thing?")
  7.  
  8. .setPositiveButton(R.string.yes, yesListener)
  9.  
  10. .setNegativeButton(R.string.no, noListener)
  11.  
  12. .show();
  13.  
  14.  
Parsed in 0.019 seconds, using GeSHi 1.0.8.4


If we pressed the positive button, the program will run the yesListener and run the noListener if we pressed the negative button.

What i want is, if the program met certain condition, the alert dialog will show, and program automatically pressed the positive / negative button.

I don't want to access the method directly, because i want the dialog to be shown first... (it's done as if human pressed the button).

Is it possible?

Thanks,
sasuke
sasuke
Experienced Developer
Experienced Developer
 
Posts: 57
Joined: Fri Nov 30, 2007 1:25 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Google [Bot], MSNbot Media and 21 guests