当前位置: 首页>>代码示例>>Java>>正文


Java MotionEventCompat.ACTION_POINTER_INDEX_MASK属性代码示例

本文整理汇总了Java中android.support.v4.view.MotionEventCompat.ACTION_POINTER_INDEX_MASK属性的典型用法代码示例。如果您正苦于以下问题:Java MotionEventCompat.ACTION_POINTER_INDEX_MASK属性的具体用法?Java MotionEventCompat.ACTION_POINTER_INDEX_MASK怎么用?Java MotionEventCompat.ACTION_POINTER_INDEX_MASK使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在android.support.v4.view.MotionEventCompat的用法示例。


在下文中一共展示了MotionEventCompat.ACTION_POINTER_INDEX_MASK属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: isInputStreamGZIPCompressed

public static boolean isInputStreamGZIPCompressed(PushbackInputStream inputStream) throws
        IOException {
    boolean z = true;
    if (inputStream == null) {
        return false;
    }
    byte[] signature = new byte[2];
    int readStatus = inputStream.read(signature);
    inputStream.unread(signature);
    int streamHeader = (signature[0] & 255) | ((signature[1] << 8) & MotionEventCompat
            .ACTION_POINTER_INDEX_MASK);
    if (!(readStatus == 2 && 35615 == streamHeader)) {
        z = false;
    }
    return z;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:16,代码来源:AsyncHttpClient.java

示例2: c

Fallback c(String str) {
    Fallback fallbacksByHost = HostManager.getInstance().getFallbacksByHost(str, false);
    if (!fallbacksByHost.b()) {
        i.a(new o(this, str));
    }
    this.d = 0;
    try {
        byte[] address = InetAddress.getByName(fallbacksByHost.f).getAddress();
        this.d = address[0] & 255;
        this.d |= (address[1] << 8) & MotionEventCompat.ACTION_POINTER_INDEX_MASK;
        this.d |= (address[2] << 16) & 16711680;
        this.d = ((address[3] << 24) & -16777216) | this.d;
    } catch (UnknownHostException e) {
    }
    return fallbacksByHost;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:16,代码来源:l.java

示例3: onSecondaryPointerUp

private void onSecondaryPointerUp(MotionEvent ev) {
    int pointerIndex = (ev.getAction() & MotionEventCompat.ACTION_POINTER_INDEX_MASK) >> 8;
    if (ev.getPointerId(pointerIndex) == mActivePointerId) {
        int newPointerIndex = pointerIndex == 0 ? 1 : 0;
        mLastMotionY = ev.getY(newPointerIndex);
        mActivePointerId = ev.getPointerId(newPointerIndex);
    }
}
 
开发者ID:yangchong211,项目名称:YCEventConflict,代码行数:8,代码来源:PullToZoomListView.java

示例4: decode

public static byte[] decode(String code) {
    if (code == null) {
        return null;
    }
    int len = code.length();
    if (len % 4 != 0) {
        throw new IllegalArgumentException("Base64 string length must be 4*n");
    } else if (code.length() == 0) {
        return new byte[0];
    } else {
        int pad = 0;
        if (code.charAt(len - 1) == LetvUtils.CHARACTER_EQUAL) {
            pad = 0 + 1;
        }
        if (code.charAt(len - 2) == LetvUtils.CHARACTER_EQUAL) {
            pad++;
        }
        int retLen = ((len / 4) * 3) - pad;
        byte[] ret = new byte[retLen];
        for (int i = 0; i < len; i += 4) {
            int j = (i / 4) * 3;
            int tmp = (((_$6699[code.charAt(i)] << 18) | (_$6699[code.charAt(i + 1)] << 12)) | (_$6699[code.charAt(i + 2)] << 6)) | _$6699[code.charAt(i + 3)];
            ret[j] = (byte) ((16711680 & tmp) >> 16);
            if (i < len - 4) {
                ret[j + 1] = (byte) ((tmp & MotionEventCompat.ACTION_POINTER_INDEX_MASK) >> 8);
                ret[j + 2] = (byte) (tmp & 255);
            } else {
                if (j + 1 < retLen) {
                    ret[j + 1] = (byte) ((tmp & MotionEventCompat.ACTION_POINTER_INDEX_MASK) >> 8);
                }
                if (j + 2 < retLen) {
                    ret[j + 2] = (byte) (tmp & 255);
                }
            }
        }
        return ret;
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:38,代码来源:LetvBase64.java

示例5: setBarrageBackgroundColor

public void setBarrageBackgroundColor(int alpha, int color) {
    if (alpha < 0) {
        alpha = 0;
    }
    int b = color & 255;
    int g = (MotionEventCompat.ACTION_POINTER_INDEX_MASK & color) >> 8;
    int r = (16711680 & color) >> 16;
    LogInfo.log("fornia", "直播弹幕信息 r" + r + "|g" + g + "|b" + b);
    setBackgroundColor(Color.argb(alpha, r, g, b));
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:10,代码来源:LiveInterpretBarrageView.java

示例6: cmykFromRgb

public static float[] cmykFromRgb(int rgbColor) {
    int red = (16711680 & rgbColor) >> 16;
    int green = (MotionEventCompat.ACTION_POINTER_INDEX_MASK & rgbColor) >> 8;
    int blue = rgbColor & 255;
    float black = Math.min(1.0f - (((float) red) / 255.0f), Math.min(1.0f - (((float) green) / 255.0f), 1.0f - (((float) blue) / 255.0f)));
    float cyan = 1.0f;
    float magenta = 1.0f;
    float yellow = 1.0f;
    if (black != 1.0f) {
        cyan = ((1.0f - (((float) red) / 255.0f)) - black) / (1.0f - black);
        magenta = ((1.0f - (((float) green) / 255.0f)) - black) / (1.0f - black);
        yellow = ((1.0f - (((float) blue) / 255.0f)) - black) / (1.0f - black);
    }
    return new float[]{cyan, magenta, yellow, black};
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:15,代码来源:ScrollUtils.java

示例7: onSecondaryPointerUp

private void onSecondaryPointerUp(MotionEvent ev) {
    int pointerIndex = (ev.getAction() & MotionEventCompat.ACTION_POINTER_INDEX_MASK) >> 8;
    if (ev.getPointerId(pointerIndex) == this.mActivePointerId) {
        int newPointerIndex = pointerIndex == 0 ? 1 : 0;
        this.mMotionX = (int) ev.getX(newPointerIndex);
        this.mMotionY = (int) ev.getY(newPointerIndex);
        this.mMotionCorrection = 0;
        this.mActivePointerId = ev.getPointerId(newPointerIndex);
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:10,代码来源:AbsHListView.java

示例8: onSecondaryPointerUp

private void onSecondaryPointerUp(MotionEvent ev) {
    int pointerIndex = (ev.getAction() & MotionEventCompat.ACTION_POINTER_INDEX_MASK) >> 8;
    if (MotionEventCompat.getPointerId(ev, pointerIndex) == this.mActivePointerId) {
        int newPointerIndex = pointerIndex == 0 ? 1 : 0;
        this.mLastMotionY = (int) MotionEventCompat.getY(ev, newPointerIndex);
        this.mActivePointerId = MotionEventCompat.getPointerId(ev, newPointerIndex);
        if (this.mVelocityTracker != null) {
            this.mVelocityTracker.clear();
        }
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:11,代码来源:NestedScrollView.java

示例9: onSecondaryPointerUp

private void onSecondaryPointerUp(MotionEvent ev) {
    final int pointerIndex = (ev.getAction() & MotionEventCompat.ACTION_POINTER_INDEX_MASK)
            >> MotionEventCompat.ACTION_POINTER_INDEX_SHIFT;
    final int pointerId = ev.getPointerId(pointerIndex);
    if (pointerId == mActivePointerId) {
        final int newPointerIndex = pointerIndex == 0 ? 1 : 0;
        mLastMotionY = (int) ev.getY(newPointerIndex);
        mActivePointerId = ev.getPointerId(newPointerIndex);
        if (mVelocityTracker != null) {
            mVelocityTracker.clear();
        }
    }
}
 
开发者ID:ccrama,项目名称:Slide-RSS,代码行数:13,代码来源:NestedWebView.java

示例10: mixAlpha

public static int mixAlpha(int i, int i2) {
    int i3 = i >>> 24;
    return ((((255 - i3) * (i2 & 255)) + (i3 * (i & 255))) / 255) | ((((((((16711680 & i) >>>
            16) * i3) + (((16711680 & i2) >>> 16) * (255 - i3))) / 255) << 16) | -16777216) |
            ((((((MotionEventCompat.ACTION_POINTER_INDEX_MASK & i) >>> 8) * i3) + ((255 - i3)
                    * ((MotionEventCompat.ACTION_POINTER_INDEX_MASK & i2) >>> 8))) / 255) <<
                    8));
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:8,代码来源:BitmapHelper.java

示例11: onSecondaryPointerUp

private void onSecondaryPointerUp(MotionEvent ev) {
    int pointerIndex = (ev.getAction() & MotionEventCompat.ACTION_POINTER_INDEX_MASK) >> 8;
    if (ev.getPointerId(pointerIndex) == this.mActivePointerId) {
        int newPointerIndex = pointerIndex == 0 ? 1 : 0;
        this.mMotionX = (int) ev.getX(newPointerIndex);
        this.mMotionY = (int) ev.getY(newPointerIndex);
        this.mActivePointerId = ev.getPointerId(newPointerIndex);
        if (this.mVelocityTracker != null) {
            this.mVelocityTracker.clear();
        }
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:12,代码来源:PLA_AbsListView.java

示例12: ZipLong

public ZipLong(byte[] bArr, int i) {
    this.a = ((long) (bArr[i + 3] << 24)) & 4278190080L;
    this.a += (long) ((bArr[i + 2] << 16) & 16711680);
    this.a += (long) ((bArr[i + 1] << 8) & MotionEventCompat.ACTION_POINTER_INDEX_MASK);
    this.a += (long) (bArr[i] & 255);
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:6,代码来源:ZipLong.java

示例13: ZipShort

public ZipShort(byte[] bArr, int i) {
    this.a = (bArr[i + 1] << 8) & MotionEventCompat.ACTION_POINTER_INDEX_MASK;
    this.a += bArr[i] & 255;
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:4,代码来源:ZipShort.java

示例14: reverseBytesShort

public static short reverseBytesShort(short s) {
    int i = s & 65535;
    return (short) (((MotionEventCompat.ACTION_POINTER_INDEX_MASK & i) >>> 8) | ((i & 255) << 8));
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:4,代码来源:Util.java

示例15: reverseBytesInt

public static int reverseBytesInt(int i) {
    return ((((-16777216 & i) >>> 24) | ((16711680 & i) >>> 8)) | ((MotionEventCompat.ACTION_POINTER_INDEX_MASK & i) << 8)) | ((i & 255) << 24);
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:3,代码来源:Util.java


注:本文中的android.support.v4.view.MotionEventCompat.ACTION_POINTER_INDEX_MASK属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。