[Android] focus initialization

Mik Amchislavsky git at videolan.org
Mon Oct 6 15:55:16 CEST 2014


vlc-ports/android | branch: master | Mik Amchislavsky <hailmikhail at gmail.com> | Sun Oct  5 18:02:06 2014 -0700| [b03881fdf5c0440d98019e1da1753b36f30f8c74] | committer: Geoffrey Métais

focus initialization

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=b03881fdf5c0440d98019e1da1753b36f30f8c74
---

 vlc-android/src/org/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();
         }
     }
 



More information about the Android mailing list