title: Progress Handler in android list base adapter
body: <p>Below is the code snippet for progress handler in an activity:
  It works fine with a class which extends Activity but I want to use it with a Baseadapter...</p>
  
  <pre><code>Handler progressHandler = new Handler() {       
          public void handleMessage(Message msg) {
              AlertDialog.Builder alert = new AlertDialog.Builder(WhiteboardAddPost.this);
              switch(msg.what){
              case 0:                 
                  alert.setTitle("Add Post");         
                  alert.setMessage(message);
                  alert.setCancelable(false);
                  alert.setPositiveButton("OK", new DialogInterface.OnClickListener() {
                      public void onClick(DialogInterface dialog, int whichButton) {
                          Intent intent = new Intent();
                          intent.putExtra("OK", "ok"); 
                          setResult(RESULT_OK, intent);
                          releaseMemory();
                          finish();
                      }
                  }).create().show();                     
  
                  break;
              case 1:                 
                  alert.setTitle("Close");            
                  alert.setMessage(message);
                  alert.setPositiveButton("OK", new DialogInterface.OnClickListener() {
                      public void onClick(DialogInterface dialog, int whichButton) {
                          return;
                      }
                  }).create().show();                     
  
                  break;
  
              case 2:                 
                  alert.setTitle("Close");            
                  alert.setMessage(message);
                  alert.setPositiveButton("OK", new DialogInterface.OnClickListener() {
                      public void onClick(DialogInterface dialog, int whichButton) {
                          return;
                      }
                  }).create().show();                     
  
                  break;                
              } 
          }
      };
  </code></pre>
  
  <p>How to use it in list view where we extends Baseadapter but not activity?</p>
  
  <p>Further to elaborate the problem: In my list I am having a button attached with each item to delete that particular Item and when ever user click that delete button a request goes to server at this point of time I want to show an alert to show the wait message and when response comes then I want to show an alert with response message.</p>