From: masensio Date: Wed, 9 Apr 2014 15:37:57 +0000 (+0200) Subject: Fix bug: When accessing an coming back several times, the folder is hidden X-Git-Tag: oc-android-1.7.0_signed~337^2~1 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/b96cce8384c17f2e873ab427c1d9d076639a95d8 Fix bug: When accessing an coming back several times, the folder is hidden --- diff --git a/src/com/owncloud/android/ui/fragment/OCFileListFragment.java b/src/com/owncloud/android/ui/fragment/OCFileListFragment.java index 67d5f8b2..fb0e4fa7 100644 --- a/src/com/owncloud/android/ui/fragment/OCFileListFragment.java +++ b/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); + } + } }