CN106980622B - Folder processing method and device - Google Patents
Folder processing method and device Download PDFInfo
- Publication number
- CN106980622B CN106980622B CN201610031387.6A CN201610031387A CN106980622B CN 106980622 B CN106980622 B CN 106980622B CN 201610031387 A CN201610031387 A CN 201610031387A CN 106980622 B CN106980622 B CN 106980622B
- Authority
- CN
- China
- Prior art keywords
- rectangle
- width
- length
- operation object
- operation objects
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/16—File or folder operations, e.g. details of user interfaces specifically adapted to file systems
- G06F16/168—Details of user interfaces specifically adapted to file systems, e.g. browsing and visualisation, 2d or 3d GUIs
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
- Processing Or Creating Images (AREA)
Abstract
The embodiment of the invention provides a folder processing method and device, and relates to the technical field of terminals. The method comprises the following steps: determining an operation object placing area of the folder, wherein the operation object placing area is positioned in the area covered by the folder and is a rectangle N x N'; determining the number p of the operation objects which can be placed in the width direction of the rectangle on the basis of the width N 'of the rectangle, the default width M' of the operation objects, the minimum scaling coefficient K and the width interval parameter; determining an actual scaling factor K ' of the operation object based on the width N ' of the rectangle, the default width M ' of the operation object, the width interval parameter and p; determining the number q of the operation objects which can be placed in the length direction of the rectangle based on the length N of the rectangle, the default length M, K' of the operation objects and the length interval parameter; and determining the display positions of p × q operation objects in the operation object placement area based on the default sizes M ', K', the width interval parameter, the length interval parameter and p and q of the operation objects.
Description
Technical Field
The invention relates to the technical field of terminals, in particular to a folder processing method and device.
Background
With the rapid development of terminal technology, the hardware configuration of a terminal is higher and higher, and meanwhile, more and more applications and themes are applicable to the terminal, for example, when the terminal is a mobile phone, a user can select to install various applications and mobile phone themes according to own preferences, and when the user installs more applications, the user will establish different folders under the mobile phone theme to store icons of the applications in a classified manner in order to facilitate the classified management of the applications.
Since there are many types of themes, the shapes and sizes of folders in different themes are different, and the default sizes of the icons of the applications in different terminals are fixed, when a user stores the icons of the applications in a folder form, the number and sizes of the icons in the folder preview image are affected, and at this time, the icons in the folder preview image can be called operation objects. If the number and size of the operation objects placed in the folder preview are set as fixed values, when a user selects different themes, the operation objects in the folder may be too large, too small, or exceed the boundary of the folder.
Disclosure of Invention
The embodiment of the invention provides a folder processing method and device, and solves the problems that an operation object in a folder is larger, smaller or exceeds the boundary of the folder in the prior art.
In order to achieve the above purpose, the embodiment of the invention adopts the following technical scheme:
in a first aspect, a folder processing method is provided, and the method includes:
determining an operation object placing area of a folder, wherein the operation object placing area is located inside an area covered by the folder, and the operation object placing area is a rectangle N';
determining the number p of the operation objects which can be placed in the width direction of the rectangle based on the width N 'of the rectangle, the default width M' of the operation objects, the minimum scaling coefficient K and the width interval parameter;
determining an actual scaling factor K ' of the operation object based on the width N ' of the rectangle, the default width M ' of the operation object, the width interval parameter, and the p;
determining the number q of the operation objects which can be placed in the length direction of the rectangle based on the length N of the rectangle, the default length M of the operation objects, the K' and the length interval parameter;
determining the display positions of p × q operation objects in the operation object placement area based on the default size M ', the K', the width interval parameter, the length interval parameter, and the p and q of the operation objects.
The operation object placement area is used for placing operation objects included in the folder, for example, the operation objects may be icons of an application program, and the operation object placement area refers to an area of preview icons that can be placed when the folder is not opened.
The term "rectangular" as used herein means that the operation object placement area may be rectangular or square, and preferably, when the rectangle is the largest inscribed rectangle in the folder, the area of the rectangle is the largest, that is, the area of the operation object that can be placed in the operation object placement area is the largest.
The display positions of the p × q operation objects in the operation object placement area may be display coordinates of center positions of the p × q operation objects, and if coordinate axes are established at positions where the width and the length of the rectangle are located, the display coordinates of the center positions of the p × q operation objects are display coordinates of the center positions of the p × q operation objects in the width direction of the rectangle and display coordinates of the center positions of the p × q operation objects in the length direction of the rectangle.
It should be noted that the minimum scaling factor K is a minimum multiple of scaling the operation object to ensure that the operation object is not arbitrarily reduced, so as to affect the visual effect, where K may be set in advance, and K is greater than 0 and less than or equal to 1, and K may be a value obtained through multiple tests, for example, K may be 0.19, and the invention is not limited thereto.
With reference to the first aspect, in a first possible implementation manner of the first aspect, the width interval parameter includes a first interval a and a second interval b, where the first interval a is a distance between an operation object near a width edge of the rectangle and the width edge, and the second interval b is a distance between two operation objects in the width direction.
The first pitch a and the second pitch b may be set in advance, and the magnitude relationship between the first pitch a and the second pitch b is not limited, for example, the first pitch a may be 4.8px, and the second pitch b may also be 4.8px, and the specific values of a and b are not limited in the present invention.
With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the determining, based on the width N 'of the rectangle, the default width M' of the operation object, the minimum scaling factor K, and the width interval parameter, the number p of operation objects that can be placed in the width direction of the rectangle includes:
calculating to obtain p ' according to a formula (1) based on the width N ' of the rectangle, the default size M ' of the operation object, the minimum scaling coefficient K, the a and the b;
p'=(N'-2a+b)/(b+K*M') (1)
and performing rounding-down operation on the p', and determining the number p of the operation objects which can be placed in the width direction of the rectangle.
With reference to the first aspect, in a third possible implementation manner of the first aspect, the length interval parameter includes a third interval a 'and a fourth interval b', where a 'is a distance between an operation object close to a length edge of the rectangle and the length edge, and b' is a distance between two operation objects in the length direction.
The third distance a 'and the fourth distance b' may be set in advance, and the magnitude relationship between the third distance a 'and the fourth distance b' is not limited, for example, the third distance a 'may be 10.8px, and the fourth distance b' may also be 10.8 px.
With reference to the third possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, the determining, based on the length N of the rectangle, the default size M of the operation object, the K', and the length interval parameter, the number q of operation objects that can be placed in the length direction of the rectangle includes:
calculating to obtain q 'according to a formula (2) based on the length N of the rectangle, the default size M of the operation object, the K', the a 'and the b';
q'=(N-2a'+b')/(b'+K'*M) (2)
and performing rounding-down operation on the q', and determining the number q of the operation objects which can be placed in the length direction of the rectangle.
With reference to the fourth possible implementation manner of the first aspect, in a fifth possible implementation manner of the first aspect, after determining, based on the length N of the rectangle, the default length M of the operation object, the actual scaling factor K', and the length interval parameter, the number q of operation objects that can be placed in the length direction of the rectangle, the method further includes:
updating the fourth interval b ' based on the length N of the rectangle, the default size M of the operation object, the actual scaling coefficient K ', the third interval a ' and the number q of operation objects which can be placed in the length direction of the rectangle.
Since the calculated q ' is rounded down to obtain the number q of the operation objects that can be placed in the length direction of the rectangle, when the calculated q ' is not an integer, if the display position of the operation object in the rectangle is determined according to the previous length interval parameter, the operation objects placed in the length direction of the rectangle are not uniform, and therefore, the fourth interval b ' can be updated, that is, the distance between two operation objects in the length direction of the rectangle is updated, so as to further improve the user experience.
With reference to the fifth possible implementation manner of the first aspect, in a sixth possible implementation manner of the first aspect, the determining, based on the default size M 'of the operation object, the actual scaling factor K', the width interval parameter, the length interval parameter, the number p of operation objects placeable in the width direction of the rectangle, and the number q of operation objects placeable in the length direction of the rectangle, display positions of p × q operation objects in the operation object placement region includes:
determining display coordinates X of the center positions of the p X q operation objects in the width direction of the rectangle according to formula (3) based on the M ', the K', the a, the b, and the piI is more than or equal to 1 and less than or equal to p;
Xi=a+(i-1)*b+(i-0.5)*K'*M' (3)
determining display coordinates Y of the center positions of the p x q operation objects in the length direction of the rectangle according to formula (4) based on the M, the K ', the a ' and b ', and the qjJ is more than or equal to 1 and less than or equal to q;
Yj=a'+(j-1)*b'+(j-0.5)*K'*M (4)。
then, when the p × q operation objects are displayed in the operation object placement area of the file, the display coordinates X of the p × q operation objects may be usediAnd YjThe display coordinates of the p × q operation objects are (X)i,Yj) Wherein, 1 is less than or equal toP is more than or equal to i, and q is more than or equal to 1, so that the problems that the operation object in the folder is larger, smaller or exceeds the boundary of the folder and the like are solved, and the attractiveness of the folder is improved.
In a second aspect, there is provided a folder handling apparatus, the apparatus comprising:
the file folder management system comprises a first determining unit, a second determining unit and a third determining unit, wherein the first determining unit is used for determining an operation object placing area of a folder, the operation object placing area is located inside an area covered by the folder, and the operation object placing area is a rectangle N x N';
a second determining unit, configured to determine, based on the width N 'of the rectangle, the default width M' of the operation object, the minimum scaling factor K, and the width interval parameter, the number p of operation objects that can be placed in the width direction of the rectangle;
a third determining unit, configured to determine an actual scaling factor K ' of the operation object based on the width N ' of the rectangle, the default width M ' of the operation object, the width interval parameter, and the p;
a fourth determining unit, configured to determine, based on the length N of the rectangle, the default length M of the operation object, the K', and the length interval parameter, the number q of operation objects that can be placed in the length direction of the rectangle;
a fifth determining unit, configured to determine display positions of p × q operation objects in the operation object placement region based on the default size M ', the K', the width interval parameter, the length interval parameter, and the p and q of the operation object.
With reference to the second aspect, in a first possible implementation manner of the second aspect, the width interval parameter includes a first interval a and a second interval b, where a is a distance between an operation object close to a width edge of the rectangle and the width edge, and b is a distance between two operation objects in the width direction.
With reference to the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, the second determining unit is specifically configured to:
calculating to obtain p ' according to a formula (5) based on the width N ' of the rectangle, the default size M ' of the operation object, the minimum scaling coefficient K, the a and the b;
p'=(N'-2a+b)/(b+K*M') (5)
and performing rounding-down operation on the p', and determining the number p of the operation objects which can be placed in the width direction of the rectangle.
With reference to the second aspect, in a third possible implementation manner of the second aspect, the length interval parameter includes a third interval a 'and a fourth interval b', where a 'is a distance between an operation object close to a length edge of the rectangle and the length edge, and b' is a distance between two operation objects in the length direction.
With reference to the third possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, the fourth determining unit is specifically configured to:
calculating to obtain q 'according to a formula (6) based on the length N of the rectangle, the default size M of the operation object, the K', the a 'and the b';
q'=(N-2a'+b')/(b'+K'*M) (6)
and performing rounding-down operation on the q', and determining the number q of the operation objects which can be placed in the length direction of the rectangle.
With reference to the fourth possible implementation manner of the second aspect, in a fifth possible implementation manner of the second aspect, the apparatus further includes:
an updating unit, configured to update the fourth interval b ' based on the length N of the rectangle, the default size M of the operation object, the actual scaling factor K ', the third distance a ', and the q.
With reference to the fifth possible implementation manner of the second aspect, in a sixth possible implementation manner of the second aspect, the fifth determining unit is specifically configured to:
determining display coordinates X of the center positions of the p X q operation objects in the width direction of the rectangle according to formula (7) based on the M ', the K', the a, the b, and the piI is more than or equal to 1 and less than or equal to p;
Xi=a+(i-1)*b+(i-0.5)*K'*M' (7)
determining display coordinates Y of the center positions of the p x q operation objects in the length direction of the rectangle according to formula (8) based on the M, the K ', the a ' and b ', and the qjJ is more than or equal to 1 and less than or equal to q;
Yj=a'+(j-1)*b'+(j-0.5)*K'*M (8)。
the folder processing method and device provided by the embodiment of the invention determine the operation object placing area of the folder, the operation object placing area is positioned in the area covered by the folder, the operation object placing area is a rectangle N ', the number p of operation objects which can be placed in the width direction of the rectangle is determined based on the width N' of the rectangle, the default width M 'of the operation object, the minimum scaling coefficient K and the width interval parameter, the actual scaling coefficient K' of the operation objects is determined based on the width N 'of the rectangle, the default width M' of the operation object, the width interval parameter and the p, the number q of the operation objects which can be placed in the length direction of the rectangle is determined based on the length N of the rectangle, the default length M of the operation object, the K 'and the length interval parameter, and then, the operation objects are placed in the folder in the length direction based on the default size M' of the operation objects, the K', the width interval parameter, the length interval parameter and the p and q determine the display positions of p x q operation objects in the operation object placement area, so that the problems that the operation objects in the folder are too large, too small or exceed the boundary of the folder and the like are solved, and the attractiveness of the folder is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a system architecture diagram of a terminal according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a folder processing method according to an embodiment of the present invention;
fig. 3a is a schematic diagram of an operation object placement area of a folder according to an embodiment of the present invention;
FIG. 3b is a diagram of an interface for displaying an operation object of a folder according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a folder processing device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another folder processing device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
A system architecture of a terminal applied to the embodiment of the present invention is shown in fig. 1, and the terminal may be a mobile phone, a tablet Computer, a notebook Computer, a UMPC (Ultra-mobile Personal Computer), a netbook, a PDA (Personal Digital Assistant), a video camera, a camera, and the like. The embodiment of the present invention is described by taking a terminal as an example of a mobile phone, and fig. 1 is a block diagram illustrating a part of a structure of a mobile phone related to each embodiment of the present invention.
It will be understood by those skilled in the art that the structure shown in fig. 1 is merely illustrative and not limiting to the structure of the mobile phone. For example, the handset may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
As shown in fig. 1, the terminal 10 includes: memory 101, processor 102, sensor component 103, multimedia component 104, power component 105, input/output interface 106.
The various constituent elements of the terminal 10 will now be described in detail with reference to fig. 1:
The processor 102 is a control center of the terminal 10, connects various parts of the entire terminal using various interfaces and lines, performs various functions of the terminal 10 and processes data by running or executing software programs and/or modules stored in the memory 101 and calling data stored in the memory 101, thereby monitoring the entire terminal. Alternatively, processor 102 may include one or more processing units; preferably, the processor 102 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 102.
The sensor assembly 103 includes one or more sensors for providing various aspects of status assessment for the terminal 10. The sensor assembly 103 may include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor, and acceleration/deceleration, orientation, on/off state of the terminal 10, relative positioning of the components, or temperature change of the terminal 10, etc. may be detected by the sensor assembly 103. In addition, the sensor assembly 103 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications.
The multimedia component 104 provides a screen of an output interface between the terminal 10 and the user, for example, a liquid crystal display, a touch panel. When the screen is a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. The multimedia component 104 may further include a front camera and/or a rear camera. The front camera and/or the rear camera may receive external multimedia data when the terminal 10 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The power components 105 are used to provide power to the various components of the terminal 10, and the power components 105 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the terminal 10. I/o interface 106 provides an interface between processor 102 and peripheral interface modules, such as a keyboard, mouse, etc.
Although not shown, the terminal 10 may further include an audio component, a communication component, and the like, for example, the audio component includes a microphone, and the communication component includes a WiFi (wireless fidelity) module, a bluetooth module, and the like, which are not described herein again.
Fig. 2 is a folder processing method applied to a terminal according to an embodiment of the present invention, and referring to fig. 2, the method includes the following steps.
Step 201: and determining an operation object placing area of the folder, wherein the operation object placing area is positioned inside the area covered by the folder, and the operation object placing area is a rectangle N'.
Because the themes applied by the terminal are different, the sizes and the shapes of the folders under the theme are also different, and therefore, for the folders with different sizes and different shapes, an operation object placing area of the folder needs to be determined first, and the operation object placing area is a rectangle N x N'.
The operation object placing area is used for placing an operation object included in the folder, for example, an icon or an image of an application program is placed in the folder, the operation object may be an icon or an image of an application program, and the operation object placing area is an area for placing a preview icon when the folder is not opened.
The operation target placement region is a rectangle N × N', which means that the operation target placement region may be a rectangle or a square, and preferably, when the rectangle is the largest inscribed rectangle in the region of the folder, the area of the rectangle is the largest, that is, the region of the operation target that can be placed in the operation target placement region is the largest.
Step 202: and determining the number p of the operation objects which can be placed in the width direction of the rectangle based on the width N 'of the rectangle, the default width M' of the operation objects, the minimum scaling coefficient K and the width interval parameter.
Since the rectangle includes two side lengths, namely a length and a width, the side with the shorter side length is called the width of the rectangle, and the side with the longer side length is called the length of the rectangle, where it is assumed that the side length of N ' in the rectangle N × N ' is less than or equal to the side length of N, that is, N ' is the width of the rectangle.
The width interval parameter comprises a first interval a and a second interval b, wherein the first interval a is a distance between an operation object close to the width edge of the rectangle and the width edge, and the second interval b is a distance between the operation objects in two width directions.
Specifically, based on the width N 'of the rectangle, the default width M' of the operation object, the minimum scaling factor K, and the width interval parameter, the step of determining the number p of the operation objects that can be placed in the width direction of the rectangle may be: calculating to obtain p ' according to a formula (1) based on the width N ' of the rectangle, the default size M ' of the operation object, the minimum scaling coefficient K, the first distance a and the second distance b;
p'=(N'-2a+b)/(b+K*M') (1)
and performing rounding-down operation on the p', and determining the number p of the operation objects which can be placed in the width direction of the rectangle.
For example, p 'is 2.3 calculated according to formula (1), and 2 is obtained by rounding p', so that the number p of the operation objects that can be placed in the width direction of the rectangle is determined to be equal to 2.
It should be noted that the first distance a and the second distance b may be set in advance, and the present invention does not limit the size relationship between the first distance a and the second distance b, for example, the first distance a may be 4.8px, and the second distance b may also be 4.8px, and the embodiments of the present invention do not limit the specific values of a and b.
In addition, the minimum scaling factor K is a minimum multiple of scaling the operation object to ensure that the operation object is not arbitrarily scaled, so as to affect the visual effect, where K may be set in advance, and K is greater than 0 and less than or equal to 1, and K may be a numerical value obtained through multiple tests, for example, K may be 0.19, and the embodiment of the present invention is not limited thereto.
Step 203: based on the width N ' of the rectangle, the default width M ' of the operand, the width interval parameter, and said p, the actual scaling factor K ' of the operand is determined.
When the number p of the operation objects which can be placed in the width direction of the rectangle is determined, the rounding operation is performed on p ', if the display position of the operation objects in the rectangle is determined based on the minimum scaling factor K, the display of the operation objects placed in the width direction of the rectangle may be uneven, so in order to ensure the uniformity and the aesthetic property of the operation objects placed in the width direction of the rectangle, K in the formula (1) can be used as an unknown number, and the actual scaling factor K' of the operation objects can be obtained by recalculating according to the formula (1) based on the width N 'of the rectangle, the default width M' of the operation objects, the width interval parameter and the number p of the operation objects which can be placed in the width direction of the rectangle.
Step 204: and determining the number q of the operation objects which can be placed in the length direction of the rectangle based on the length N of the rectangle, the default length M of the operation objects, the K' and the length interval parameter.
The length interval parameter comprises a third interval a 'and a fourth interval b', wherein the third interval a 'is a distance between an operation object close to the length edge of the rectangle and the length edge, and the fourth interval b' is a distance between two operation objects in the length direction.
Specifically, based on the length N of the rectangle, the default length M of the operation object, the actual scaling factor K', and the length interval parameter, the operation of determining the number q of the operation objects that can be placed in the length direction of the rectangle may be: calculating to obtain q 'according to a formula (2) based on the length N of the rectangle, the default size M of the operation object, the K', the a 'and the b';
q'=(N-2a'+b')/(b'+K'*M) (2)
and performing rounding-down operation on the q', and determining the number q of the operation objects which can be placed in the length direction of the rectangle.
For example, q 'is calculated according to formula (2) to be 2.6, and q' is rounded down to obtain 2, so that the number q of the operation objects which can be placed in the length direction of the rectangle is determined to be equal to 2.
It should be noted that the third pitch a 'and the fourth pitch b' may be set in advance, and the size relationship between the third pitch a 'and the fourth pitch b' is not limited in the present invention, for example, the third pitch a 'may be 10.8px, the fourth pitch b' may also be 10.8px, and the specific values of the third pitch a 'and the fourth pitch b' are not limited in the embodiment of the present invention.
Furthermore, since the calculated q 'is rounded down to obtain the number q of the operation objects that can be placed in the length direction of the rectangle, if the display position of the operation object in the rectangle is determined according to the previous length interval parameter, the operation objects placed in the length direction of the rectangle may be uneven, and therefore, the fourth interval b' may be updated, that is, the distance between two operation objects in the length direction of the rectangle is updated, so as to further improve the user experience.
The operation of updating the fourth interval b' may be: and taking b ' in the formula (2) as an unknown number, and based on the length N of the rectangle, the default size M of the operation object, the actual scaling coefficient K ', the third distance a ' and the number q of the operation objects which can be placed in the length direction of the rectangle, re-determining a fourth interval b ' according to the formula (2), and updating the fourth interval b '.
Step 205: and determining the display positions of p × q operation objects in the operation object placement area based on the default size M ', the K', the width interval parameter, the length interval parameter and the p and q of the operation objects.
The display positions of the p × q operation objects in the operation object placement area may refer to display coordinates of center positions of the p × q operation objects, and if coordinate axes are established at positions where the width and the length of the rectangle are located, the display coordinates of the center positions of the p × q operation objects are display coordinates of the center positions of the p × q operation objects in the width direction of the rectangle and display coordinates of the center positions of the p × q operation objects in the length direction of the rectangle.
Specifically, the operation of determining the display coordinates of the center positions of the p × q operation objects in the width direction of the rectangle may be: based on the default width M ', the actual scaling coefficient K', the first distance a and the second distance b of the operation objects and the number p of the operation objects which can be placed in the width direction of the rectangle, the calculation is carried out according to the formula (3), and the display coordinates X of the center positions of p × q operation objects in the rectangle in the width direction of the rectangle are determinediI is more than or equal to 1 and less than or equal to p;
Xi=a+(i-1)*b+(i-0.5)*K'*M' (3)
specifically, the operation of determining the display coordinates of the center positions of the p × q operation objects in the longitudinal direction of the rectangle may be: based on the default length M of the operation objects, the actual scaling coefficient K ', the third distance a ' and the fourth distance b ', and the number q of the operation objects which can be placed in the length direction of the rectangle, calculating according to a formula (4), and determining the display coordinates Y of the center positions of p × q operation objects in the rectangle in the length direction of the rectanglejJ is more than or equal to 1 and less than or equal to q;
Yj=a'+(j-1)*b'+(j-0.5)*K'*M (4)。
for example, the determined operation object placement area of the folder is as shown in fig. 3a, a coordinate system is established with the lower right corner of the rectangle as the origin of coordinates, the width direction of the rectangle is taken as the horizontal axis, and the length direction of the rectangle is taken as the vertical axis, where the first pitch a, the second pitch b, the third pitch a 'and the fourth pitch b' are as shown in fig. 3 a.
Then, when the p × q operation objects are displayed in the operation object placement area of the file, the display coordinates X of the p × q operation objects may be usediAnd YjThe display coordinates of the p × q operation objects are (X)i,Yj) Wherein i is more than or equal to 1 and less than or equal to p, j is more than or equal to 1 and less than or equal to q, so that the problems that an operation object in the folder is larger, smaller or exceeds the boundary of the folder and the like are solved, and the attractiveness of the folder is improved.
For example, p is 2, q is 2, and thus p is q is 4, and the display coordinate X calculated according to the formula (3)iX1 and x2, respectively, and the display coordinate Y calculated according to the formula (4)jY1 and y 2. Thereafter, as shown in fig. 3b, when the p × q operation objects are displayed in the operation object placement area of the file, the display coordinates (x1, y1), (x2, y1), (x1, y2), (x2, y2) of the 4 operation objects may be displayed.
The folder processing method provided by the embodiment of the invention determines the operation object placing area of the folder, wherein the operation object placing area is positioned in the area covered by the folder, the operation object placing area is a rectangle N ', the number p of operation objects which can be placed in the width direction of the rectangle is determined based on the width N' of the rectangle, the default width M 'of the operation objects, the minimum scaling coefficient K and the width interval parameter, the actual scaling coefficient K' of the operation objects is determined based on the width N 'of the rectangle, the default width M' of the operation objects, the width interval parameter and the p, the number q of the operation objects which can be placed in the length direction of the rectangle is determined based on the length N of the rectangle, the default length M of the operation objects, the K 'and the length interval parameter, and then the number K' is determined based on the default size M 'of the operation objects and the default size M' of the operation objects, The width interval parameter, the length interval parameter, and the p and q determine the display positions of p × q operation objects in the operation object placement area, thereby solving the problems that the operation objects in the folder are too big or too small or exceed the boundary of the folder, and improving the aesthetic property of the folder.
Fig. 4 is a folder processing apparatus applied to a terminal according to an embodiment of the present invention, and referring to fig. 4, the folder processing apparatus includes:
a first determining unit 301, configured to determine an operation object placement area of a folder, where the operation object placement area is located inside an area covered by the folder, where the operation object placement area is a rectangle N × N';
a second determining unit 302, configured to determine, based on the width N 'of the rectangle, the default width M' of the operation object, the minimum scaling factor K, and the width interval parameter, the number p of operation objects that can be placed in the width direction of the rectangle;
a third determining unit 303, configured to determine an actual scaling factor K ' of the operation object based on the width N ' of the rectangle, the default width M ' of the operation object, the width interval parameter, and the p;
a fourth determining unit 304, configured to determine the number q of operation objects that can be placed in the length direction of the rectangle based on the length N of the rectangle, the default length M of the operation objects, the K', and the length interval parameter;
a fifth determining unit 305, configured to determine display positions of p × q operation objects in the operation object placement region based on the default size M ', the K', the width interval parameter, the length interval parameter, and the p and q of the operation object.
The operation object placing area is used for placing an operation object included in the folder, for example, an icon or an image of an application program is placed in the folder, the operation object may be an icon or an image of an application program, and the operation object placing area is an area for placing a preview icon when the folder is not opened.
The operation target placement region is a rectangle N × N', which means that the operation target placement region may be a rectangle or a square, and preferably, when the rectangle is the largest inscribed rectangle in the region of the folder, the area of the rectangle is the largest, that is, the region of the operation target that can be placed in the operation target placement region is the largest.
The display positions of the p × q operation objects in the operation object placement area may be display coordinates of center positions of the p × q operation objects, and if coordinate axes are established at positions where the width and the length of the rectangle are located, the display coordinates of the center positions of the p × q operation objects are display coordinates of the center positions of the p × q operation objects in the width direction of the rectangle and display coordinates of the center positions of the p × q operation objects in the length direction of the rectangle.
It should be noted that the minimum scaling factor K is a minimum multiple of scaling the operation object to ensure that the operation object is not arbitrarily reduced, so as to affect the visual effect, where K may be set in advance, and K is greater than 0 and less than or equal to 1, and K may be a value obtained through multiple tests, for example, K may be 0.19, and the embodiment of the present invention is not limited thereto.
Optionally, the width interval parameter includes a first interval a and a second interval b, where a is a distance between an operation object near a width edge of the rectangle and the width edge, and b is a distance between two operation objects in the width direction.
It should be noted that the first distance a and the second distance b may be set in advance, and the present invention does not limit the size relationship between the first distance a and the second distance b, for example, the first distance a may be 4.8px, the second distance b may also be 4.8px, and the present invention does not limit the specific values of the first distance a and the second distance b.
Optionally, the second determining unit is specifically configured to:
calculating to obtain p ' according to a formula (5) based on the width N ' of the rectangle, the default size M ' of the operation object, the minimum scaling coefficient K, the first distance a and the second distance b;
p'=(N'-2a+b)/(b+K*M') (5)
and performing rounding-down operation on the p', and determining the number p of the operation objects which can be placed in the width direction of the rectangle.
Optionally, the length interval parameter includes a third interval a 'and a fourth interval b', where the third interval a 'is a distance between an operation object close to the length edge of the rectangle and the length edge, and the fourth interval b' is a distance between two operation objects in the length direction.
It should be noted that the third distance a 'and the fourth distance b' may be set in advance, and the present invention does not limit the magnitude relationship between the third distance a 'and the fourth distance b', for example, the third distance a 'may be 10.8px, the fourth distance b' may also be 10.8px, and the present invention does not limit the specific values of the third distance a 'and the fourth distance b'.
Optionally, the fourth determining unit is specifically configured to:
calculating to obtain q 'according to a formula (6) based on the length N of the rectangle, the default size M of the operation object, the actual scaling coefficient K', the third distance a 'and the fourth distance b';
q'=(N-2a'+b')/(b'+K'*M) (6)
and performing rounding-down operation on the q', and determining the number q of the operation objects which can be placed in the length direction of the rectangle.
Optionally, referring to fig. 5, the apparatus further includes:
an updating unit 306, configured to update the fourth interval b ' based on the length N of the rectangle, the default size M of the operation object, the actual scaling factor K ', the third interval a ', and the number q of operation objects placeable in the length direction of the rectangle.
Optionally, the fifth determining unit is specifically configured to:
determining display coordinates X of the center positions of the p X q operation objects in the width direction of the rectangle according to a formula (7) based on the default width M 'of the operation objects, the actual scaling coefficient K', the first spacing a, the second spacing b and the number p of the operation objects which can be placed in the width direction of the rectanglei1 is not less than i is not more than p;
Xi=a+(i-1)*b+(i-0.5)*K'*M' (7)
Determining display coordinates Y of the center positions of the p x q operation objects in the length direction of the rectangle according to a formula (8) based on the default length M of the operation objects, the actual scaling coefficient K ', the third distance a ' and the fourth distance b ', and the number q of the operation objects which can be placed in the length direction of the rectanglejJ is more than or equal to 1 and less than or equal to q;
Yj=a'+(j-1)*b'+(j-0.5)*K'*M (8)。
then, when the p × q operation objects are displayed in the operation object placement area of the file, the display coordinates X of the p × q operation objects may be usediAnd YjThe display coordinates of the p × q operation objects are (X)i,Yj) Wherein i is more than or equal to 1 and less than or equal to p, j is more than or equal to 1 and less than or equal to q, so that the problems that an operation object in the folder is larger, smaller or exceeds the boundary of the folder and the like are solved, and the attractiveness of the folder is improved.
The folder processing device provided by the embodiment of the invention determines the number p of the operation objects which can be placed in the width direction of the rectangle by determining the operation object placing area of the folder, wherein the operation object placing area is positioned in the area covered by the folder, the operation object placing area is the rectangle N ', the default width M ' of the operation object, the minimum scaling coefficient K and the width interval parameter are based on the width N ' of the rectangle, the default width M ' of the operation object, the width interval parameter and the p, the actual scaling coefficient K ' of the operation object is determined, the number q of the operation objects which can be placed in the length direction of the rectangle is determined based on the length N of the rectangle, the default length M of the operation object, the K ' and the length interval parameter, and then the operation objects are placed in the folder processing device based on the default size M ' of the operation object, the K', the width interval parameter, the length interval parameter and the p and q determine the display positions of p x q operation objects in the operation object placement area, so that the problems that the operation objects in the folder are too large, too small or exceed the boundary of the folder and the like are solved, and the attractiveness of the folder is improved.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (10)
1. A method of folder processing, the method comprising:
determining an operation object placing area of a folder, wherein the operation object placing area is located inside an area covered by the folder, and the operation object placing area is a rectangle N';
determining the number p of the operation objects which can be placed in the width direction of the rectangle based on the width N 'of the rectangle, the default width M' of the operation objects, the minimum scaling coefficient K and the width interval parameter, wherein the minimum scaling coefficient K is the minimum multiple for reducing the operation objects, and K is more than 0 and less than or equal to 1;
determining an actual scaling factor K ' of the operation object based on the width N ' of the rectangle, the default width M ' of the operation object, the width interval parameter, and the p;
determining the number q of the operation objects which can be placed in the length direction of the rectangle based on the length N of the rectangle, the default length M of the operation objects, the K' and the length interval parameter;
determining the display positions of p × q operation objects in the operation object placement area based on the default size M ', the K', the width interval parameter, the length interval parameter, and the p and q of the operation objects.
2. The method of claim 1, wherein the width spacing parameter comprises a first spacing a and a second spacing b, the a being a distance between an operator near a width edge of the rectangle and the width edge, and the b being a distance between two operators in the width direction.
3. The method according to claim 2, wherein the determining the number p of the operation objects which can be placed in the width direction of the rectangle based on the width N 'of the rectangle, the default width M' of the operation objects, the minimum scaling factor K and the width interval parameter comprises:
calculating to obtain p ' according to a formula (1) based on the width N ' of the rectangle, the default width M ' of the operation object, the minimum scaling coefficient K, the a and the b;
p'=(N'-2a+b)/(b+K*M') (1)
and performing rounding-down operation on the p', and determining the number p of the operation objects which can be placed in the width direction of the rectangle.
4. The method of claim 1, wherein the length interval parameter comprises a third pitch a 'and a fourth pitch b', the a 'being a distance between an operator near a length edge of the rectangle and the length edge, and the b' being a distance between two operators in the length direction.
5. The method according to claim 4, wherein the determining the number q of the operation objects which can be placed in the length direction of the rectangle based on the length N of the rectangle, the default size M of the operation objects, the K' and the length interval parameter comprises:
calculating to obtain q 'according to a formula (2) based on the length N of the rectangle, the default size M of the operation object, the K', the a 'and the b';
q'=(N-2a'+b')/(b'+K'*M) (2)
and performing rounding-down operation on the q', and determining the number q of the operation objects which can be placed in the length direction of the rectangle.
6. The method according to claim 5, wherein after determining the number q of placeable operation objects in the length direction of the rectangle based on the length N of the rectangle, the default length M of the operation objects, the actual scaling factor K', and the length interval parameter, further comprising:
updating the fourth distance b ' based on the length N of the rectangle, the default length M of the operation object, the actual scaling coefficient K ', the third distance a ' and the q.
7. The method according to claim 6, wherein the determining display positions of p × q operation objects in the operation object placement region based on the default size M ', the K', the width interval parameter, the length interval parameter, and the p and q of the operation object comprises:
determining display coordinates X of the center positions of the p X q operation objects in the width direction of the rectangle according to formula (3) based on the M ', the K', the a, the b, and the piI is more than or equal to 1 and less than or equal to p;
Xi=a+(i-1)*b+(i-0.5)*K'*M' (3)
determining display coordinates Y of the center positions of the p x q operation objects in the length direction of the rectangle according to formula (4) based on the M, the K ', the a ' and b ', and the qjJ is more than or equal to 1 and less than or equal to q;
Yj=a'+(j-1)*b'+(j-0.5)*K'*M (4)。
8. a folder handling apparatus, the apparatus comprising:
the file folder management system comprises a first determining unit, a second determining unit and a third determining unit, wherein the first determining unit is used for determining an operation object placing area of a folder, the operation object placing area is located inside an area covered by the folder, and the operation object placing area is a rectangle N x N';
a second determining unit, configured to determine, based on the width N 'of the rectangle, the default width M' of the operation object, a minimum scaling factor K, and a width interval parameter, the number p of operation objects that can be placed in the width direction of the rectangle, where the minimum scaling factor K is a minimum multiple of scaling down the operation objects, and K is greater than 0 and less than or equal to 1;
a third determining unit, configured to determine an actual scaling factor K ' of the operation object based on the width N ' of the rectangle, the default width M ' of the operation object, the width interval parameter, and the p;
a fourth determining unit, configured to determine, based on the length N of the rectangle, the default length M of the operation object, the K', and the length interval parameter, the number q of operation objects that can be placed in the length direction of the rectangle;
a fifth determining unit, configured to determine display positions of p × q operation objects in the operation object placement region based on the default size M ', the K', the width interval parameter, the length interval parameter, and the p and q of the operation object.
9. The apparatus of claim 8, wherein the width interval parameter comprises a first distance a and a second distance b, wherein a is a distance between an operator near a width edge of the rectangle and the width edge, and wherein b is a distance between two operators in the width direction.
10. The apparatus of claim 9, wherein the length interval parameter comprises a third pitch a 'and a fourth pitch b', the a 'being a distance between an operator near a length edge of the rectangle and the length edge, and the b' being a distance between two operators in the length direction.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610031387.6A CN106980622B (en) | 2016-01-18 | 2016-01-18 | Folder processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610031387.6A CN106980622B (en) | 2016-01-18 | 2016-01-18 | Folder processing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106980622A CN106980622A (en) | 2017-07-25 |
CN106980622B true CN106980622B (en) | 2020-08-25 |
Family
ID=59340231
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610031387.6A Active CN106980622B (en) | 2016-01-18 | 2016-01-18 | Folder processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106980622B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CA2346605A1 (en) * | 2000-06-23 | 2001-12-23 | International Business Machines Corporation | Automatically scaling icons to fit a display area within a data processing system |
KR20140019914A (en) * | 2012-08-06 | 2014-02-18 | 경북대학교 산학협력단 | Electronics apparatus and method for controlling display of the same |
CN104216699A (en) * | 2013-08-07 | 2014-12-17 | 侯金涛 | Icon structure based on HTML5 and display method and system |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100481000C (en) * | 2004-09-08 | 2009-04-22 | 英业达股份有限公司 | Window and icon set system and method |
CN103941958B (en) * | 2013-01-23 | 2019-01-29 | 腾讯科技(深圳)有限公司 | A kind of method and terminal device of desktop management |
CN103218195B (en) * | 2013-04-10 | 2016-03-16 | 广东欧珀移动通信有限公司 | The display adjusting method of application program and device |
CN103927143B (en) * | 2014-04-04 | 2017-04-19 | 福建星网视易信息系统有限公司 | Method and device for adaptively adjusting interface layout on basis of screen resolution |
-
2016
- 2016-01-18 CN CN201610031387.6A patent/CN106980622B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CA2346605A1 (en) * | 2000-06-23 | 2001-12-23 | International Business Machines Corporation | Automatically scaling icons to fit a display area within a data processing system |
KR20140019914A (en) * | 2012-08-06 | 2014-02-18 | 경북대학교 산학협력단 | Electronics apparatus and method for controlling display of the same |
CN104216699A (en) * | 2013-08-07 | 2014-12-17 | 侯金涛 | Icon structure based on HTML5 and display method and system |
Also Published As
Publication number | Publication date |
---|---|
CN106980622A (en) | 2017-07-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102207861B1 (en) | Method for displaying and an electronic device thereof | |
CN108737739B (en) | Preview picture acquisition method, preview picture acquisition device and electronic equipment | |
EP3454198A1 (en) | Method and apparatus for controlling application | |
CN111641797B (en) | Video call interface display control method and device, storage medium and equipment | |
JP6401855B2 (en) | Method and apparatus for setting background of UI control, and terminal | |
JP6170626B2 (en) | Composition changing method, composition changing apparatus, terminal, program, and recording medium | |
CN111190677A (en) | Information display method, information display device and terminal equipment | |
CN111597029A (en) | Data processing method and device, electronic equipment and storage medium | |
CN110989905A (en) | Information processing method and device, electronic equipment and storage medium | |
KR102113509B1 (en) | Method for controlling a virtual keypad and an electronic device thereof | |
EP3425533A1 (en) | Displaying page | |
CN115268817A (en) | Screen-projected content display method, device, equipment and storage medium | |
EP4009624A1 (en) | Image display method, image display apparatus, and mobile terminal | |
CN109582269B (en) | Physical splicing screen display method and device and terminal equipment | |
CN109085974B (en) | Screen control method, system and terminal equipment | |
CN112055156A (en) | Preview image updating method and device, mobile terminal and storage medium | |
CN105094500A (en) | Icon placing method and device | |
EP4300275A1 (en) | Page display method and device, electronic device and storage medium | |
CN107920015B (en) | Method and device for publishing picture | |
CN106980622B (en) | Folder processing method and device | |
CN115760585A (en) | Image correction method, image correction device, storage medium and electronic equipment | |
CN104111777A (en) | Method and device for picture display | |
KR20140110556A (en) | Method for displaying object and an electronic device thereof | |
KR20130032598A (en) | Apparatus and method for controlling display size in portable terminal | |
CN110533666B (en) | Method for obtaining data block size, method and device for processing data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP01 | Change in the name or title of a patent holder | ||
CP01 | Change in the name or title of a patent holder |
Address after: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11 Patentee after: Qingdao Hisense Mobile Communication Technology Co.,Ltd. Address before: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11 Patentee before: HISENSE MOBILE COMMUNICATIONS TECHNOLOGY Co.,Ltd. |