Code example for View

Methods: invalidate

0
 
    public void setMode(ModifyMode mode) {
 
        if (mode != mMode) {
            mMode = mode;
            mContext.invalidate();
        } 
    } 
 
    // Determines which edges are hit by touching at (x, y). 
    public int getHit(float x, float y) {
 
        Rect r = computeLayout();
        final float hysteresis = 20F;
        int retval = GROW_NONE;
 
        if (mCircle) {
            float distX = x - r.centerX();
            float distY = y - r.centerY();
            int distanceFromCenter =