Code example for EdgeEffectCompat

0
        mFlingVelocity = vc.getScaledMinimumFlingVelocity();
 
        mScroller = ScrollerCompat.create(context);
 
        mTopEdge = new EdgeEffectCompat(context);
        mBottomEdge = new EdgeEffectCompat(context);
        setWillNotDraw(false);
        setClipToPadding(false);
    } 
 
    /** 
     * Set a fixed number of columns for this grid. Space will be divided evenly among all columns, respecting the item margin between columns. The default is 
     * 2. (If it were 1, perhaps you should be using a {@link android.widget.ListView ListView}.) 
     * 
     * @param colCount Number of columns to display. 
     * @see #setMinColumnWidth(int) 
     */ 
    public void setColumnCount(int colCount) {
        if (colCount < 1 && colCount != COLUMN_COUNT_AUTO) {
            throw new IllegalArgumentException("Column count must be at least 1 - received " + colCount);