I'm implementing a chat application. The user is able to have multiple chats open simultaneously, and I want to allow him to switch between these chats with swiping left or right. Like eg in the gtalk app. I'm not sure what's the best way to implement this:
What do you think is the best solution, and why? Any suggestions? Thanks for your help!
I would suggest taking a look at the following Android Dev blog post about using ViewPager in the Android Compatibility Package to implement the swipe functionality you're looking for:
http://android-developers.blogspot.com/2011/08/horizontal-view-swiping-with-viewpager.html
The recommended approach is most likely to use a Fragment for the chat history and text input field as this will give you the most flexibility across devices.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.