I’m trying to achieve the effect that is part of the android google talk application on the chat window.
The effect is that there is a static top and bottom, but you can swipe between the various open chats that you have.
in other words, I’m trying to design a screen where there’s a static section on top and on the bottom and a dynamic part in the center, think of a gallery app, where it shows you the title on top, a “show next image” button on the bottom and a picture in the center that gets replaced with the same transition you would see when switching between activities, only difference is that instead of an image, I need a more complex layout to be replaced in the center (a couple of text views and an image)
How should I go about doing that?
I thought about animations but it seems too complicated, and I thought about fragments but i don’t know if it’s supported on all versions or not and I also thought of drawing in runtime using the inflater but that doesnt let me do the “next activity” effect.
Try the
ViewFlipperclass. It’s what you’re looking for. Here are some examples:http://android-pro.blogspot.com/2010/09/using-view-flipper-in-android.html
http://www.androidpeople.com/android-viewflipper-example/