1. Technical Field
The present disclosure relates to pictures changing technology and, particularly, to an apparatus and 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 enlarged, 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 from left to right or from 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 from right to left or from 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 the first edge 101 of the display screen 12 in response to the slide gesture such that a portion thereof adjacent to the first edge 101 is moved out of the display screen 12, and controlling moving a portion of the target picture into the display screen 12 from the 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 smaller than a predetermined ratio. In the embodiment, the predetermined ratio is ½. 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 position P′.
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 whether the ratio S calculated is smaller than the predetermined ratio.
When the ratio value S is smaller than the predetermined ratio, the control unit 18 remains displaying the current picture B on the window 100. When the ratio S is equal to or greater than the predetermined ratio, the control unit 18 further determines whether the time duration T calculated is smaller than a predetermined time period.
When the ratio S is equal to or greater than the predetermined ratio and the time duration T is smaller than the predetermined time period, the control unit 18 generates a picture reducing signal. The picture processing unit 17 reduces the current picture B in response to the picture reducing signal, and controls the display screen 12 to display only the reduced picture whose size is smaller than the size of the window 100 (as shown in
When the ratio S is equal to or greater than the predetermined ratio and the time duration T is equal to or greater than the predetermined time period, the control unit 18 generates a picture changing signal. The picture processing unit 17 obtains the target picture from the storage unit 11 in response to the picture changing signal, and controls the display screen 12 to display only the target picture.
In step S500, the control unit 18 controls the display screen 12 to display the current picture on the display screen 12, the current picture being enlarged so as to have a size is 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 S501, 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 from left to right or from 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 from right to left or from down to up.
In step S502, the picture processing unit 17 controls to move 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 S503, the touch detecting unit 13 determines whether further detects any touch position after a predetermined time interval elapses, if yes, the procedure goes to step S504, otherwise, the procedure returns to step S501.
In step S504, 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 side of the current picture B and the first edge 101 of the window 100 is equal to the distance d1 between the other side of the current picture B and the second edge 102 of the window 100.
In step S505, the picture processing unit 17 obtains width value W of the current picture B, and determines the 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 S506, the calculating unit 15 calculates the ratio S of the distance D to the width value W.
In step S507, 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 S508, otherwise, the procedure goes to step S511.
In step S508, the time calculating unit 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 equal to or greater than a predetermined time period, if yes, the procedure goes to step S509, otherwise, the procedure goes to step S510.
In step S509, the control unit 18 generates a picture changing signal. The picture processing unit 17 obtains the target picture from the storage unit 11 in response to the picture changing signal, and controls the display screen 12 to only display the obtained target picture. Then, the procedure ends.
In step S510, the control unit 18 generates a picture reducing signal. The picture processing unit 17 reduces the current picture in response to the picture reducing signal, and controls the display screen 12 to display only the reduced current picture.
In step S511, the control unit 18 remains displaying only the current picture B on the display screen 12.
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 |
---|---|---|---|
2012103654287 | Sep 2012 | CN | national |