use of android.view.ViewConfiguration in project android_frameworks_base by ResurrectionRemix.
the class KeyguardAffordanceHelper method initDimens.
private void initDimens() {
final ViewConfiguration configuration = ViewConfiguration.get(mContext);
mTouchSlop = configuration.getScaledPagingTouchSlop();
mMinFlingVelocity = configuration.getScaledMinimumFlingVelocity();
mMinTranslationAmount = mContext.getResources().getDimensionPixelSize(R.dimen.keyguard_min_swipe_amount);
mMinBackgroundRadius = mContext.getResources().getDimensionPixelSize(R.dimen.keyguard_affordance_min_background_radius);
mTouchTargetSize = mContext.getResources().getDimensionPixelSize(R.dimen.keyguard_affordance_touch_target_size);
mHintGrowAmount = mContext.getResources().getDimensionPixelSize(R.dimen.hint_grow_amount_sideways);
mFlingAnimationUtils = new FlingAnimationUtils(mContext, 0.4f);
mFalsingManager = FalsingManager.getInstance(mContext);
}
use of android.view.ViewConfiguration in project CompactCalendarView by SundeepK.
the class CompactCalendarController method initScreenDensityRelatedValues.
private void initScreenDensityRelatedValues(Context context) {
if (context != null) {
screenDensity = context.getResources().getDisplayMetrics().density;
final ViewConfiguration configuration = ViewConfiguration.get(context);
densityAdjustedSnapVelocity = (int) (screenDensity * SNAP_VELOCITY_DIP_PER_SECOND);
maximumVelocity = configuration.getScaledMaximumFlingVelocity();
final DisplayMetrics dm = context.getResources().getDisplayMetrics();
multiDayIndicatorStrokeWidth = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 1, dm);
}
}
use of android.view.ViewConfiguration in project android_frameworks_base by ResurrectionRemix.
the class SwipeDismissLayout method init.
private void init(Context context) {
ViewConfiguration vc = ViewConfiguration.get(context);
mSlop = vc.getScaledTouchSlop();
mMinFlingVelocity = vc.getScaledMinimumFlingVelocity();
TypedArray a = context.getTheme().obtainStyledAttributes(com.android.internal.R.styleable.Theme);
mIsWindowNativelyTranslucent = a.getBoolean(com.android.internal.R.styleable.Window_windowIsTranslucent, false);
a.recycle();
}
use of android.view.ViewConfiguration in project UltimateAndroid by cymcsg.
the class FlipViewController method init.
private void init(Context context, int orientation) {
ViewConfiguration configuration = ViewConfiguration.get(getContext());
touchSlop = configuration.getScaledTouchSlop();
this.flipOrientation = orientation;
setupSurfaceView(context);
}
use of android.view.ViewConfiguration in project UltimateAndroid by cymcsg.
the class FlipView method init.
private void init() {
final Context context = getContext();
final ViewConfiguration configuration = ViewConfiguration.get(context);
mScroller = new Scroller(context, flipInterpolator);
mTouchSlop = configuration.getScaledPagingTouchSlop();
mMinimumVelocity = configuration.getScaledMinimumFlingVelocity();
mMaximumVelocity = configuration.getScaledMaximumFlingVelocity();
mShadowPaint.setColor(Color.BLACK);
mShadowPaint.setStyle(Style.FILL);
mShadePaint.setColor(Color.BLACK);
mShadePaint.setStyle(Style.FILL);
mShinePaint.setColor(Color.WHITE);
mShinePaint.setStyle(Style.FILL);
}
Aggregations