Browse Source

Fix bug: When accessing an coming back several times, the folder is hidden

masensio 11 years ago
parent
commit
b96cce8384
1 changed files with 9 additions and 1 deletions
  1. 9 1
      src/com/owncloud/android/ui/fragment/OCFileListFragment.java

+ 9 - 1
src/com/owncloud/android/ui/fragment/OCFileListFragment.java

@@ -212,7 +212,15 @@ public class OCFileListFragment extends ExtendedListFragment implements EditName
         int height = mList.getHeight();
         
         if (indexPosition > height) {
-            mList.smoothScrollToPosition(index);
+            if (android.os.Build.VERSION.SDK_INT >= 11)
+            {
+                mList.smoothScrollToPosition(index); 
+            }
+            else if (android.os.Build.VERSION.SDK_INT >= 8)
+            {
+                mList.setSelectionFromTop(index, 0);
+            }
+            
         }
     }