[Android] [PATCH] focus initialization

Mik Amchislavsky hailmikhail at gmail.com
Mon Oct 6 03:02:06 CEST 2014


---
 .../videolan/vlc/gui/video/VideoGridFragment.java  |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
index 7f03e2c..64d7fc1 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
@@ -440,6 +440,9 @@ public class VideoGridFragment extends SherlockGridFragment implements ISortable
                 }
             }
             mVideoAdapter.sort();
+            mGVFirstVisiblePos = mGridView.getFirstVisiblePosition();
+            mGridView.setSelection(mGVFirstVisiblePos);
+            mGridView.requestFocus();
         }
     }
 
-- 
1.7.9.5



More information about the Android mailing list