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
[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 - API-Demos->App->Dialog->Text Entry dialog

API-Demos->App->Dialog->Text Entry dialog

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

API-Demos->App->Dialog->Text Entry dialog

Postby kodex83 » Mon Jan 05, 2009 7:23 pm

I´m playing with the Dialogs in API Demos.

How can I get the values of the editText in the dialog?

I have add to lines of code the get the value of editbox. But it doesn´t work :(
Please help me.

http://code.google.com/intl/de-DE/android/samples/ApiDemos/src/com/example/android/apis/app/AlertDialogSamples.html

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.         case DIALOG_TEXT_ENTRY:
  2.             // This example shows how to add a custom layout to an AlertDialog
  3.             LayoutInflater factory = LayoutInflater.from(this);
  4.             final View textEntryView = factory.inflate(R.layout.alert_dialog_text_entry, null);
  5.             return new AlertDialog.Builder(AlertDialogSamples.this)
  6.                 .setIcon(R.drawable.alert_dialog_icon)
  7.                 .setTitle(R.string.alert_dialog_text_entry)
  8.                 .setView(textEntryView)
  9.                 .setPositiveButton(R.string.alert_dialog_ok, new DialogInterface.OnClickListener() {
  10.                     public void onClick(DialogInterface dialog, int whichButton) {
  11.  
  12.                         // !!!!!!!!!!!!!!!!!!!! MY CODE !!!!!!!!!!!!!!!!!!!!!!!
  13.                         EditText etrUserName = (EditText)findViewById(R.id.username_edit);
  14.                         String userName=userNameEt.getText().toString();
  15.  
  16.                     }
  17.                 })
  18.                 .setNegativeButton(R.string.alert_dialog_cancel, new DialogInterface.OnClickListener() {
  19.                     public void onClick(DialogInterface dialog, int whichButton) {
  20.  
  21.                         /* User clicked cancel so do some stuff */
  22.                     }
  23.                 })
  24.                 .create();
  25.  
Parsed in 0.013 seconds, using GeSHi 1.0.8.4


regards

Stefan
kodex83
Freshman
Freshman
 
Posts: 9
Joined: Wed Dec 03, 2008 6:00 pm
Location: Germay

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Google [Bot] and 6 guests