summaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
Diffstat (limited to 'main/src')
-rw-r--r--main/src/main/java/de/blinkt/openvpn/fragments/FileSelectionFragment.java27
1 files changed, 16 insertions, 11 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/fragments/FileSelectionFragment.java b/main/src/main/java/de/blinkt/openvpn/fragments/FileSelectionFragment.java
index 3b146828..e3bcce41 100644
--- a/main/src/main/java/de/blinkt/openvpn/fragments/FileSelectionFragment.java
+++ b/main/src/main/java/de/blinkt/openvpn/fragments/FileSelectionFragment.java
@@ -58,6 +58,22 @@ public class FileSelectionFragment extends ListFragment {
@Override
+ public void onViewCreated(View view, Bundle savedInstanceState) {
+ super.onViewCreated(view, savedInstanceState);
+ getListView().setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
+ @Override
+ public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
+ onListItemClick(getListView(), view, position, id);
+ onFileSelectionClick();
+ return true;
+ }
+ }
+
+ );
+
+ }
+
+ @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.file_dialog_main, container, false);
@@ -95,17 +111,6 @@ public class FileSelectionFragment extends ListFragment {
mClearButton.setEnabled(false);
}
- getListView().setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
- @Override
- public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
- onListItemClick(getListView(), view, position, id);
- onFileSelectionClick();
- return true;
- }
- }
-
- );
-
return v;
}