use of com.aviary.android.feather.library.utils.ReflectionUtils.ReflectionException in project mobile-android by photo.
the class HorizontalVariableListView method initView.
/**
* Inits the view.
*/
private synchronized void initView() {
if (Build.VERSION.SDK_INT > 8) {
try {
mFlingRunnable = (IFlingRunnable) ReflectionUtils.newInstance("com.aviary.android.feather.widget.Fling9Runnable", new Class<?>[] { FlingRunnableView.class, int.class }, this, mAnimationDuration);
} catch (ReflectionException e) {
mFlingRunnable = new Fling8Runnable(this, mAnimationDuration);
}
} else {
mFlingRunnable = new Fling8Runnable(this, mAnimationDuration);
}
mLeftViewIndex = -1;
mRightViewIndex = 0;
mMaxX = Integer.MAX_VALUE;
mMinX = 0;
mChildHeight = 0;
mRightEdge = 0;
mLeftEdge = 0;
mGesture = new GestureDetector(getContext(), mGestureListener);
mGesture.setIsLongpressEnabled(false);
setFocusable(true);
setFocusableInTouchMode(true);
ViewConfiguration configuration = ViewConfiguration.get(getContext());
mTouchSlop = configuration.getScaledTouchSlop();
mDragTolerance = mTouchSlop;
mOverscrollDistance = 10;
mMaximumVelocity = configuration.getScaledMaximumFlingVelocity();
mMinimumVelocity = configuration.getScaledMinimumFlingVelocity();
}
Aggregations