Fix bug: When accessing an coming back several times, the folder is hidden
authormasensio <masensio@solidgear.es>
Wed, 9 Apr 2014 15:37:57 +0000 (17:37 +0200)
committermasensio <masensio@solidgear.es>
Wed, 9 Apr 2014 15:37:57 +0000 (17:37 +0200)
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);
+            }
+            
         }
     }