[Android] [PATCH] MainActivity, VideoGrid, AudioBrowser, Directories, & History: focus related functional improvements
Edward Wang
edward.c.wang at compdigitec.com
Mon Oct 13 18:32:19 CEST 2014
Hello,
On Mon, Oct 13, 2014 at 6:31 AM, Mik Amchislavsky <hailmikhail at gmail.com> wrote:
> ---
> .../videolan/vlc/gui/DirectoryViewFragment.java | 19 ++++-
> .../src/org/videolan/vlc/gui/HistoryFragment.java | 20 ++++-
> .../src/org/videolan/vlc/gui/MainActivity.java | 83 ++++++++++++++++++++
> .../vlc/gui/audio/AudioBrowserFragment.java | 34 ++++++--
> .../videolan/vlc/gui/video/VideoGridFragment.java | 12 ++-
> 5 files changed, 159 insertions(+), 9 deletions(-)
>
> diff --git a/vlc-android/src/org/videolan/vlc/gui/DirectoryViewFragment.java b/vlc-android/src/org/videolan/vlc/gui/DirectoryViewFragment.java
> index 5993bfd..2e366b2 100644
> --- a/vlc-android/src/org/videolan/vlc/gui/DirectoryViewFragment.java
> +++ b/vlc-android/src/org/videolan/vlc/gui/DirectoryViewFragment.java
> @@ -79,6 +79,14 @@ public class DirectoryViewFragment extends ListFragment implements IRefreshable,
> getActivity().registerReceiver(messageReceiver, filter);
> }
>
> + private void focusHelper(boolean idIsEmpty) {
> + View parent = View.inflate(getActivity(),
> + R.layout.directory_view, null);
> + MainActivity main = (MainActivity)getActivity();
> + main.setMenuFocusDown(idIsEmpty, android.R.id.list);
> + main.setSearchAsFocusDown(idIsEmpty, parent, android.R.id.list);
> + }
Thanks for looking into these focus-related issues.
It would be very nice to separate your changes into _one_ commit per
change, and add some documentation describing what your code does or
use more descriptive function names. (e.g. what does "focusHelper"
do?)
Regards,
Edward
More information about the Android
mailing list