Viewpager have you studied the following effects?

Source: Internet
Author: User

1:viewpager Implementing the Welcome page animation effect

Viewpager implementation of the Welcome page animation Sliding Switch View effect, the page switch to add beautiful animation,

Main code implementation

public void Animatesecondscreenclock (float position) {

if (mcurrentdirection = = Path.Direction.CCW) {
Mcurrentdirection = Path.Direction.CW;
Animpath.reset ();
Initnewpath (Path.Direction.CW);
Invalidate ();
}

if (Math.Abs (position) > 1) {
Mdistance = MPATHLENGTH/2 * (math.abs (position));
} else {

Mdistance = MPATHLENGTH/2 * (math.abs (position));
}
Invalidate ();
}

public void Animatesecondscreenanticlock (float position) {

if (mcurrentdirection = = Path.Direction.CW) {
Mcurrentdirection = Path.Direction.CCW;
Initnewpath (Path.Direction.CCW);
Invalidate ();
}

if (Math.Abs (position) > 1) {

} else {

Mdistance = MPATHLENGTH/2 * (math.abs (1 + position));
}
Invalidate ();


}

650) this.width=650; "src=" Http://www.itlanbao.com/code/users/10000/20151123/2015112310044822178543.gif "alt=" 2015112310044822178543.gif "/>

This project from: http://www.itlanbao.com/code/20151010/10000/100571.html

///////////////

2:viewpager Toggle Add Animation effect

Viewpager Toggle Add animation effect, this project mainly has three kinds of switching effects,
(1): Depthpagetransformer effect
(2): Rotatedownpagetransformer rotation When each view is switched
(3): Zoomoutpagetransformer effect
Main implementation code:
Mviewpager.setpagetransformer (True,new Zoomoutpagetransformer ());
Mviewpager.setpagetransformer (True,new Rotatedownpagetransformer ());
Mviewpager.setpagetransformer (True,new Depthpagetransformer ());
These three sentences achieve these three effects, each of which is encapsulated and can be used directly.

650) this.width=650; "src=" Http://www.itlanbao.com/code/users/10000/20151123/2015112310024633578039.gif "alt=" 2015112310024633578039.gif "/>

Source of this project: http://www.itlanbao.com/code/20151111/10000/100638.html




Viewpager have you studied the following effects?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.