if (!hasFocus () || !drawFocusRing () || focusIndex == -1) return; int [] outMetric = new int [1]; OS.GetThemeMetric (OS.kThemeMetricFocusRectOutset, outMetric); outMetric[0]--; Rect r = new Rect (), bounds = new Rect(); OS.GetControlBounds (control, bounds); Rectangle [] rects = getRectangles (focusIndex); for (int i = 0; i < rects.length; i++) { Rectangle rect = rects [i]; r.left = (short) (bounds.left + rect.x + outMetric[0]); r.top = (short) (bounds.top + rect.y + outMetric[0]); r.right = (short) (r.left + rect.width - (outMetric[0] * 2)); r.bottom = (short) (r.top + rect.height - (outMetric[0] * 2)); OS.DrawThemeFocusRect (r, true); }
void drawBackground (int control) {	drawBackground (control, background);}