diff --git a/astrid/res/values/strings-premium.xml b/astrid/res/values/strings-premium.xml
index 0aba2a908..1fa905279 100644
--- a/astrid/res/values/strings-premium.xml
+++ b/astrid/res/values/strings-premium.xml
@@ -20,5 +20,7 @@
Up
Choose a file
Permissions error! Please make sure you have not blocked Astrid from accessing the SD card.
+ Attach a picture
+ Attach a file from your SD card
Error copying file for attachment
diff --git a/astrid/src/com/todoroo/astrid/activity/TaskEditFragment.java b/astrid/src/com/todoroo/astrid/activity/TaskEditFragment.java
index 75321435d..02c4a0e78 100755
--- a/astrid/src/com/todoroo/astrid/activity/TaskEditFragment.java
+++ b/astrid/src/com/todoroo/astrid/activity/TaskEditFragment.java
@@ -52,6 +52,7 @@ import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.view.ViewParent;
+import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.FrameLayout;
@@ -999,8 +1000,29 @@ ViewPager.OnPageChangeListener, EditNoteActivity.UpdatesChangedListener {
}
private void startAttachFile() {
- Intent attachFile = new Intent(getActivity(), FileExplore.class);
- startActivityForResult(attachFile, REQUEST_CODE_ATTACH_FILE);
+ ArrayList options = new ArrayList();
+ options.add(getString(R.string.file_add_picture));
+ options.add(getString(R.string.file_add_sdcard));
+
+ ArrayAdapter adapter = new ArrayAdapter(getActivity(),
+ android.R.layout.simple_spinner_dropdown_item, options.toArray(new String[options.size()]));
+
+ DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface d, int which) {
+ if(which == 0) {
+ System.err.println("Attach a picture");
+ } else if (which == 1) {
+ Intent attachFile = new Intent(getActivity(), FileExplore.class);
+ startActivityForResult(attachFile, REQUEST_CODE_ATTACH_FILE);
+ }
+ }
+ };
+
+ // show a menu of available options
+ new AlertDialog.Builder(getActivity())
+ .setAdapter(adapter, listener)
+ .show().setOwnerActivity(getActivity());
}
private void startRecordingAudio() {