title: How do I refresh a ListView in Android - onItemClick, Alert shown with Edit Text
body: <p>I have a a list view that shows:</p>
  
  <p>tag : 10
  tagb : 20</p>
  
  <p>When I click on an item, I get an Alert asking to change a value (EditText)
  I set the value and click ok</p>
  
  <ol>
  <li>How can I refresh the listview to show the change</li>
  <li>How can I manually change the row and put the new value there eg tagb : 122?</li>
  </ol>
  
  <p>BTW, The list of itemsand value comes from a result of a  REST call I make to a server</p>
  
  <p>Hope this makes sense.</p>
  
  <p>Thanks</p>
  
  <p>Here is the code for the ListView:</p>
  
  <p>setContentView(R.layout.listview);
          list = (ListView) findViewById(R.id.list);</p>
  
  <pre><code>    adapter = new ListViewAdapter(this, alarmName, deviceName, alarmDate,
              alarmSev);
      list.setAdapter(adapter);
      adapter.notifyDataSetChanged();
      list.setOnItemClickListener(new OnItemClickListener() {
  
          @Override
          public void onItemClick(AdapterView&lt;?&gt; arg0, View arg1, int arg2,
                  long arg3) {
              // TODO Auto-generated method stub
              AlertDialog.Builder adb = new AlertDialog.Builder(
                      AlarmsTab.this);
  
              adb.setTitle("Acknowledge Alarms");
  
              adb.setMessage("Do you want to Acknowledge this Alarm? " + "\n"
                      + alarmName.get(arg2));
              alarmpos = alarmName.get(arg2);
  
              adb.setPositiveButton("Yes",
                      new DialogInterface.OnClickListener() {
                          public void onClick(DialogInterface dialog, int id) {
  
                              CloseAlarm(asset, model, alarmpos);
  
                          }
                      });
              adb.setNegativeButton("No",
                      new DialogInterface.OnClickListener() {
                          public void onClick(DialogInterface dialog, int id) {
                              dialog.cancel();
                          }
                      });
  
              adb.show();
  
          }
  
      });
  
      getAlarmsForAsset(asset);
      adapter.notifyDataSetChanged();
  
  }
  </code></pre>