3

I'm wondering how when you open a new Fragment, you can have the view shift so that the new Fragment is centered in your view. In the Honeycomb Gmail app we see this when you select an email to open. The list of emails that you can open shifts to the left side of the screen and the email contents is then shown on the right. How do make this shift happen? Thanks.

N J
  • 27,217
  • 13
  • 76
  • 96
Joshua Sutherland
  • 1,256
  • 4
  • 16
  • 30
  • I wrote an answer for this over [in this question](http://stackoverflow.com/questions/7339498/fragment-animation-like-gmail-honeycomb-app/9787742#9787742) – Jonas Kalderstam Mar 20 '12 at 13:34

1 Answers1

2

You need to animate the Fragment. Check out the following resources:

N J
  • 27,217
  • 13
  • 76
  • 96
crafty
  • 2,730
  • 1
  • 21
  • 10
  • If your team has a list of possible blog post topics, I'd add one that covers applying these animation effects as part of fragment transactions, which (I presume) is what's happening in Gmail. I looked at this stuff a while back and it made my head hurt, so I was hoping for a smidge of guidance before I dive back in... :-) – CommonsWare Sep 09 '11 at 12:55
  • Ive just stumbled across this post, and I am trying to achieve a similar effect. What I presume is happening, is there are either two activities, which apply fade and slide animations when an email is clicked, or one activity which contains two "container" fragments. When an email is clicked, fade and slide animations are called, and the second container is loaded – Mimminito Mar 16 '12 at 14:34