/** Updates view. Rebuilds items and label if necessary, recalculate items sizes. */ private void updateView() { if (rebuildItems()) { calculateLayoutWidth(getWidth(), MeasureSpec.EXACTLY); layout(getWidth(), getHeight()); } }
@Override protected void onLayout(boolean changed, int l, int t, int r, int b) { layout(r - l, b - t); }