1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-16 05:55:08 -05:00

UserActivity: Do not update list in Thread. Use a background task later

This commit is contained in:
Sebastian Kaspari 2010-10-27 23:14:25 +02:00
parent 4fc593050f
commit 99cf534f20

View File

@ -57,12 +57,8 @@ public class UsersActivity extends ListActivity implements OnItemClickListener
// Add sorted list of users in own thread to avoid blocking UI // Add sorted list of users in own thread to avoid blocking UI
// TODO: Move to a background task and show loading indicator while sorting // TODO: Move to a background task and show loading indicator while sorting
(new Thread() { Arrays.sort(users, String.CASE_INSENSITIVE_ORDER);
public void run() { getListView().setAdapter(new ArrayAdapter<String>(UsersActivity.this, R.layout.useritem, users));
Arrays.sort(users, String.CASE_INSENSITIVE_ORDER);
getListView().setAdapter(new ArrayAdapter<String>(UsersActivity.this, R.layout.useritem, users));
}
}).start();
} }
/** /**