如何刷卡变化只是一个形象,而不是整个活动 [英] How to swipe change just a image instead of a whole activity
问题描述
所以,现在我有,所以我可以刷卡它改变观点或activitys
但我怎么能做到这一点所以它只是改变了只有中间的箱子吗?随着它的声音剪辑
So right now I have it so I can swipe and it changes views or activitys but how can I do it so it just changed the middle box only? With the sound clips in it
林使这个应用程序来学习
Im making this app to learn
这是我使用的源
http://www.easyway2in.blogspot.ae/2014 /07/android-swipe-views-example.html
和我的视频
https://www.youtube.com/watch?v=qD039kXYPLM
推荐答案
而不是让 ViewPager
在 activity_main $ C的唯一项目$ C>
你应该把页眉和页脚要保留在持平activity_main
,
这样在viewpager片段只包含的中间框
instead of having the ViewPager
the only item inside activity_main
you should put the header and footer you want to remain unchanged inside activity_main
,
so that the fragments in the viewpager only contains your "middle box"
这篇关于如何刷卡变化只是一个形象,而不是整个活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!