[android-developers] Emulate Gmail's Fragment System

2012-07-10 Thread William Swartzendruber
Gmail on tablets has a system where top level fragments can be pushed off the screen to make room for a new one. Or the fragment on the very left can hide itself when switching to portrait mode, but reappear when going back to landscape mode. How is this done? What classes are used to

Re: [android-developers] Emulate Gmail's Fragment System

2012-07-10 Thread Kostya Vasilyev
The stock email app does something similar, it's available in the source repository under packages/apps/Email. It uses a special layout view with an animation that drives layout changes via requestLayout / onLayout. Other than that, a particularly smooth way to slide a fragment on or off the