开发者

Siteswitching with Android

开发者 https://www.devze.com 2023-03-09 13:05 出处:网络
At the moment i h开发者_Python百科ave big Activity with many views and now i have to switch the content.

At the moment i h开发者_Python百科ave big Activity with many views and now i have to switch the content. MUST: OnSwipe i can change between different site (it is the same activity only the content is changed)

Now i finished the Activity but i have no idea how to switch the content. Btw i have no idea what is the best way to do it?!

I thought about an ViewFlipper or an SwitchView but i am not sure if it is the best way, because i dont want to switch views or activities, i only want to switch the content of one activity.

Do you have any idea what is the best way to do this?

I hope anything i clear ennought :) Thanks


The easiest way of listening for a swipe is to use a GestureDetector, then when it calls back to your OnGestureListener with onFling() you know it is time to update your content. Does that help?


If you want to switch it onSwipe, as you've mentioned, the best way is to use ViewFlipper. Otherwise you just use setContentView().

0

精彩评论

暂无评论...
验证码 换一张
取 消