Example usage for android.widget EdgeEffect EdgeEffect

List of usage examples for android.widget EdgeEffect EdgeEffect

Introduction

In this page you can find the example usage for android.widget EdgeEffect EdgeEffect.

Prototype

public EdgeEffect(Context context) 

Source Link

Document

Construct a new EdgeEffect with a theme appropriate for the provided context.

Usage

From source file:com.ruesga.timelinechart.TimelineChartView.java

private void setupEdgeEffects() {
    if (mEdgeEffectLeft == null) {
        mEdgeEffectLeft = new EdgeEffect(getContext());
    }//w  w w.  j av a  2s. co m
    if (mEdgeEffectRight == null) {
        mEdgeEffectRight = new EdgeEffect(getContext());
    }
    setupEdgeEffectColor();
}

From source file:com.hippo.widget.BothScrollView.java

@Override
public void setOverScrollMode(int mode) {
    if (mode != OVER_SCROLL_NEVER) {
        if (mEdgeGlowLeft == null) {
            Context context = getContext();
            mEdgeGlowLeft = new EdgeEffect(context);
            mEdgeGlowRight = new EdgeEffect(context);
            mEdgeGlowTop = new EdgeEffect(context);
            mEdgeGlowBottom = new EdgeEffect(context);
        }//from  ww  w.  java  2  s . c  om
    } else {
        mEdgeGlowLeft = null;
        mEdgeGlowRight = null;
        mEdgeGlowTop = null;
        mEdgeGlowBottom = null;
    }
    super.setOverScrollMode(mode);
}