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 - efficient way to perform action once window has been painted

efficient way to perform action once window has been painted

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

efficient way to perform action once window has been painted

Postby sandis84 » Thu Aug 20, 2009 1:36 pm

It is quite often that I want to perform an action that cannot be performed until the window has been generated, for example if I want to count the rows in an edittext. Right now my solution is to extend the object and override the onDraw-function to perform my action. But it feels as if there should be a neater way. Any suggestions?
sandis84
Experienced Developer
Experienced Developer
 
Posts: 78
Joined: Fri Aug 07, 2009 3:54 pm

Top

Postby mad.dogg » Thu Aug 20, 2009 3:30 pm

Perhaps somewhere in the activity's lifecycle?
It depends. Is it action per component or action per "window" activity? Is it just the first time or every time the activity/component has been intialized?
If it's boring it ain't heavy enough!
mad.dogg
Developer
Developer
 
Posts: 42
Joined: Tue May 20, 2008 2:18 pm
Location: Bulgaria

Postby sandis84 » Thu Aug 20, 2009 3:32 pm

For example, I might want to change row distance for all multi-lined textviews. Then I want it to initiate as soon as possible, but not until it has been drawn. That is a typical example. :)
sandis84
Experienced Developer
Experienced Developer
 
Posts: 78
Joined: Fri Aug 07, 2009 3:54 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 6 guests