在ShortcutAndWidgetContainer.java中的dispatchDraw方法中做出如下修改:
@Override protected void dispatchDraw(Canvas canvas) { @SuppressWarnings("all") // suppress dead code warning final boolean debug = true; if (debug) { // Debug drawing for hit space Paint p = new Paint(); // p.setColor(0x6600FF00); for (int i = getChildCount() - 1; i >= 0; i--) { final View child = getChildAt(i); final CellLayout.LayoutParams lp = (CellLayout.LayoutParams) child.getLayoutParams(); if (child instanceof BubbleTextView) { if (i == 0 || i == 5) { canvas.drawBitmap(b1, (lp.x + lp.width / 2) - (b1.getWidth() / 2), lp.y + lp.height / 2, p); } else if (i == 1 || i == 6) { canvas.drawBitmap(b2, (lp.x + lp.width / 2) - (b2.getWidth() / 2), lp.y + lp.height / 2, p); } else if (i == 2 || i == 7) { canvas.drawBitmap(b3, (lp.x + lp.width / 2) - (b3.getWidth() / 2), lp.y + lp.height / 2, p); } else if (i == 3 || i == 8) { canvas.drawBitmap(b4, (lp.x + lp.width / 2) - (b4.getWidth() / 2), lp.y + lp.height / 2, p); } else if (i == 4 || i == 9) { canvas.drawBitmap(b5, (lp.x + lp.width / 2) - (b5.getWidth() / 2), lp.y + lp.height / 2, p); } } } } super.dispatchDraw(canvas); }