@Override protected void onDraw(Canvas canvas) { if (rect == null) { rect = new UIRectangle(); } rect.width = getWidth(); rect.height = getHeight(); panel.paintPanel(graphics, rect); }
protected void onLayout(boolean changed, int left, int top, int right, int bottom) { panel.layout(right - left, bottom - top); }