83b44c594012299a8745e5d62de7375d67ef2dc1
[pub/Android/ownCloud.git] / src / com / owncloud / android / ui / activity / LocalDirectorySelectorActivity.java
1 /**
2 * ownCloud Android client application
3 *
4 * @author Bartosz Przybylski
5 * Copyright (C) 2015 ownCloud Inc.
6 * Copyright (C) 2015 Bartosz Przybylski
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2,
10 * as published by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21 package com.owncloud.android.ui.activity;
22
23 import android.content.Intent;
24 import android.os.Bundle;
25 import android.view.View;
26
27 import com.owncloud.android.R;
28
29 /**
30 * Created by Bartosz Przybylski on 07.11.2015.
31 */
32 public class LocalDirectorySelectorActivity extends UploadFilesActivity {
33
34 @Override
35 public void onCreate(Bundle savedInstanceState) {
36 super.onCreate(savedInstanceState);
37 mUploadBtn.setText(R.string.folder_picker_choose_button_text);
38 }
39
40 @Override
41 public void onClick(View v) {
42 if (v.getId() == R.id.upload_files_btn_cancel) {
43 setResult(RESULT_CANCELED);
44 finish();
45
46 } else if (v.getId() == R.id.upload_files_btn_upload) {
47 Intent resultIntent = new Intent();
48 resultIntent.putExtra(EXTRA_CHOSEN_FILES, getInitialDirectory().getAbsolutePath());
49 setResult(RESULT_OK, resultIntent);
50 finish();
51 }
52 }
53 }