Code example for EdgeEffectCompat

0
    private OnClickListener mOnClickListener;
 
    public HorizontalListView(Context context, AttributeSet attrs) {
        super(context, attrs);
        mEdgeGlowLeft = new EdgeEffectCompat(context);
        mEdgeGlowRight = new EdgeEffectCompat(context);
        mGestureDetector = new GestureDetector(context, mGestureListener);
        bindGestureDetector(); 
        initView(); 
        retrieveXmlConfiguration(context, attrs);
        setWillNotDraw(false);
 
        // If the OS version is high enough then set the friction on the fling tracker */ 
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
            HoneycombPlus.setFriction(mFlingTracker, FLING_FRICTION);
        } 
    } 
 
    /** Registers the gesture detector to receive gesture notifications for this view */ 
    private void bindGestureDetector() { 
        // Generic touch listener that can be applied to any view that needs to process gestures