Fix bug: When accessing an coming back several times, the folder is hidden
[pub/Android/ownCloud.git] / src / com / owncloud / android / ui / fragment / OCFileListFragment.java
index 67d5f8b..fb0e4fa 100644 (file)
@@ -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);
+            }
+            
         }
     }