[Android] AudioBrowser: prevent the user to scroll the header
Sébastien Toque
git at videolan.org
Fri Jun 22 01:00:16 CEST 2012
android | branch: master | Sébastien Toque <xilasz at gmail.com> | Fri Jun 22 00:55:54 2012 +0200| [e1705713b85ac0f3cab8c1bac4223684f6c93350] | committer: Sébastien Toque
AudioBrowser: prevent the user to scroll the header
> http://git.videolan.org/gitweb.cgi/android.git/?a=commit;h=e1705713b85ac0f3cab8c1bac4223684f6c93350
---
.../src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
index 24572f7..74cb264 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
@@ -51,8 +51,10 @@ import android.view.ContextMenu.ContextMenuInfo;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
+import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnCreateContextMenuListener;
+import android.view.View.OnTouchListener;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.AdapterContextMenuInfo;
@@ -126,6 +128,13 @@ public class AudioBrowserFragment extends SherlockFragment implements ISortable
mFlingViewGroup.setOnViewSwitchedListener(mViewSwitchListener);
mHeader = (HorizontalScrollView)v.findViewById(R.id.header);
+ mHeader.setOnTouchListener(new OnTouchListener() {
+ @Override
+ public boolean onTouch(View v, MotionEvent e) {
+ // prevent the user to scroll the header
+ return true;
+ }
+ });
ListView songsList = (ListView)v.findViewById(R.id.songs_list);
ExpandableListView artistList = (ExpandableListView)v.findViewById(R.id.artists_list);
More information about the Android
mailing list