Public Methods |
Void |
Abortanimation () Stop the animation. Unlike forcefinished (Boolean), terminating the animation will cause the scroll to move to the final position of X and Y. |
Boolean |
Computescroloffset () Call this method when you want to know the latest rolling position. If this method returns true, the animation is still in progress. The location is changed by the new location. |
Void |
Extendduration (INT extend) Extend the scroll animation. Calling this method will make the animation scroll farther and longer than setting the setfinalx (INT) or setfinaly (INT) method. Parameter: extend, in milliseconds, with an additional scroll time. |
Void |
Filing (INT startx, int starty, int velocity, int velocity, int Minx, int Maxx, int miny, int maxyy) Start rolling processing based on the touch gesture. The scroll distance is determined based on the initial rate of the scroll. Parameters: Start Point of startx scrolling (X) Start Point of starty rolling (y) Velocityx, measured in pixels/second, measures the initial moving rate of the X axis. Velocityy is measured in pixels per second. The initial fl speed of the Y axis is measured. The smallest X-axis value of minx. The scroll cannot scroll through this point. The maximum X-axis value of Maxx. The scroll cannot scroll through this point. The smallest Y axis value of miny. The scroll cannot scroll through this point. The maximum Y axis value of Maxy. The scroll cannot scroll through this point. |
Final void |
Forcefinished (Boolean finished) Specify a special value for the finished field. Parameter: Finished, specifying a new finished value. |
Float |
Getcurrvelocity () Returns the current rate. Return Value: the initial rate minus the decreasing speed. The result can be a negative value. |
Final int |
Getcurrx () Returns the x-axis offset in the current scroll. Return Value: The new X-axis offset is the absolute distance relative to the origin. |
Final int |
Getcurry () Returns the Y axis offset in the current scroll. Return Value: The New Y axis offset is the absolute distance relative to the origin. |
Final int |
Getduration () Return the time required for rolling in milliseconds. Return Value: the duration of rolling. |
Final int |
Getfinalx () Returns the position of the x-axis scroll end, which is only valid for the "Fling" type scroll. Return Value: The final absolute offset distance from the X axis of the origin. |
Final int |
Getfinaly () Returns the position of the end of the Y-axis rolling, which is only valid for the "Fling" type rolling. Return Value: The final absolute offset distance from the Y axis of the origin. |
Final int |
Getstartx () Returns the starting point of the X axis. Return Value: the start point offset, which is the absolute distance from the X axis of the origin. |
Final int |
Getstarty () Returns the starting point of the Y axis. Return Value: the start point offset, which is the absolute distance from the Y axis of the origin. |
Final Boolean |
Isfinised () Returns whether the rolling process of the scroll is complete. Return Value: If the rolling process is completed, true is returned. Otherwise, false is returned. |
Void |
Setfinalx (INT newx) Set the x-axis end point of the scroll. Parameter: the absolute distance between the X axis of newx and the origin. |
Void |
Setfinaly (INT newy) Set the end point of the Y axis of the scroll. Parameter: absolute distance between newy and Y axes |
Final void |
Setfriction (float friction) Sets the friction applied to the "Fling" gesture. Call the getscrollfriction () method to obtain the default value. Parameter: Friction indicates the scalar scale value of the friction coefficient. |
Void |
Startscroll (INT startx, int starty, int dx, int Dy) You can start the rolling process by providing the start point and stroke distance. The default value 250 ms is used for the rolling duration. Parameters: In pixels, startx sets the horizontal scroll offset, and the positive value will scroll to the left. In pixels, starty sets the vertical scroll offset, and the positive value will scroll up the content. DX horizontal travel. The positive value will scroll to the left Dy vertical stroke. The positive value will scroll up the content |
Void |
Startscroll (INT startx, int starty, int dx, int dy, int duration) Start the rolling process by providing the start point and stroke. Parameters: In pixels, startx sets the horizontal scroll offset, and the positive value will scroll to the left. In pixels, starty sets the vertical scroll offset, and the positive value will scroll up the content. DX horizontal travel. The positive value will scroll to the left Dy vertical stroke. The positive value will scroll up the content The duration is set in milliseconds. |
Int |
Timepassed () Returns the elapsed time after the rolling process starts. Return Value: the time when the scrolling disappears, in milliseconds. |