Android uses viewflipper and gestruedetector to realize the sliding screen effect

This article illustrates how Android uses viewflipper and gestruedetector to achieve sliding screen effect. Share with you for your reference, as follows:

We have already introduced the relevant knowledge of gesturedetector. If you don't understand it, you can learn about it.

1.main.xml

Note: the layout of layout1 and layout2 is very simple, that is, there is a textview and a button, so they are not written here. It contains two special effects XML files, which are placed under RES / anim

1.push_ left_ in

2 push_ left_ out

Main category:

More readers interested in Android related content can view the special topics of this site: introduction and advanced tutorial of Android development, summary of Android multimedia operation skills (audio, video, recording, etc.), summary of Android basic components usage, summary of Android view technology, summary of Android layout skills and summary of Android control usage

I hope this article will help you in Android programming.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>