<ImageView
android:id="@+id/imageView1"
- android:layout_width="16dp"
- android:layout_height="16dp"
+ android:layout_width="20dp"
+ android:layout_height="20dp"
android:layout_gravity="center_vertical|center"
android:layout_margin="4dp"
android:src="@drawable/ic_menu_archive" />
}\r
\r
public void onActivityResult(int requestCode, int resultCode, Intent data) {\r
- Log.e("ASD", requestCode + " " + resultCode);\r
if (resultCode == RESULT_OK) {\r
if (requestCode == ACTION_SELECT_FILE) {\r
Uri selectedImageUri = data.getData();\r
AccountUtils.getCurrentOwnCloudAccount(this));\r
String remotepath = new String();\r
for (int j = mDirectories.getCount() - 2; j >= 0; --j) {\r
- remotepath += "/" + URLDecoder.decode(mDirectories.getItem(j));\r
+ remotepath += "/" + URLEncoder.encode(mDirectories.getItem(j));\r
}\r
if (!remotepath.endsWith("/"))\r
remotepath += "/";\r
- remotepath += new File(filepath).getName();\r
+ remotepath += URLEncoder.encode(new File(filepath).getName());\r
Log.e("ASD", remotepath + "");\r
\r
i.putExtra(FileUploader.KEY_LOCAL_FILE, filepath);\r
i.putExtra(FileUploader.KEY_REMOTE_FILE, remotepath);\r
- i.putExtra(FileUploader.KEY_UPLOAD_TYPE,\r
- FileUploader.UPLOAD_SINGLE_FILE);\r
+ i.putExtra(FileUploader.KEY_UPLOAD_TYPE, FileUploader.UPLOAD_SINGLE_FILE);\r
startService(i);\r
}\r
}\r
}\r
}\r
\r
- @Override\r
- public boolean onItemLongClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\r
- ClipData.Item item = new ClipData.Item("ASD");\r
- ClipDescription cd = new ClipDescription("ASD", new String[] { ClipDescription.MIMETYPE_TEXT_PLAIN });\r
- ClipData dragData = new ClipData(cd, item);\r
- arg1.startDrag(dragData, new View.DragShadowBuilder(arg0.getChildAt(arg2)), null, 0);\r
- return true;\r
- }\r
-\r
/**\r
* Call this, when the user presses the up button\r
*/\r
public boolean downloadFile(String filepath, File targetPath) {\r
// HttpGet get = new HttpGet(mUri.toString() + filepath.replace(" ",\r
// "%20"));\r
+ String[] splitted_filepath = filepath.split("/");\r
+ filepath = "";\r
+ for (String s : splitted_filepath) {\r
+ if (s.equals("")) continue;\r
+ filepath += "/" + URLEncoder.encode(s);\r
+ }\r
\r
Log.e("ASD", mUri.toString() + filepath.replace(" ", "%20") + "");\r
GetMethod get = new GetMethod(mUri.toString()\r