title: AsyncTask not updating UI after doInBackground finishes
body: <p>I'm trying to make a simple app that's looks for WiFi networks, and connects to them. I'm currently having a problem with updating the UI. </p>
  
  <p>A few pointers would be great. Thank you for your time.</p>
  
  <pre><code>class UiUpdater extends AsyncTask&lt;Void, Void, List&lt;ScanResult&gt;&gt; {
  
      @Override
      protected void onPreExecute() {
          super.onPreExecute();
  
          TextView searching = (TextView) findViewById(R.id.searching);
          searching.setText("Currently searching...");
      }
  
      @Override
      protected List&lt;ScanResult&gt; doInBackground(Void... params) {
          WifiManager manager = (WifiManager) Client.this.getSystemService(Context.WIFI_SERVICE);
  
          if (!manager.isWifiEnabled())
              manager.setWifiEnabled(true);
  
          return manager.getScanResults();
      }
  
      @Override
      protected void onPostExecute(List&lt;ScanResult&gt; items) {
          super.onPostExecute(items);
  
          ArrayList&lt;Items&gt; wifi = new ArrayList&lt;&gt;();
  
          for (ScanResult s : items)
              wifi.add(new Items(s.SSID, s.capabilities));
  
          ///TextView searching = (TextView) findViewById(R.id.searching);
          ///searching.setText("");
  
          ListView list = (ListView) findViewById(R.id.list);
          Explorer adapter = new Explorer(Client.this, R.layout.listview_item_row, wifi);
  
          list.setAdapter(adapter);
  
          clickListener(list, wifi);
      }
  
  }
  </code></pre>