问题描述
more |= drawChild(canvas, child, drawingTime); // 这个是什么符号 ? 或,等于?--------------------------------------------- @Override protected void dispatchDraw(Canvas canvas){ ... for (int i = 0; i < count; i++) { final View child = children[getChildDrawingOrder(count, i)]; if ((child.mViewFlags & VISIBILITY_MASK) == VISIBLE || child.getAnimation() != null) { more |= drawChild(canvas, child, drawingTime); } } } protected boolean drawChild(Canvas canvas, View child, long drawingTime) { ... child.computeScroll(); ... } 这是一段安卓的代码
解决方案
这个是 boolean类型的或运算boolean a = true;boolean b = false;a|=b;//相当于a=a|b& 是与运算^异或运算a&=b;a^=b;
时间: 2024-09-14 04:09:39