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 - programatically add editText. Is this code ok ?

programatically add editText. Is this code ok ?

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

programatically add editText. Is this code ok ?

Postby aneuryzma » Wed Jan 13, 2010 8:16 pm

hi,

I want to programmatically add an editText field only if it doesn't already exist. This code works, but I was wondering if it is correct, or should I implement it differently...

//input area
if (editText==null) {

editText = new EditText(this);
editText.setInputType(InputType.TYPE_TEXT_FLAG_MULTI_LINE);
editText.setText("tag...");
layMain.addView(editText);

}

thanks
aneuryzma
Developer
Developer
 
Posts: 28
Joined: Wed Jan 06, 2010 10:46 am

Top

Postby aneuryzma » Wed Jan 13, 2010 8:22 pm

I have another question: how can I add editText before the button I've previously created ?

thanks
aneuryzma
Developer
Developer
 
Posts: 28
Joined: Wed Jan 06, 2010 10:46 am

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Majestic-12 [Bot] and 4 guests