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
[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 - Maintain list position with custom adapter

Maintain list position with custom adapter

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

Maintain list position with custom adapter

Postby twilbrand » Wed Sep 08, 2010 9:27 pm

I have a main listview that I want to update on a fixed schedule using a timer.

I have the timed updates working, but my problem is that the list is jumping back to the top every time the timed AsyncTask completes.

The list has a custom adapter that extends ArrayAdapter. The data is coming as JSON back from an HTTP GET request. I transform the JSON into an Array of objects, then do the following:

Code: Select all
MyListAdapter adapter = new MyListAdapter(someObjects);
setListAdapter(adapter);


I think the problem may lie in the fact that I'm using an array of objects rather than something like an ArrayList. However, I don't see an acceptable replacement for ArrayAdapter to have my custom adapter extend.

Again, the main goal is to allow my list to be updated every x seconds (10, 20, whatever) and not jump back to the top of the list every time.

I can post more code if needed.
twilbrand
Once Poster
Once Poster
 
Posts: 1
Joined: Wed Sep 08, 2010 9:12 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 9 guests