diff --git a/src/main/java/com/nutomic/syncthingandroid/activities/FolderPickerActivity.java b/src/main/java/com/nutomic/syncthingandroid/activities/FolderPickerActivity.java index 0c8b9c99..3d539e44 100644 --- a/src/main/java/com/nutomic/syncthingandroid/activities/FolderPickerActivity.java +++ b/src/main/java/com/nutomic/syncthingandroid/activities/FolderPickerActivity.java @@ -225,7 +225,9 @@ public class FolderPickerActivity extends SyncthingActivity @Override public void onItemClick(AdapterView adapterView, View view, int i, long l) { - File f = mFilesAdapter.getItem(i); + @SuppressWarnings("unchecked") + ArrayAdapter adapter = (ArrayAdapter) mListView.getAdapter(); + File f = adapter.getItem(i); if (f.isDirectory()) { displayFolder(f); invalidateOptions(); diff --git a/src/main/res/menu/folder_list.xml b/src/main/res/menu/folder_list.xml index bceccaaa..10921d70 100644 --- a/src/main/res/menu/folder_list.xml +++ b/src/main/res/menu/folder_list.xml @@ -7,6 +7,6 @@ android:id="@+id/add_folder" android:icon="@drawable/ic_add_white_24dp_active" android:title="@string/add_folder" - app:showAsAction="never" /> + app:showAsAction="ifRoom" />