List of usage examples for android.view ViewConfiguration getScaledTouchSlop
public int getScaledTouchSlop()
From source file:com.bar.origamilabs.StaggeredGridView.java
public StaggeredGridView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); if (attrs != null) { TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.StaggeredGridView); mColCount = a.getInteger(R.styleable.StaggeredGridView_numColumns_1, 2); mDrawSelectorOnTop = a.getBoolean(R.styleable.StaggeredGridView_drawSelectorOnTop_1, false); mItemMargin = (int) a.getDimension(R.styleable.StaggeredGridView_itemMargin, 0); } else {/*from w ww .j a v a2 s .com*/ mColCount = 2; mDrawSelectorOnTop = false; } final ViewConfiguration vc = ViewConfiguration.get(context); mTouchSlop = vc.getScaledTouchSlop(); mMaximumVelocity = vc.getScaledMaximumFlingVelocity(); mFlingVelocity = vc.getScaledMinimumFlingVelocity(); mScroller = ScrollerCompat.from(context); mTopEdge = new EdgeEffectCompat(context); mBottomEdge = new EdgeEffectCompat(context); setWillNotDraw(false); setClipToPadding(false); this.setFocusableInTouchMode(false); if (mSelector == null) { useDefaultSelector(); } }
From source file:com.GMS.lib.StaggeredGridView.StaggeredGridView.java
public StaggeredGridView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); if (attrs != null) { TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.StaggeredGridView); mColCount = a.getInteger(R.styleable.StaggeredGridView_numColumns, 2); mDrawSelectorOnTop = a.getBoolean(R.styleable.StaggeredGridView_drawSelectorOnTop, false); mItemMargin = (int) a.getDimension(R.styleable.StaggeredGridView_itemMargin, 2); } else {/* w ww . j a v a 2 s . c o m*/ mColCount = 2; mDrawSelectorOnTop = false; } final ViewConfiguration vc = ViewConfiguration.get(context); mTouchSlop = vc.getScaledTouchSlop(); mMaximumVelocity = vc.getScaledMaximumFlingVelocity(); mFlingVelocity = vc.getScaledMinimumFlingVelocity(); mScroller = ScrollerCompat.from(context); mTopEdge = new EdgeEffectCompat(context); mBottomEdge = new EdgeEffectCompat(context); setWillNotDraw(false); setClipToPadding(false); this.setFocusableInTouchMode(false); if (mSelector == null) { useDefaultSelector(); } }
From source file:com.example.jarida.StaggeredGridView.java
public StaggeredGridView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); if (attrs != null) { TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.StaggeredGridView); mColCount = a.getInteger(R.styleable.StaggeredGridView_numColumns, 2); mDrawSelectorOnTop = a.getBoolean(R.styleable.StaggeredGridView_drawSelectorOnTop, false); mItemMargin = (int) a.getDimension(R.styleable.StaggeredGridView_itemMargin, 0); } else {/*ww w .j av a2 s . co m*/ mColCount = 2; mDrawSelectorOnTop = false; } final ViewConfiguration vc = ViewConfiguration.get(context); mTouchSlop = vc.getScaledTouchSlop(); mMaximumVelocity = vc.getScaledMaximumFlingVelocity(); mFlingVelocity = vc.getScaledMinimumFlingVelocity(); mScroller = ScrollerCompat.from(context); mTopEdge = new EdgeEffectCompat(context); mBottomEdge = new EdgeEffectCompat(context); setWillNotDraw(false); setClipToPadding(false); this.setFocusableInTouchMode(false); if (mSelector == null) { useDefaultSelector(); } }
From source file:com.origamilabs.library.views2.StaggeredGridView.java
public StaggeredGridView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); if (attrs != null) { TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.ohsujinStaggeredGridView); mColCount = a.getInteger(R.styleable.ohsujinStaggeredGridView_ohsujinNumColumns, 2); mDrawSelectorOnTop = a.getBoolean(R.styleable.ohsujinStaggeredGridView_ohsujinDrawSelectorOnTop, false); mItemMargin = (int) a.getDimension(R.styleable.ohsujinStaggeredGridView_ohsujinItemMargin, 0); } else {//from w w w . j av a 2 s. co m mColCount = 2; mDrawSelectorOnTop = false; } final ViewConfiguration vc = ViewConfiguration.get(context); mTouchSlop = vc.getScaledTouchSlop(); mMaximumVelocity = vc.getScaledMaximumFlingVelocity(); mFlingVelocity = vc.getScaledMinimumFlingVelocity(); mScroller = ScrollerCompat.from(context); mTopEdge = new EdgeEffectCompat(context); mBottomEdge = new EdgeEffectCompat(context); setWillNotDraw(false); setClipToPadding(false); this.setFocusableInTouchMode(false); if (mSelector == null) { useDefaultSelector(); } }
From source file:com.photowall.widget.staggedGridView.ScrollStaggeredGridView.java
public ScrollStaggeredGridView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); if (attrs != null) { TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.StaggeredGridView); mColCount = a.getInteger(R.styleable.StaggeredGridView_numColumns, 2); mDrawSelectorOnTop = a.getBoolean(R.styleable.StaggeredGridView_drawSelectorOnTop, false); mItemMargin = (int) a.getDimension(R.styleable.StaggeredGridView_itemMargin, 0); } else {//w w w.j av a 2s . c o m mColCount = 2; mDrawSelectorOnTop = false; } final ViewConfiguration vc = ViewConfiguration.get(context); mTouchSlop = vc.getScaledTouchSlop(); mMaximumVelocity = vc.getScaledMaximumFlingVelocity(); mFlingVelocity = vc.getScaledMinimumFlingVelocity(); mScroller = ScrollerCompat.from(context); mTopEdge = new EdgeEffectCompat(context); mBottomEdge = new EdgeEffectCompat(context); setWillNotDraw(false); setClipToPadding(false); this.setFocusableInTouchMode(false); if (mSelector == null) { useDefaultSelector(); } }
From source file:chan.android.app.bitwise.util.StaggeredGridView.java
public StaggeredGridView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); if (attrs != null) { TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.StaggeredGridView); mColCount = a.getInteger(R.styleable.StaggeredGridView_numColumns, 2); mDrawSelectorOnTop = a.getBoolean(R.styleable.StaggeredGridView_drawSelectorOnTop, false); } else {/* w w w . j a v a 2 s.c o m*/ mColCount = 2; mDrawSelectorOnTop = false; } final ViewConfiguration vc = ViewConfiguration.get(context); mTouchSlop = vc.getScaledTouchSlop(); mMaximumVelocity = vc.getScaledMaximumFlingVelocity(); mFlingVelocity = vc.getScaledMinimumFlingVelocity(); mScroller = ScrollerCompat.from(context); mTopEdge = new EdgeEffectCompat(context); mBottomEdge = new EdgeEffectCompat(context); setWillNotDraw(false); setClipToPadding(false); this.setFocusableInTouchMode(false); if (mSelector == null) { useDefaultSelector(); } }
From source file:com.app.afteryou.ui.staggered.StaggeredGridView.java
public StaggeredGridView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); final ViewConfiguration vc = ViewConfiguration.get(context); mTouchSlop = vc.getScaledTouchSlop(); mMaximumVelocity = vc.getScaledMaximumFlingVelocity(); mFlingVelocity = vc.getScaledMinimumFlingVelocity(); mScroller = new Scroller(context); mTopEdge = new EdgeEffectCompat(context); mBottomEdge = new EdgeEffectCompat(context); setWillNotDraw(false);/*from w w w . j a v a 2 s . co m*/ setClipToPadding(false); if (attrs != null) { TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.CostomStaggeredGridView); mColCountSetting = a.getInteger(R.styleable.CostomStaggeredGridView_columnNumber, 2); mDrawSelectorOnTop = a.getBoolean(R.styleable.CostomStaggeredGridView_drawSelectorOnTop, false); if (mColCountSetting != -1) { mColCount = mColCountSetting; } mMinColWidth = a.getDimensionPixelSize(R.styleable.CostomStaggeredGridView_minColumnWidth, 0); a.recycle(); } this.setFocusableInTouchMode(false); if (mSelector == null) { useDefaultSelector(); } }
From source file:caesar.feng.framework.widget.StaggeredGrid.ExtendableListView.java
public ExtendableListView(final Context context, final AttributeSet attrs, final int defStyle) { super(context, attrs, defStyle); // setting up to be a scrollable view group setWillNotDraw(false);// w w w. ja va2s . co m setClipToPadding(false); setFocusableInTouchMode(false); final ViewConfiguration viewConfiguration = ViewConfiguration.get(context); mTouchSlop = viewConfiguration.getScaledTouchSlop(); mMaximumVelocity = viewConfiguration.getScaledMaximumFlingVelocity(); mFlingVelocity = viewConfiguration.getScaledMinimumFlingVelocity(); mRecycleBin = new RecycleBin(); mObserver = new AdapterDataSetObserver(); mHeaderViewInfos = new ArrayList<FixedViewInfo>(); mFooterViewInfos = new ArrayList<FixedViewInfo>(); // start our layout mode drawing from the top mLayoutMode = LAYOUT_NORMAL; }
From source file:mrfu.blurstaggered.lib.view.StaggeredGridView.java
public StaggeredGridView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); if (attrs != null) { TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.StaggeredGridView); mColCount = a.getInteger(R.styleable.StaggeredGridView_numColumns, 2); mDrawSelectorOnTop = a.getBoolean(R.styleable.StaggeredGridView_drawSelectorOnTop1, false); } else {/*w w w . j a v a 2s .co m*/ mColCount = 2; mDrawSelectorOnTop = false; } final ViewConfiguration vc = ViewConfiguration.get(context); mTouchSlop = vc.getScaledTouchSlop(); mMaximumVelocity = vc.getScaledMaximumFlingVelocity(); mFlingVelocity = vc.getScaledMinimumFlingVelocity(); mScroller = ScrollerCompat.from(context); mTopEdge = new EdgeEffectCompat(context); mBottomEdge = new EdgeEffectCompat(context); setWillNotDraw(false); setClipToPadding(false); this.setFocusableInTouchMode(false); if (mSelector == null) { useDefaultSelector(); } }
From source file:com.bolaa.medical.view.pulltorefreshgrid.StaggeredGridView.java
public StaggeredGridView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); if (attrs != null) { TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.StaggeredGridView); mColCount = a.getInteger(R.styleable.StaggeredGridView_numColumnsStag, 2); mDrawSelectorOnTop = a.getBoolean(R.styleable.StaggeredGridView_drawSelectorOnTopStag, false); } else {// www. j a v a 2s .c o m mColCount = 2; mDrawSelectorOnTop = false; } final ViewConfiguration vc = ViewConfiguration.get(context); mTouchSlop = vc.getScaledTouchSlop(); mMaximumVelocity = vc.getScaledMaximumFlingVelocity(); mFlingVelocity = vc.getScaledMinimumFlingVelocity(); mScroller = ScrollerCompat.from(context); mTopEdge = new EdgeEffectCompat(context); mBottomEdge = new EdgeEffectCompat(context); setWillNotDraw(false); setClipToPadding(false); this.setFocusableInTouchMode(false); if (mSelector == null) { useDefaultSelector(); } }