// Copyright eeGeo Ltd (2012-2015), All Rights Reserved

package com.eegeo.searchmenu;

import com.eegeo.searchmenu.SearchMenuResultsListAnimationConstants;

import android.annotation.SuppressLint;
import android.os.Handler;
import android.view.MotionEvent;
import android.view.View;
import android.widget.ListView;

public class SearchResultsScrollButtonTouchDownListener implements View.OnTouchListener
{
	private ListView m_searchList = null;
    private final Handler mHandler = new Handler();
    
	public SearchResultsScrollButtonTouchDownListener(ListView view) {
		m_searchList = view;
	}

    final Runnable mAction = new Runnable() {
		@SuppressLint("NewApi")
		@Override public void run() {
            mHandler.postDelayed(this, 0);
            m_searchList.scrollListBy(SearchMenuResultsListAnimationConstants.SearchMenuResultsListScrollButtonSpeed);
        }
    };
    
	@Override
	public boolean onTouch(View v, MotionEvent event) {
		switch(event.getAction()) {
			case MotionEvent.ACTION_DOWN:
	            mHandler.postDelayed(mAction, 0);
	            break;
	        case MotionEvent.ACTION_UP:
	            mHandler.removeCallbacks(mAction);
	            break;
		}
		return false;
	}
}

@@ -750,16 +750,121 @@
         
+if(android.os.Build.VERSION.SDK_INT %3E= android.os.Build.VERSION_CODES.KITKAT)%0A            %7B%0A            %09
 m_search
@@ -962,16 +962,30 @@
 Speed);%0A
+            %7D%0A
         

Fix for MPLY-7330. ScrollListBy doesnt work with version < 4.4 so disable scrolling on devices before that. Buddy: Tim