Example usage for android.support.v4.widget EdgeEffectCompat EdgeEffectCompat

List of usage examples for android.support.v4.widget EdgeEffectCompat EdgeEffectCompat

Introduction

In this page you can find the example usage for android.support.v4.widget EdgeEffectCompat EdgeEffectCompat.

Prototype

public EdgeEffectCompat(Context context) 

Source Link

Document

Construct a new EdgeEffect themed using the given context.

Usage

From source file:com.bczm.widgetcollections.ui.widget.HorizontalListView.java

public HorizontalListView(Context context) {
    super(context);
    mEdgeGlowLeft = new EdgeEffectCompat(context);
    mEdgeGlowRight = new EdgeEffectCompat(context);
    mGestureDetector = new GestureDetector(context, mGestureListener);
    bindGestureDetector();//from w  w  w . j  a  va  2s  . c  om
    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);
    }
}

From source file:com.focustech.common.widget.HorizontalListView.java

public HorizontalListView(Context context, AttributeSet attrs) {
    super(context, attrs);
    mEdgeGlowLeft = new EdgeEffectCompat(context);
    mEdgeGlowRight = new EdgeEffectCompat(context);
    mGestureDetector = new GestureDetector(context, mGestureListener);
    //bindGestureDetector();
    initView();// ww w  .  ja v  a 2s  . c om
    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);
    }
}

From source file:com.sumavision.talktv2.components.HorizontalListView2.java

public HorizontalListView2(Context context, AttributeSet attrs) {
    super(context, attrs);
    mEdgeGlowLeft = new EdgeEffectCompat(context);
    mEdgeGlowRight = new EdgeEffectCompat(context);
    mGestureDetector = new GestureDetector(context, mGestureListener);
    bindGestureDetector();//from  w w  w .  ja v  a 2s. c  o m
    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);
    }
}

From source file:sample.hawk.com.mybasicappcomponents.view.ListView.MyListViewH.java

public MyListViewH(Context context, AttributeSet attrs) {
    super(context, attrs);
    mEdgeGlowLeft = new EdgeEffectCompat(context);
    mEdgeGlowRight = new EdgeEffectCompat(context);
    mGestureDetector = new GestureDetector(context, mGestureListener);
    bindGestureDetector();//from  w  w  w. ja va2 s  . c om
    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);
    }
}

From source file:ps.emperor.easy_water.view.HorizontalListView.java

public HorizontalListView(Context context, AttributeSet attrs) {
    super(context, attrs);
    mEdgeGlowLeft = new EdgeEffectCompat(context);
    mEdgeGlowRight = new EdgeEffectCompat(context);
    mGestureDetector = new GestureDetector(context, mGestureListener);
    bindGestureDetector();/* ww w  . j a va 2 s  .c  o  m*/
    initView();
    retrieveXmlConfiguration(context, attrs);
    setWillNotDraw(false);

    scrollerTask = new Runnable() {
        @Override
        public void run() {
            int newPosition = getScrollX();
            if (intitPosition - newPosition == 0) {
                if (onScrollstopListner == null) {
                    return;
                }
                onScrollstopListner.onScrollStoped();
                Rect outRect = new Rect();
                getDrawingRect(outRect);
                if (getScrollX() == 0) {
                    onScrollstopListner.onScrollToLeftEdge();
                } else if (childWidth + getPaddingLeft() + getPaddingRight() == outRect.right) {
                    onScrollstopListner.onScrollToRightEdge();
                } else {
                    onScrollstopListner.onScrollToMiddle();
                }
            } else {
                intitPosition = getScrollX();
                postDelayed(scrollerTask, newCheck);
            }
        }
    };

    // 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);
    }
}

From source file:com.jeekiarn.horizontal_listview.HorizoantalListView.java

public HorizoantalListView(Context context, AttributeSet attrs) {
    super(context, attrs);
    mEdgeGlowLeft = new EdgeEffectCompat(context);
    mEdgeGlowRight = new EdgeEffectCompat(context);
    mGestureDetector = new GestureDetector(context, mGestureListener);
    bindGestureDetector();/* ww w . ja v a 2s. c  o m*/
    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);
    }
}

From source file:com.android.slidingmenu.HorizontalListView.java

public HorizontalListView(Context context, AttributeSet attrs) {
    super(context, attrs);
    mEdgeGlowLeft = new EdgeEffectCompat(context);
    mEdgeGlowRight = new EdgeEffectCompat(context);
    mGestureDetector = new GestureDetector(context, mGestureListener);
    bindGestureDetector();/*from  w  w w.  j av a 2  s  .co  m*/
    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);
    }
}

From source file:com.bigbug.android.pp.ui.widget.HorizontalListView.java

public HorizontalListView(Context context, AttributeSet attrs) {
    super(context, attrs);
    mEdgeGlowLeft = new EdgeEffectCompat(context);
    mEdgeGlowRight = new EdgeEffectCompat(context);
    mGestureDetector = new GestureDetector(context, mGestureListener);
    bindGestureDetector();//w w  w. j a v  a  2  s .  co m
    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);
    }

    mNestedScrollingChildHelper = new NestedScrollingChildHelper(this);
    mNestedScrollingChildHelper.setNestedScrollingEnabled(true);
}

From source file:com.example.nitish.welcomapp.widgetpt.PeriodicTableView.java

public PeriodicTableView(Context context, AttributeSet attrs, int defStyle) {
    super(context, attrs, defStyle);

    mSelectedPaint = new Paint();
    mSelectedPaint.setAntiAlias(true);/* w w w  .  j  a  v a 2 s .c o  m*/
    mSelectedPaint.setStyle(Paint.Style.STROKE);
    mSelectedPaint.setStrokeJoin(Paint.Join.ROUND);
    mSelectedPaint.setColor(COLOR_SELECTED);

    mNumberPaint = new Paint();
    mNumberPaint.setAntiAlias(true);
    mNumberPaint.setColor(COLOR_BLOCK_FOREGROUND);

    mSymbolPaint = new Paint(mNumberPaint);
    mSymbolPaint.setTextAlign(Paint.Align.CENTER);

    mTitlePaint = new Paint(mSymbolPaint);
    mHeaderPaint = new Paint(mSymbolPaint);
    mSmallTextPaint = new Paint(mSymbolPaint);

    mNumberPaint.setSubpixelText(true);
    mSmallTextPaint.setSubpixelText(true);

    final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.PeriodicTableView, defStyle, 0);

    mTitle = a.getText(R.styleable.PeriodicTableView_title);
    setFgColor(a.getColor(R.styleable.PeriodicTableView_fgColor, COLOR_DEFAULT_FOREGROUND));
    setBgColor(a.getColor(R.styleable.PeriodicTableView_bgColor, COLOR_DEFAULT_BACKGROUND));

    a.recycle();

    mLegend = new PeriodicTableLegend(context);

    mScaleGestureDetector = new ScaleGestureDetector(context, getOnScaleGestureListener());
    mGestureDetector = new GestureDetector(context, getOnGestureListener());

    mZoomer = new Zoomer(context);
    mScroller = new Scroller(context);

    mEdgeEffectLeft = new EdgeEffectCompat(context);
    mEdgeEffectTop = new EdgeEffectCompat(context);
    mEdgeEffectRight = new EdgeEffectCompat(context);
    mEdgeEffectBottom = new EdgeEffectCompat(context);

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
        mAccessibilityDelegate = new AccessibilityDelegate(this);
        ViewCompat.setAccessibilityDelegate(this, mAccessibilityDelegate);
    }
}

From source file:com.melodigm.post.widget.HorizontalListView.java

public HorizontalListView(Context context, AttributeSet attrs) {
    super(context, attrs);
    if (!isInEditMode()) {
        mEdgeGlowLeft = new EdgeEffectCompat(context);
        mEdgeGlowRight = new EdgeEffectCompat(context);
        mGestureDetector = new GestureDetector(context, mGestureListener);
        bindGestureDetector();//  w  ww.j  a  v  a  2s. c  o m
        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);
        }
    }
}