com.drismo.gui
Class ViewArchive.DeleteOneTrip

java.lang.Object
  extended by android.os.AsyncTask<java.lang.String,java.lang.Void,java.lang.Boolean>
      extended by com.drismo.gui.ViewArchive.DeleteOneTrip
Enclosing class:
ViewArchive

private class ViewArchive.DeleteOneTrip
extends android.os.AsyncTask<java.lang.String,java.lang.Void,java.lang.Boolean>

Delete a trip file, while a ProgressDialog (spinner) runs in the foreground.


Nested Class Summary
 
Nested classes/interfaces inherited from class android.os.AsyncTask
android.os.AsyncTask.Status
 
Field Summary
(package private)  java.lang.String filename
           
 
Constructor Summary
private ViewArchive.DeleteOneTrip()
           
 
Method Summary
protected  java.lang.Boolean doInBackground(java.lang.String... fn)
          Delete a file from the application directory
protected  void onPostExecute(java.lang.Boolean deleted)
          Close the ProgressDialog, report success of failure to the user via Toast and restart the activity to show the archive with updated content.
protected  void onPreExecute()
          Prepare a spinner for this task
 
Methods inherited from class android.os.AsyncTask
cancel, execute, get, get, getStatus, isCancelled, onCancelled, onProgressUpdate, publishProgress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

filename

java.lang.String filename
Constructor Detail

ViewArchive.DeleteOneTrip

private ViewArchive.DeleteOneTrip()
Method Detail

onPreExecute

protected void onPreExecute()
Prepare a spinner for this task

Overrides:
onPreExecute in class android.os.AsyncTask<java.lang.String,java.lang.Void,java.lang.Boolean>

doInBackground

protected java.lang.Boolean doInBackground(java.lang.String... fn)
Delete a file from the application directory

Specified by:
doInBackground in class android.os.AsyncTask<java.lang.String,java.lang.Void,java.lang.Boolean>
Parameters:
fn - Name of the file to delete.
Returns:
True/false result of whether or not the file has been deleted.

onPostExecute

protected void onPostExecute(java.lang.Boolean deleted)
Close the ProgressDialog, report success of failure to the user via Toast and restart the activity to show the archive with updated content.

Overrides:
onPostExecute in class android.os.AsyncTask<java.lang.String,java.lang.Void,java.lang.Boolean>
Parameters:
deleted - True if the file was deleted. False otherwise.