[Android] focus initialization

Mik Amchislavsky git at videolan.org
Thu Oct 9 14:32:55 CEST 2014


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

focus initialization

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

 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 f000950..3967477 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
@@ -411,6 +411,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