com.drismo.gui
Class ViewArchive.RenameTrip
java.lang.Object
android.os.AsyncTask<java.lang.String[],java.lang.Void,java.lang.Boolean>
com.drismo.gui.ViewArchive.RenameTrip
- Enclosing class:
- ViewArchive
private class ViewArchive.RenameTrip
- extends android.os.AsyncTask<java.lang.String[],java.lang.Void,java.lang.Boolean>
Rename a trip file, while a ProgressDialog (spinner) runs in the foreground.
Nested classes/interfaces inherited from class android.os.AsyncTask |
android.os.AsyncTask.Status |
Method Summary |
protected java.lang.Boolean |
doInBackground(java.lang.String[]... param)
Rename a file from the application directory |
protected void |
onPostExecute(java.lang.Boolean renamed)
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 |
filenames
java.lang.String[] filenames
oldFilename
java.lang.String oldFilename
newFilename
java.lang.String newFilename
updatedTripNr
int updatedTripNr
ViewArchive.RenameTrip
private ViewArchive.RenameTrip()
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[]... param)
- Rename a file from the application directory
- Specified by:
doInBackground
in class android.os.AsyncTask<java.lang.String[],java.lang.Void,java.lang.Boolean>
- Parameters:
param
- A string array with both the old filename and what to rename it to.
- Returns:
- Result of the rename action.
onPostExecute
protected void onPostExecute(java.lang.Boolean renamed)
- 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:
renamed
- True if the file was renamed. False otherwise.