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 - ScrollBy has no effect.

ScrollBy has no effect.

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

ScrollBy has no effect.

Postby metter » Tue Jun 02, 2009 12:43 pm

Hello.

I have a ScrollView containing a LinearView. The LinearView contains a lot of TwoLineListItems.

I want this list to be scrolled to the end when i start the activity. For this, I use scrollView.scrollBy(0, 1000000); after i have set up the screen and added all views. This has no effect whatsoever though :(.

The fun thing is, if I call scrollView.scrollBy(0, 1000000) later (when dynamically adding a new TwoLineListItem), it works. :?: :?:

Why doesn't this work form the beginning?

Thank you.

Cheers.
metter
Junior Developer
Junior Developer
 
Posts: 16
Joined: Tue Jan 06, 2009 2:00 pm

Top

Postby metter » Sat Jun 20, 2009 10:33 am

Anyone? I still wasn't able to resolve the issue :(
metter
Junior Developer
Junior Developer
 
Posts: 16
Joined: Tue Jan 06, 2009 2:00 pm

Postby metter » Sat Jun 20, 2009 10:51 am

Ok, as usual. You spend hours and hours and as soon as you ask, you figure it out :)


For anyone with the same problem:

scrollBy must be called after onWindowFocusChanged (Or at least it works like this...).


public void onWindowFocusChanged(boolean hasFocus) {
if(hasFocus)
scrollView.scrollBy(0, 1000000);
}


Cheers
metter
Junior Developer
Junior Developer
 
Posts: 16
Joined: Tue Jan 06, 2009 2:00 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Google [Bot] and 1 guest