質問

I've follow a tutorial for use ViewPAger widget and implement swiping view for navigate to my app. Every tutorial i've follow use justo one simple static xml file to show in each tab (i just modify a textview). I need to create a different view with different content and swipe it. How can i do?

役に立ちましたか?

解決

I am not sure if I understand your question correctly, but I think this is what you are looking for:

How to implement a ViewPager with different Fragments / Layouts

The basic idea is that you have a different Fragment class for each different layout you have. In this case, all Fragments have a TextView, but their layouts also differ in a separate background color.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top