In its latest versions of its applications, Google has implemented a pretty cool way to scroll between tabs and clicking on the title bar. I was wondering if anyone has any more specific ideas on how this is done.
Here are some thoughts - feel free to criticize:
My initial thought is that this is not a standard TabActivityin which child actions are hosted. Infact, I don’t even think it’s a custom ActivityGroup. A series of tabs scrolls when scrolling, but does not switch the active tab.
Scrolling through the main contents of a tab shows an interesting behavior. I suspect there is a GestureListener in the main content area. As you scroll through the tabs, rows from the adjacent tab become visible. This seems to suggest that this is a horizontally scrollable group ListViews. It almost looks like a horizontal scrollable HTML div where all the content already exists but appears in view when it scrolls. I'm not sure how the rendering of strings is handled (traditionally strings are built and displayed when scrolling up / down the list not on the left and right). So maybe this is a regular implementation ListViewtoo? If you don't scroll side by side, this behaves the way you would expect regular ListView, including quick scrolling and a glow effect when removed.
The row of tabs is probably equal ScrollView, as evidenced by the glow effect when it sweeps along the edges. Tab row content is missing.
I am trying to create a mental model of the various parts that make up this really great piece of the user interface. Any ideas are greatly appreciated.
source
share