title: Update ListView without freezing UI
body: <p>I want to create ListView which every 4 seconds add item and set focus on last item.
  Problem is that my Fragment wait for asynctask is over and only then show(all time asynctask work its white screen)</p>
  
  <pre><code> public class LogFragment extends SherlockFragment {
      private ListView lvList;
      private ArrayAdapter&lt;String&gt; adapter;
      private UpdateTask mTask = null;
      String[] values = new String[] { "Android", "iPhone", "WindowsMobile" };
  @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
              Bundle savedInstanceState) {
          View view = inflater.inflate(R.layout.log_fragment, container, false);
          lvList = (ListView) view.findViewById(R.id.lvLog);
          final ArrayList&lt;String&gt; list = new ArrayList&lt;String&gt;();
          for (int i = 0; i &lt; values.length; ++i) {
              list.add(values[i]);
          }
          adapter = new ArrayAdapter&lt;String&gt;(getSherlockActivity(),
                  android.R.layout.simple_list_item_1, list);
          lvList.setAdapter(adapter);
          return view;
      }
      @Override
      public void onCreate(Bundle savedInstanceState) {
          Log.d("myLogs", "LogFragment:OnCreate");
          mTask = new UpdateTask();
          super.onCreate(savedInstanceState);
          mTask.execute();
      }
  </code></pre>
  
  <p>And my AnyncTask: </p>
  
  <pre><code> public class UpdateTask extends AsyncTask&lt;Void, Void, Void&gt; {
          int temp = 10;
  
          protected Void doInBackground(Void... params) {
              getSherlockActivity().runOnUiThread(new Runnable() {
  
                  @Override
                  public void run() {
                      while (temp-- &gt; 0) {
                          try {
                              TimeUnit.SECONDS.sleep(4);
                              adapter.add("Lol" + String.valueOf(temp));
                              lvList.setSelection(lvList.getAdapter().getCount() - 1);
                              Log.d("myLogs", "Added from Async");
                          } catch (InterruptedException e) {
                              // TODO Auto-generated catch block
                              e.printStackTrace();
                          }
                      }
                  }
              });
  
              return null;
  
          }
  
          protected void onPostExecute(String result) {
          }
      }
  </code></pre>
  
  <p>How to solve my problem? </p>