A brief introduction to Viewconfiguration in Android

Source: Internet
Author: User


Android.view.ViewConfiguration
Contains methods to standard constants used in the UI for timeouts, sizes, and distances.

Common methods:

Viewconfiguration.get (GetContext ()). Getscaledtouchslop ()Official Description:Distance in PixelsA touch can wander before we think the user is scrolling

The maximum value that the user's finger can move before being judged to scroll.


In addition, Viewconfiguration also has the following "constants"

/** * contains methods and standard constants to set the UI's timeout, size, and distance */public class Viewconfiguration {//Set horizontal scrollbar width and vertical scrollbar height, in pixels px private s        tatic Final int scroll_bar_size = 10;        Defines the time that the scrollbar gradually disappears, in milliseconds private static final int scroll_bar_fade_duration = 250;        The default scroll bar disappears after a few seconds, in milliseconds private static final int scroll_bar_default_delay = 300;        Defines the length of the fade in the Edge place private static final int fading_edge_length = 12;            Define persistent events for child controls pressed state private static final int pressed_state_duration = 125;            Define a pressed state to transition growth by state transition time private static final int long_press_timeout = 500;            Defines the duration for the user to press and hold the appropriate button to pop up the global dialog box private static final int global_actions_key_timeout = 500;            Defines the time required for a touch event to be a click event or a sliding event, if the user slides within this time, then it is considered a click event private static final int tap_timeout = 115; /** * Defines the duration in milliseconds we'll wait to see if a touch event * was a jump tap. If the user does not complete the jump tap within this interval,It's * considered to be a tap. *///define a touch event when it is a click event.        If the user does not complete this click within this time, then it is considered a click event private static final int jump_tap_timeout = 500;            Defines the time interval for double-click events private static final int double_tap_timeout = 300;        Defines the time for a zoom control feedback to the user interface private static final int zoom_controls_timeout = 3000;  /** * Inset in pixels-for-touchable content when the user touches the edge of the screen */private            static final int edge_slop = 12; /** * Distance A touch can wander before we think the user is scrolling in pixels */private static final I            NT Touch_slop = 16;      /** * Distance A touch can wander before we think the user is attempting a paged scroll * (in dips) */            private static final int paging_touch_slop = Touch_slop * 2; /** * Distance between the first touch and second touch to still be considered a double tap */private stat IC Final int Double_tap_sloP = 100; /** * Distance A touch needs to being outside of a window ' s bounds for it to * count as outside for purposes of dis      Missing the window.       */private static final int window_touch_slop = 16;            The minimum speed used to initialize the FLING, in units of how many pixels per second private static final int minimum_fling_velocity = 50;        The maximum speed used to initialize the FLING, in units of how many pixels per second private static final int maximum_fling_velocity = 4000; Maximum size of the view drawing cache, expressed in bytes. In ARGB888 format, this size should be at least equal to the size of the screen @Deprecated private static final int maximum_drawing_cache_size = 320 * 480 * 4;        HVGA screen, ARGB8888//flings and scrolls friction force size coefficient private static float scroll_friction = 0.015f;        /** * Max distance to over scroll for edge effects */private static final int overscroll_distance = 0;    /** * Max distance to over fling for edge effects */private static final int overfling_distance = 4;   }


Reference: http://blog.csdn.net/lonelyroamer/article/details/7568129




Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.