\r
import android.accounts.Account;\r
import android.accounts.AccountManager;\r
+import android.app.AlertDialog;\r
+import android.app.Dialog;\r
import android.content.ActivityNotFoundException;\r
import android.content.BroadcastReceiver;\r
import android.content.Context;\r
* \r
*/\r
public class FileDetailFragment extends SherlockFragment implements\r
- OnClickListener {\r
+ OnClickListener, ConfirmationDialogFragment.ConfirmationDialogFragmentListener {\r
\r
public static final String EXTRA_FILE = "FILE";\r
public static final String EXTRA_ACCOUNT = "ACCOUNT";\r
dialog.show(getFragmentManager(), "nameeditdialog");\r
dialog.setOnDismissListener(this);\r
break;\r
+ } \r
+ case R.id.fdRemoveBtn: {\r
+ ConfirmationDialogFragment confDialog = ConfirmationDialogFragment.newInstance("remove " + mFile.getFileName());\r
+ confDialog.setOnConfirmationListener(this);\r
+ confDialog.show(getFragmentManager(), "REMOVE_CONFIRMATION_FRAGMENT");\r
+ break;\r
}\r
default:\r
Log.e(TAG, "Incorrect view clicked!");\r
t.start();\r
}*/\r
}\r
-\r
-\r
+ \r
+ \r
+ @Override\r
+ public void onConfirmation(boolean confirmation, String callerTag) {\r
+ if (confirmation && callerTag.equals("REMOVE_CONFIRMATION_FRAGMENT")) {\r
+ // TODO remove in a separated thread\r
+ }\r
+ }\r
+ \r
+ \r
/**\r
* Check if the fragment was created with an empty layout. An empty fragment can't show file details, must be replaced.\r
* \r
\r
}\r
\r
- // this is a temporary class for sharing purposes, it need to be replacead in transfer service\r
+ // this is a temporary class for sharing purposes, it need to be replaced in transfer service\r
private class ShareRunnable implements Runnable {\r
private String mPath;\r
\r
}\r
\r
}\r
+\r
}\r