I have this piece of code into a ListFragment
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
aa = new ArrayAdapter(getActivity(), android.R.layout.simple_list_item_1, postTitleList);
setListAdapter(aa);
Thread syncThread = new Thread(new Runnable(){
public void run()
{
syncPosts();
}
});
syncThread.start();
Log.d("POSTS", "Thread Status: " + syncThread.getState().toString());
Log.d("POSTS", "Thread ID: " + Long.toString(syncThread.getId()));
}
but unfortunately the Thread never starts, it remains in WAITING status, is there a way to force it running?
.
stackoverflow.comm
No comments:
Post a Comment