With more than 7 tabs, on Galaxy Nexus, the list doesn't scroll to show the selected tab. It stops mid-way -- like around 4 or so.
Created attachment 596873 [details] [diff] [review]
I initially felt that onWindowChanged() is called before list populates that causes this issue. Somehow the "smooth scrolling" fails, even if I move to just after requestLayout() of the container.
This patch ensures that the selected tab is shown when TabsTray displayed. This also takes care of Eclair. However, we lose the "smooth scrolling" to selected tab.
I somehow feel that there is too much animation happening -- a fade-in + drop down animation for the tray along with scrolling of the list. Without the scrolling the tabs-tray has just one animation and it doesn't seem that complex. (A better way of saying I don't have a patch for it yet ;) )
Nightly 13.0a1 (2012-02-16)
Device: Samsung Nexus S - Android 2.3.6
Verified with 8-12 tabs. Selected tab was always displayed in tab menu.