android.view.ViewConfiguration#getMaximumFlingVelocity ( )源码实例Demo

下面列出了android.view.ViewConfiguration#getMaximumFlingVelocity ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: StockChart-MPAndroidChart   文件: Utils.java
/**
 * initialize method, called inside the Chart.init() method.
 *
 * @param context
 */
@SuppressWarnings("deprecation")
public static void init(Context context) {

    if (context == null) {
        // noinspection deprecation
        mMinimumFlingVelocity = ViewConfiguration.getMinimumFlingVelocity();
        // noinspection deprecation
        mMaximumFlingVelocity = ViewConfiguration.getMaximumFlingVelocity();

        Log.e("MPChartLib-Utils"
                , "Utils.init(...) PROVIDED CONTEXT OBJECT IS NULL");

    } else {
        ViewConfiguration viewConfiguration = ViewConfiguration.get(context);
        mMinimumFlingVelocity = viewConfiguration.getScaledMinimumFlingVelocity();
        mMaximumFlingVelocity = viewConfiguration.getScaledMaximumFlingVelocity();

        Resources res = context.getResources();
        mMetrics = res.getDisplayMetrics();
    }
}
 
源代码2 项目: Ticket-Analysis   文件: Utils.java
/**
 * initialize method, called inside the Chart.init() method.
 *
 * @param context
 */
@SuppressWarnings("deprecation")
public static void init(Context context) {

    if (context == null) {
        // noinspection deprecation
        mMinimumFlingVelocity = ViewConfiguration.getMinimumFlingVelocity();
        // noinspection deprecation
        mMaximumFlingVelocity = ViewConfiguration.getMaximumFlingVelocity();

        Log.e("MPChartLib-Utils"
                , "Utils.init(...) PROVIDED CONTEXT OBJECT IS NULL");

    } else {
        ViewConfiguration viewConfiguration = ViewConfiguration.get(context);
        mMinimumFlingVelocity = viewConfiguration.getScaledMinimumFlingVelocity();
        mMaximumFlingVelocity = viewConfiguration.getScaledMaximumFlingVelocity();

        Resources res = context.getResources();
        mMetrics = res.getDisplayMetrics();
    }
}
 
源代码3 项目: Virtualview-Android   文件: PageView.java
public PageView(Context context) {
    super(context);

    mCurPos = 0;

    mAutoSwitchHandler = new Handler() {
        @Override
        public void handleMessage(Message msg) {
            if (MSG_AUTO_SWITCH == msg.what) {
                autoSwitch();
            }
        }
    };

    mMaxVelocity = ViewConfiguration.getMaximumFlingVelocity();
}
 
源代码4 项目: android-kline   文件: Utils.java
/**
 * initialize method, called inside the Chart.init() method.
 *
 * @param context
 */
@SuppressWarnings("deprecation")
public static void init(Context context) {

    if (context == null) {
        // noinspection deprecation
        mMinimumFlingVelocity = ViewConfiguration.getMinimumFlingVelocity();
        // noinspection deprecation
        mMaximumFlingVelocity = ViewConfiguration.getMaximumFlingVelocity();

        Log.e("MPChartLib-Utils"
                , "Utils.init(...) PROVIDED CONTEXT OBJECT IS NULL");

    } else {
        ViewConfiguration viewConfiguration = ViewConfiguration.get(context);
        mMinimumFlingVelocity = viewConfiguration.getScaledMinimumFlingVelocity();
        mMaximumFlingVelocity = viewConfiguration.getScaledMaximumFlingVelocity();

        Resources res = context.getResources();
        mMetrics = res.getDisplayMetrics();
    }
}
 
源代码5 项目: iMoney   文件: Utils.java
/**
 * initialize method, called inside the Chart.init() method.
 * 
 * @param res
 */
@SuppressWarnings("deprecation")
public static void init(Context context) {

    if (context == null) {
        // noinspection deprecation
        mMinimumFlingVelocity = ViewConfiguration.getMinimumFlingVelocity();
        // noinspection deprecation
        mMaximumFlingVelocity = ViewConfiguration.getMaximumFlingVelocity();

        Log.e("MPAndroidChart, Utils.init(...)", "PROVIDED CONTEXT OBJECT IS NULL");

    } else {
        ViewConfiguration viewConfiguration = ViewConfiguration.get(context);
        mMinimumFlingVelocity = viewConfiguration.getScaledMinimumFlingVelocity();
        mMaximumFlingVelocity = viewConfiguration.getScaledMaximumFlingVelocity();

        Resources res = context.getResources();
        mMetrics = res.getDisplayMetrics();
    }
}
 
源代码6 项目: Stayfit   文件: Utils.java
/**
 * initialize method, called inside the Chart.init() method.
 *
 * @param context
 */
@SuppressWarnings("deprecation")
public static void init(Context context) {

    if (context == null) {
        // noinspection deprecation
        mMinimumFlingVelocity = ViewConfiguration.getMinimumFlingVelocity();
        // noinspection deprecation
        mMaximumFlingVelocity = ViewConfiguration.getMaximumFlingVelocity();

        Log.e("MPChartLib-Utils"
                , "Utils.init(...) PROVIDED CONTEXT OBJECT IS NULL");

    } else {
        ViewConfiguration viewConfiguration = ViewConfiguration.get(context);
        mMinimumFlingVelocity = viewConfiguration.getScaledMinimumFlingVelocity();
        mMaximumFlingVelocity = viewConfiguration.getScaledMaximumFlingVelocity();

        Resources res = context.getResources();
        mMetrics = res.getDisplayMetrics();
    }
}
 
源代码7 项目: NetKnight   文件: Utils.java
/**
 * initialize method, called inside the Chart.init() method.
 *
 * @param context
 */
@SuppressWarnings("deprecation")
public static void init(Context context) {

    if (context == null) {
        // noinspection deprecation
        mMinimumFlingVelocity = ViewConfiguration.getMinimumFlingVelocity();
        // noinspection deprecation
        mMaximumFlingVelocity = ViewConfiguration.getMaximumFlingVelocity();

        Log.e("MPChartLib-Utils"
                , "Utils.init(...) PROVIDED CONTEXT OBJECT IS NULL");

    } else {
        ViewConfiguration viewConfiguration = ViewConfiguration.get(context);
        mMinimumFlingVelocity = viewConfiguration.getScaledMinimumFlingVelocity();
        mMaximumFlingVelocity = viewConfiguration.getScaledMaximumFlingVelocity();

        Resources res = context.getResources();
        mMetrics = res.getDisplayMetrics();
    }
}
 
源代码8 项目: JNChartDemo   文件: Utils.java
/**
 * initialize method, called inside the Chart.init() method.
 *
 * @param context
 */
@SuppressWarnings("deprecation")
public static void init(Context context) {

    if (context == null) {
        // noinspection deprecation
        mMinimumFlingVelocity = ViewConfiguration.getMinimumFlingVelocity();
        // noinspection deprecation
        mMaximumFlingVelocity = ViewConfiguration.getMaximumFlingVelocity();

        Log.e("MPChartLib-Utils"
                , "Utils.init(...) PROVIDED CONTEXT OBJECT IS NULL");

    } else {
        ViewConfiguration viewConfiguration = ViewConfiguration.get(context);
        mMinimumFlingVelocity = viewConfiguration.getScaledMinimumFlingVelocity();
        mMaximumFlingVelocity = viewConfiguration.getScaledMaximumFlingVelocity();

        Resources res = context.getResources();
        mMetrics = res.getDisplayMetrics();
    }
}
 
源代码9 项目: Telegram-FOSS   文件: GestureDetector2.java
private void init(Context context) {
    if (mListener == null) {
        throw new NullPointerException("OnGestureListener must not be null");
    }
    mIsLongpressEnabled = true;

    int touchSlop, doubleTapSlop, doubleTapTouchSlop;
    if (context == null) {
        touchSlop = ViewConfiguration.getTouchSlop();
        doubleTapTouchSlop = touchSlop;
        doubleTapSlop = 100;
        mMinimumFlingVelocity = ViewConfiguration.getMinimumFlingVelocity();
        mMaximumFlingVelocity = ViewConfiguration.getMaximumFlingVelocity();
    } else {
        final ViewConfiguration configuration = ViewConfiguration.get(context);
        touchSlop = configuration.getScaledTouchSlop();
        doubleTapTouchSlop = configuration.getScaledTouchSlop();
        doubleTapSlop = configuration.getScaledDoubleTapSlop();
        mMinimumFlingVelocity = configuration.getScaledMinimumFlingVelocity();
        mMaximumFlingVelocity = configuration.getScaledMaximumFlingVelocity();
    }
    mTouchSlopSquare = touchSlop * touchSlop;
    mDoubleTapTouchSlopSquare = doubleTapTouchSlop * doubleTapTouchSlop;
    mDoubleTapSlopSquare = doubleTapSlop * doubleTapSlop;
}
 
源代码10 项目: Telegram   文件: GestureDetector2.java
private void init(Context context) {
    if (mListener == null) {
        throw new NullPointerException("OnGestureListener must not be null");
    }
    mIsLongpressEnabled = true;

    int touchSlop, doubleTapSlop, doubleTapTouchSlop;
    if (context == null) {
        touchSlop = ViewConfiguration.getTouchSlop();
        doubleTapTouchSlop = touchSlop;
        doubleTapSlop = 100;
        mMinimumFlingVelocity = ViewConfiguration.getMinimumFlingVelocity();
        mMaximumFlingVelocity = ViewConfiguration.getMaximumFlingVelocity();
    } else {
        final ViewConfiguration configuration = ViewConfiguration.get(context);
        touchSlop = configuration.getScaledTouchSlop();
        doubleTapTouchSlop = configuration.getScaledTouchSlop();
        doubleTapSlop = configuration.getScaledDoubleTapSlop();
        mMinimumFlingVelocity = configuration.getScaledMinimumFlingVelocity();
        mMaximumFlingVelocity = configuration.getScaledMaximumFlingVelocity();
    }
    mTouchSlopSquare = touchSlop * touchSlop;
    mDoubleTapTouchSlopSquare = doubleTapTouchSlop * doubleTapTouchSlop;
    mDoubleTapSlopSquare = doubleTapSlop * doubleTapSlop;
}
 
源代码11 项目: StockChart-MPAndroidChart   文件: Utils.java
/**
 * initialize method, called inside the Chart.init() method. backwards
 * compatibility - to not break existing code
 *
 * @param res
 */
@Deprecated
public static void init(Resources res) {

    mMetrics = res.getDisplayMetrics();

    // noinspection deprecation
    mMinimumFlingVelocity = ViewConfiguration.getMinimumFlingVelocity();
    // noinspection deprecation
    mMaximumFlingVelocity = ViewConfiguration.getMaximumFlingVelocity();
}
 
源代码12 项目: remoteyourcam-usb   文件: GestureDetector.java
public GestureDetector(Context context, GestureHandler gestureHandler) {
    this.gestureHandler = gestureHandler;
    DisplayMetrics metrics = context.getResources().getDisplayMetrics();
    pixelScaling = metrics.density;
    minimumFlingVelocity = ViewConfiguration.getMinimumFlingVelocity();
    maximumFlingVelocity = ViewConfiguration.getMaximumFlingVelocity();
}
 
源代码13 项目: Ticket-Analysis   文件: Utils.java
/**
 * initialize method, called inside the Chart.init() method. backwards
 * compatibility - to not break existing code
 *
 * @param res
 */
@Deprecated
public static void init(Resources res) {

    mMetrics = res.getDisplayMetrics();

    // noinspection deprecation
    mMinimumFlingVelocity = ViewConfiguration.getMinimumFlingVelocity();
    // noinspection deprecation
    mMaximumFlingVelocity = ViewConfiguration.getMaximumFlingVelocity();
}
 
源代码14 项目: android-kline   文件: Utils.java
/**
 * initialize method, called inside the Chart.init() method. backwards
 * compatibility - to not break existing code
 *
 * @param res
 */
@Deprecated
public static void init(Resources res) {

    mMetrics = res.getDisplayMetrics();

    // noinspection deprecation
    mMinimumFlingVelocity = ViewConfiguration.getMinimumFlingVelocity();
    // noinspection deprecation
    mMaximumFlingVelocity = ViewConfiguration.getMaximumFlingVelocity();
}
 
源代码15 项目: iMoney   文件: Utils.java
/**
 * initialize method, called inside the Chart.init() method. backwards
 * compatibility - to not break existing code
 *
 * @param res
 */
@Deprecated
public static void init(Resources res) {

    mMetrics = res.getDisplayMetrics();

    // noinspection deprecation
    mMinimumFlingVelocity = ViewConfiguration.getMinimumFlingVelocity();
    // noinspection deprecation
    mMaximumFlingVelocity = ViewConfiguration.getMaximumFlingVelocity();
}
 
源代码16 项目: Stayfit   文件: Utils.java
/**
 * initialize method, called inside the Chart.init() method. backwards
 * compatibility - to not break existing code
 *
 * @param res
 */
@Deprecated
public static void init(Resources res) {

    mMetrics = res.getDisplayMetrics();

    // noinspection deprecation
    mMinimumFlingVelocity = ViewConfiguration.getMinimumFlingVelocity();
    // noinspection deprecation
    mMaximumFlingVelocity = ViewConfiguration.getMaximumFlingVelocity();
}
 
源代码17 项目: NetKnight   文件: Utils.java
/**
 * initialize method, called inside the Chart.init() method. backwards
 * compatibility - to not break existing code
 *
 * @param res
 */
@Deprecated
public static void init(Resources res) {

    mMetrics = res.getDisplayMetrics();

    // noinspection deprecation
    mMinimumFlingVelocity = ViewConfiguration.getMinimumFlingVelocity();
    // noinspection deprecation
    mMaximumFlingVelocity = ViewConfiguration.getMaximumFlingVelocity();
}
 
源代码18 项目: JNChartDemo   文件: Utils.java
/**
 * initialize method, called inside the Chart.init() method. backwards
 * compatibility - to not break existing code
 *
 * @param res
 */
@Deprecated
public static void init(Resources res) {

    mMetrics = res.getDisplayMetrics();

    // noinspection deprecation
    mMinimumFlingVelocity = ViewConfiguration.getMinimumFlingVelocity();
    // noinspection deprecation
    mMaximumFlingVelocity = ViewConfiguration.getMaximumFlingVelocity();
}
 
源代码19 项目: remoteyourcam-usb   文件: GestureDetector.java
public GestureDetector(Context context, GestureHandler gestureHandler) {
    this.gestureHandler = gestureHandler;
    DisplayMetrics metrics = context.getResources().getDisplayMetrics();
    pixelScaling = metrics.density;
    minimumFlingVelocity = ViewConfiguration.getMinimumFlingVelocity();
    maximumFlingVelocity = ViewConfiguration.getMaximumFlingVelocity();
}
 
源代码20 项目: Virtualview-Android   文件: SliderView.java
public SliderView(Context context) {
    super(context);
    mMaxVelocity = ViewConfiguration.getMaximumFlingVelocity();
}