本文整理汇总了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;
}
示例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;
}
示例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);
}
}
示例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;
}
}
示例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));
}
示例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};
}
示例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);
}
}
示例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();
}
}
}
示例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();
}
}
}
示例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));
}
示例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();
}
}
}
示例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);
}
示例13: ZipShort
public ZipShort(byte[] bArr, int i) {
this.a = (bArr[i + 1] << 8) & MotionEventCompat.ACTION_POINTER_INDEX_MASK;
this.a += bArr[i] & 255;
}
示例14: reverseBytesShort
public static short reverseBytesShort(short s) {
int i = s & 65535;
return (short) (((MotionEventCompat.ACTION_POINTER_INDEX_MASK & i) >>> 8) | ((i & 255) << 8));
}
示例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);
}