Stacked tab navigation - view measurement issue
On pre ICS when I have 2 or 4 stacked tabs whose content width should not require scrolling within the tab container, there always seems to be a 1 pixel offset in the internal IcsLinearLayout which enables scrolling and the overscroll indicator. There is no problem when there are 3 tabs.

This is easily reproducable in the ABS sample app (Feature Toggles or Tab Navigation with 2 tabs).

This probably due to the 1px divider we add. We don't modify the children's measurements at all. Le sigh.
Thanks for the quick response. Why was it working on older builds which had the divider as well?
This is probably my fault. The code doesn't account for margins when finding the largest child (getMeasuredWidth() doesn't include this when the measure phase is done, right?), whereas the framework does.
For a quick fix I subtracted "n-1" (n being the number of tabs) in the useLargestChildHorizontal() call. Thought I'd share :+1:
@Jon4thanGarcia That would only work on MDPI and HDPI devices since the divider is 2px wide on XHDPI.
@JakeWharton Even if I put my own custom 1px divider?
Jon4thanGarcia did it work with a 1px divider?