1. Technical Field
The present disclosure relates to pictures changing technology and, particularly, to an apparatus and a method capable of switching displayed pictures in response to slide gestures.
2. Description of the Related Art
Mobile terminals are usually employed to display pictures. A user can drag a picture displayed on a touch display screen of the mobile terminal to a direction to change the picture to a target picture. However, if the user drags the displayed picture too quickly, more pictures than the user wants have been changed, in which condition the user has to drag the displayed picture to an opposite direction to return to the target picture, which is inconvenient for the user. Therefore, there is room for improvement within the art.
The components in the drawings are not necessarily drawn to scale, the emphasis instead being placed icon clearly illustrating the principles of the disclosure. Moreover, in the drawing, like reference numerals designate corresponding parts throughout the several views.
The storage unit 11 is configured for storing a plurality of pictures. The control unit 18 is configured for controlling the display screen 12 to display the plurality of pictures in a predetermined arrangement in a window 100 provided by the display screen 12. When one of the plurality of pictures displayed is touched by a finger of a user to be zoomed in, the control unit 18 controls the display screen 12 to display only the current picture in the window 100. The size of the current picture labeled with capital B shown in
The touch detecting unit 13 is configured for detecting a slide gesture by the user on the display screen 12, and further determining a sliding direction of the detected slide gesture. The touch determining unit 14 is configured for selecting a target picture from the pictures according to the determined sliding direction. In detail, the touch determining unit 14 determines the target picture to be a picture before the current picture when the sliding direction is left to right or up to down. The touch determining unit 14 determines the target picture to be a picture next the current picture when the sliding direction is right to left or down to up. The picture processing unit 17 is configured for controlling moving the current picture on the display screen 12 along the sliding direction toward a first edge 101 of the display screen 12 in response to the slide gesture such that a portion thereof adjacent to the first edge is moved out of the display screen 12, and controlling moving a portion of the target picture into the display screen 12 from an opposite second edge 102 thereof along the sliding direction in response to the slide gesture.
The control unit 18 determines whether the ratio S calculated is equal to or greater than a predetermined ratio. In the embodiment, the predetermined ratio is 1/2. When the ratio S is equal to or greater than the predetermined ratio, the control unit 18 generates a first picture obtaining signal. The picture processing unit 17 obtains the target picture in response to the first picture obtaining signal, and controls the display screen 12 to only display the obtained target picture.
For example, when the target picture is the picture labeled with capital A before the current picture B, the picture processing unit 17 determines the distance D by adding the distance d1 to the distance d2. The calculating unit 15 calculates the ratio S between the distance D and the width value W, namely, (d1+d2)/W. The control unit 18 determines the ratio S calculated is equal to or greater than the predetermined ratio.
When the ratio S is smaller than the predetermined ratio, the control unit 18 remains displaying the current picture B on the window 100.
When the display screen 12 displays the obtained target picture, the time calculating unit 16 is configured for calculating a time duration T of the slide gesture from the touch beginning position P to the touch ending touch position P′. The control unit 18 determines whether the time duration T calculated is smaller than a predetermined time period.
When the time duration T is smaller than the predetermined time period, the control unit 18 generates a second picture obtaining signal. The picture processing unit 17 obtains the current picture B in response to the second picture obtaining signal, and controls the display screen 12 to redisplay only the current picture (as shown in
When the time duration T calculated is equal to or greater than the predetermined time period, the control unit 18 remains displaying the target picture on the window 100.
Referring to
In step S400, the control unit 18 controls the display screen 12 to display the current picture on the display screen 12, the current picture being zoomed in so as to have a size larger than the size of the display screen 12, which results in portion of the current picture out of the display screen 12.
In step S401, the touch detecting unit 13 detects a slide gesture by a user on the display screen 12, and determines a sliding direction of the detected slide gesture. The touch determining unit 14 selects a target picture according to the determined sliding direction.
In detail, the touch determining unit 14 selects the target picture to be a picture before the current picture when the sliding direction is left to right or up to down. The touch determining unit 14 selects the target picture to be a picture next the current picture when the sliding direction is right to left or down to up.
In step S402, the picture processing unit 17 controls moving the current picture on the display screen 12 along the sliding direction toward a first edge 101 of the display screen 12 in response to the slide gesture, and displays a portion of the target picture on the display screen 12 in response to the slide gesture.
In step S403, the touch detecting unit 13 determines whether further detects any touch position after a predetermined time period interval elapses, if yes, the procedure goes to step S404, otherwise, the procedure returns to step S401.
In step S404, the touch determining unit 14 determines the distance d2 between a touch beginning position P and a touch ending position P′ of a trace of the slide gesture. The picture processing unit 17 determines the distance d1 between the first edge 101 of the display screen 12 and a side of the current picture B parallel with and adjacent to the first edge prior to the slide gesture by the user.
The distance d1 between the right side of the current picture B and the first edge 101 of the window 100 is equal to the distance d1 between the left side of the current picture B and the second edge 102 of the window 100.
In step S405, the picture processing unit 17 obtains the width value W of the current picture B, and determines a distance D between the side of the current picture and the first edge of the display screen 12 after completion of the slide gesture.
In step S406, the calculating unit 15 calculates the ratio S of the distance D to the width value W.
In step S407, the control unit 18 determines whether the ratio S calculated is equal to or greater than a predetermined ratio. If yes, the procedure goes to step S408, otherwise, the procedure goes to step S411.
In step S408, the control unit 18 generates the first picture obtaining signal, the picture processing unit 17 obtains the target picture in response to the first picture obtaining signal, and controls the display screen 12 to only display the obtained target picture.
In step S409, the time calculating time 16 calculates a time duration T of the slide gesture from the touch beginning position P to the touch ending position P′. The control unit 18 determines whether the time duration T calculated is smaller than a predetermined time period, if yes, the procedure goes to step S410, otherwise, the procedure ends.
In step S410, the control unit 18 generates the second picture obtaining signal. The picture processing unit 17 obtains the current picture in response to the second picture obtaining signal, and controls the display screen 12 to redisplay only the current picture. Then, the procedure ends.
In step S411, the control unit 18 remains displaying the current picture on the displaying unit 12. Then, the procedure ends.
It is understood that the present disclosure may be embodied in other forms without departing from the spirit thereof. Thus, the present examples and embodiments are to be considered in all respects as illustrative and not restrictive, and the disclosure is not to be limited to the details given herein.
Number | Date | Country | Kind |
---|---|---|---|
2012103654272 | Sep 2012 | CN | national |