CN117032851A - Display method of chessboard layout object, electronic equipment and readable storage medium - Google Patents

Display method of chessboard layout object, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN117032851A
CN117032851A CN202310798469.3A CN202310798469A CN117032851A CN 117032851 A CN117032851 A CN 117032851A CN 202310798469 A CN202310798469 A CN 202310798469A CN 117032851 A CN117032851 A CN 117032851A
Authority
CN
China
Prior art keywords
distance
sliding
objects
screen
speed
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.)
Pending
Application number
CN202310798469.3A
Other languages
Chinese (zh)
Inventor
成曦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202310798469.3A priority Critical patent/CN117032851A/en
Publication of CN117032851A publication Critical patent/CN117032851A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04883Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application provides a display method of an object in a chessboard layout, electronic equipment and a readable storage medium, wherein in the method, the electronic equipment can control the object in the chessboard layout to continue to slide by a certain distance after a finger of a user leaves a screen besides sliding the object based on sliding operation of the user, so that the user is prevented from causing sliding but stopping feeling, the user has better operation feeling, and the user experience is improved. In addition, when the object stops sliding, the center position of the object closest to the center position of the screen can be overlapped with the center position of the screen, so that the problem that the user feels that the position of the object deviates is avoided, and the user experience can be improved.

Description

Display method of chessboard layout object, electronic equipment and readable storage medium
Technical Field
The embodiment of the application relates to the technical field of terminals, in particular to a display method of objects in a chessboard layout, electronic equipment and a readable storage medium.
Background
As electronic devices develop, the layout of objects displayed by the electronic devices is also gradually diversified. By taking an application icon with an object as a desktop display as an example, the layout of the application icon of the electronic device such as a watch, a bracelet and the like at present can be a list style or a chessboard style, and various layouts can meet the requirements of different users.
When a user operates the objects in the chessboard layout, the objects in the chessboard layout slide based on the operation of the user, and the display mode is single.
Disclosure of Invention
The embodiment of the application provides a display method of objects in a chessboard layout, electronic equipment and a readable storage medium, which are applied to the technical field of terminals, can enrich the display of the objects in the chessboard layout and improve the user experience.
In a first aspect, an embodiment of the present application provides a method for displaying an object in a checkerboard layout. The method comprises the following steps: the electronic device displays a first interface, wherein the first interface comprises a plurality of objects in a chessboard layout, and the central position of a first object in the plurality of objects is overlapped with the central position of a screen of the electronic device. In response to an operation to slide the objects, the electronic device controls the plurality of objects to slide a first distance toward the first direction. In the embodiment of the application, a plurality of objects in a chessboard layout can be slid based on the sliding operation of a user.
In the embodiment of the application, when the sliding operation is finished, the electronic device can control the objects to slide a second distance towards a second direction. At the end of the sliding, the electronic device may display a second interface including a plurality of objects of a checkerboard layout, a center position of a second object of the plurality of objects overlapping a center position of the screen.
In the embodiment of the application, when the sliding operation is finished, the electronic equipment can also control the objects in the chessboard layout to continue to slide by a certain distance in an inertial manner, so that the user is prevented from feeling that the sliding is stopped, the user has better operation feeling, and the user experience is improved. In addition, when the object stops sliding, the center position of the object closest to the center position of the screen can be overlapped with the center position of the screen, so that the problem that the user feels that the position of the object deviates is avoided, and the user experience can be improved.
In one possible implementation, when the first direction includes one direction, the second direction is the same as the first direction; when the first direction includes at least one direction, the second direction is a sliding direction at the end of a sliding operation.
In this implementation, the electronic device may determine a second direction in which the control object continues to inertial slide.
In one possible implementation, the electronic device may further obtain the second distance before controlling the plurality of objects to slide the second distance toward the second direction when the sliding operation is finished. The electronic device may acquire a sliding speed at the end of the sliding operation, where when the sliding speed is greater than or equal to a speed threshold, the electronic device may acquire the second distance according to the sliding speed at the end of the sliding operation. When the sliding speed is smaller than the speed threshold, the electronic device may not acquire the second distance, but directly determine a third object with the sliding operation end closest to the central position of the screen, and display a third interface, where the central position of the third object in the third interface overlaps the central position of the screen.
In one possible implementation, the sliding speed at the end of the sliding operation includes a speed of an X-axis and a speed of a Y-axis, and the second distance includes a distance of the X-axis and a distance of the Y-axis. The electronic equipment can acquire the distance of the X axis according to the speed of the X axis; and acquiring the distance of the Y axis according to the speed of the Y axis.
In this implementation manner, the electronic device may determine whether the control object continues to inertially slide for the second distance based on the sliding speed when the sliding operation is finished, where when the sliding speed when the sliding operation is finished is greater, the electronic device may control the object to continue inertially slide for the second distance based on the speed, so as to avoid causing a feeling of sliding and stopping for the user, so that the user has better operation feeling, and user experience is improved. When the sliding speed is smaller when the sliding operation is finished, the user hardly perceives that the object continues inertial sliding, so that the electronic device can directly display the second interface without controlling the object to continue inertial sliding, and the central position of the second object is enabled to overlap with the central position of the screen, and the workload of the electronic device can be reduced.
In one possible implementation, when the sliding operation is finished, the electronic device may determine a third object closest to a center position of the screen, and calculate a limiting distance, which is a maximum distance by which the plurality of objects slide toward the second direction, according to the center position of the third object and the grid, toward a direction opposite to the second direction. For example, the electronic device may score a line in a direction opposite to the sliding direction at the end of the sliding operation with the center position of the third object as a starting point, the line and the mesh may be selected at an intersection point, and the electronic device may use a distance between the center position of the third object and the intersection point as a limiting distance.
After acquiring the second distance and the limiting distance, the electronic device may further determine a third distance according to the limiting distance and the second distance. Wherein when the second distance is less than or equal to the limit distance, the second distance is taken as the third distance; and when the second distance is larger than the limiting distance, taking the limiting distance as the third distance.
In one possible implementation, after determining the third distance, the electronic device may control the plurality of objects to slide the third distance toward the second direction.
In this implementation, the electronic device may calculate the object continuation inertial sliding limit distance according to the third object closest to the center position of the screen at the end of the sliding operation, the sliding direction at the end of the sliding operation, and the grid. The electronic equipment can determine the third distance for the object to continue sliding based on the second distance and the limiting distance, and the embodiment of the application can avoid the inertial sliding of the object in the chessboard layout from exceeding the display range of the screen, generate a large number of blank areas on the screen and improve the viewing experience of the user.
In one possible implementation, the electronic device may display the second interface after the electronic device controls the plurality of objects to continue to inertially slide a third distance as the user's finger leaves the screen. After the inertial sliding is finished, the electronic device enables the object at the center position of the screen to overlap with the center position of the screen, and a user perceives position jump of the object and experiences the user poorly.
Therefore, in the embodiment of the present application, after determining the third distance, the electronic device may determine the fourth object closest to the target position, where the target position is a position that is away from the center position of the screen by the third distance. The electronic device may acquire a fourth distance from the center position of the fourth object to the center position of the screen. The electronic device may generate an inertial sliding motion effect according to the fourth distance, and play the inertial sliding motion effect.
It should be understood that, in this implementation, when the sliding speed at the end of the sliding operation is less than the speed threshold, the electronic device may not acquire the second distance, limit the distance, and determine the third distance, but directly determine the third object whose sliding operation is ended closest to the center position of the screen, display the third interface in which the center position of the third object overlaps the center position of the screen.
In some embodiments, the electronic device may obtain a duration of the inertial sliding motion according to the fourth distance, and determine a number of image frames included in the inertial sliding motion according to a refresh rate of the screen and the duration. The electronic device may generate the inertial sliding motion effect according to a position of each object at the end of the sliding operation, the fourth distance, and the number of image frames.
In the embodiment of the application, after the electronic equipment controls the plurality of objects to slide for the first distance towards the first direction, the inertial sliding effect can be played, the positions of the plurality of objects in the inertial sliding effect can be continuously changed, and the problem of abrupt position change can be avoided.
In a second aspect, an embodiment of the present application provides a method for displaying an object in a checkerboard layout. The method comprises the following steps: the electronic device displays a first interface, wherein the first interface comprises a plurality of objects in a chessboard layout, and the central position of a first object in the plurality of objects is overlapped with the central position of a screen of the electronic device. The electronic device controls the plurality of objects to slide a first distance toward a first direction in response to an operation of sliding the objects. In the embodiment of the application, a plurality of objects in a chessboard layout can be slid based on the sliding operation of a user.
When the sliding operation is finished, the electronic device may determine a fourth object closest to a target position, where the target position is a position that is a third distance from a center position of the screen, and the third distance is a distance that the plurality of objects should continue to slide when the sliding operation is finished. The electronic device may obtain a fourth distance between the center position of the fourth object and the center position of the screen, generate an inertial sliding motion effect according to the fourth distance, and play the inertial sliding motion effect.
In the embodiment of the application, the electronic equipment can control the plurality of objects to slide for the first distance towards the first direction based on the sliding operation of the user, and after the plurality of objects slide for the first distance towards the first direction, the electronic equipment can play the inertial sliding movement effect, the positions of the plurality of objects in the inertial sliding movement effect can be continuously changed, and the problem of position mutation can not occur.
In one possible implementation manner, when the sliding operation is finished, the electronic device may acquire a sliding speed at the end of the sliding operation, where the electronic device may acquire the second distance according to the sliding speed at the end of the sliding operation, determine a third object closest to a center position of the screen, and calculate a limiting distance according to the center position of the third object and the grid, toward a direction opposite to the second direction, where the limiting distance is a maximum distance that the plurality of objects should continue to slide at the end of the sliding operation. The electronic device may determine a third distance based on the limited distance and the second distance. It is understood that the second direction may be understood as a sliding direction at the end of the sliding operation.
In one possible implementation, when the sliding speed is greater than or equal to a speed threshold, the electronic device may obtain the second distance according to the sliding speed at the end of the sliding operation, determine a third object closest to the central position of the screen, and calculate a limiting distance according to the central position of the third object and the grid, toward a direction opposite to the second direction, where the limiting distance is a maximum distance that the plurality of objects should continue to slide at the end of the sliding operation. The electronic device may determine a third distance based on the limited distance and the second distance. It is understood that the second direction may be understood as a sliding direction at the end of the sliding operation.
When the sliding speed is smaller than a speed threshold, the electronic device can determine a third object closest to the central position of the screen, and display a third interface, wherein the central position of the third object in the third interface is overlapped with the central position of the screen.
In this implementation, the electronic device may determine whether to generate the inertial sliding motion effect or directly display the third interface based on the sliding speed at the end of the sliding operation. When the sliding speed is higher at the end of the sliding operation, the electronic device can generate an inertial sliding effect, the position of the object in the inertial sliding effect is gradually and continuously changed, abrupt change can not occur, and a user has better operation feeling. When the sliding speed is smaller when the sliding operation is finished, the user hardly perceives that the object continues to slide by inertia, so that the electronic device can directly display the third interface without generating the inertial sliding effect, and the central position of the third object is enabled to overlap with the central position of the screen, and the workload of the electronic device can be reduced.
In one possible implementation, the sliding speed includes a speed of an X-axis and a speed of a Y-axis, and the second distance includes a distance of the X-axis and a distance of the Y-axis; the obtaining the second distance according to the sliding speed at the end of the sliding operation includes: acquiring the distance of the X axis according to the speed of the X axis; and acquiring the distance of the Y axis according to the speed of the Y axis.
In one possible implementation, the determining the third distance according to the limiting distance and the second distance includes: when the second distance is less than or equal to the limit distance, taking the second distance as the third distance; and when the second distance is larger than the limiting distance, taking the limiting distance as the third distance.
In a third aspect, an embodiment of the present application provides a method for displaying an object in a checkerboard layout. The method comprises the following steps: the electronic equipment displays a first interface, wherein the first interface comprises a plurality of objects in a chessboard layout, and the central position of a first object in the plurality of objects is overlapped with the central position of a screen of the electronic equipment; controlling the plurality of objects to slide a first distance toward a first direction in response to an operation of sliding the objects; when the sliding operation is finished, controlling the plurality of objects to slide towards a second direction for a second distance; and displaying a second interface, wherein the second interface comprises a plurality of objects in a chessboard layout, and the center position of a second object in the plurality of objects is overlapped with the center position of the screen.
In one possible implementation, when the first direction includes one direction, the second direction is the same as the first direction; when the first direction includes at least one direction, the second direction is a sliding direction at the end of a sliding operation.
In one possible implementation, before the controlling the plurality of objects to slide toward the second direction by the second distance, the method further includes: acquiring a sliding speed at the end of a sliding operation; and when the sliding speed is greater than or equal to a speed threshold, acquiring the second distance according to the sliding speed at the end of the sliding operation.
In one possible implementation, the sliding speed includes a speed of an X-axis and a speed of a Y-axis, and the second distance includes a distance of the X-axis and a distance of the Y-axis; the obtaining the second distance according to the sliding speed at the end of the sliding operation includes: acquiring the distance of the X axis according to the speed of the X axis; and acquiring the distance of the Y axis according to the speed of the Y axis.
In one possible implementation, when the sliding operation is finished, the method further includes: determining a third object nearest to the center position of the screen; and calculating a limiting distance from the central position of the third object and the grid towards the opposite direction of the second direction, wherein the limiting distance is the maximum distance of sliding of the objects towards the second direction.
After the second distance is acquired, the method further comprises: and determining a third distance according to the limiting distance and the second distance.
In one possible implementation, the determining the third distance according to the limiting distance and the second distance includes: when the second distance is less than or equal to the limit distance, taking the second distance as the third distance; and when the second distance is larger than the limiting distance, taking the limiting distance as the third distance.
In one possible implementation, the controlling the plurality of objects to slide a second distance toward a second direction includes: controlling the plurality of objects to slide the third distance toward the second direction.
In a fourth aspect, an embodiment of the present application provides an electronic device, which may also be referred to as a terminal (terminal), a User Equipment (UE), a Mobile Station (MS), a Mobile Terminal (MT), or the like. The electronic device may be a mobile phone, a smart television, a wearable device, a tablet (Pad), a computer with wireless transceiving function, a Virtual Reality (VR) terminal device, an augmented reality (augmented reality, AR) terminal device, a wireless terminal in industrial control (industrial control), a wireless terminal in unmanned driving (self-driving), a wireless terminal in teleoperation (remote medical surgery), a wireless terminal in smart grid (smart grid), a wireless terminal in transportation security (transportation safety), a wireless terminal in smart city (smart city), a wireless terminal in smart home (smart home), or the like.
The electronic device includes: comprising the following steps: a processor and a memory; the memory stores computer-executable instructions; the processor executes computer-executable instructions stored in the memory to cause the electronic device to perform the method as in the first aspect, the second aspect, and the third aspect.
In a fifth aspect, embodiments of the present application provide a computer-readable storage medium storing a computer program. The computer program, when executed by a processor, implements the method as in the first aspect, the second aspect, and the third aspect.
In a sixth aspect, embodiments of the present application provide a computer program product comprising a computer program which, when run, causes a computer to perform the method as in the first aspect, the second aspect, and the third aspect.
In a seventh aspect, embodiments of the present application provide a chip comprising a processor for invoking a computer program in a memory to perform the method according to the first, second, and third aspects.
It should be understood that the second to seventh aspects of the present application correspond to the technical solutions of the first aspect of the present application, and the advantages obtained by each aspect and the corresponding possible embodiments are similar, and are not repeated.
Drawings
FIG. 1A is a schematic layout diagram of an application icon displayed on a desktop of an electronic device;
FIG. 1B is another layout diagram of an application icon displayed on a desktop of an electronic device;
FIG. 2 is a schematic diagram of an electronic device displaying application icons in a checkerboard layout;
fig. 3 is a schematic diagram of an electronic device displaying a thumbnail of a picture of a chessboard layout according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating an embodiment of a method for displaying objects in a checkerboard layout according to an embodiment of the present application;
FIG. 5 is a schematic diagram of an electronic device displaying an object of a chessboard layout according to an embodiment of the present application;
FIG. 6 is a flowchart illustrating another embodiment of a method for displaying objects in a checkerboard layout according to an embodiment of the present application;
FIG. 7 is a flowchart illustrating another embodiment of a method for displaying objects in a checkerboard layout according to an embodiment of the present application;
FIG. 8A is a schematic diagram of obtaining a limiting distance for a sliding object according to an embodiment of the present application;
FIG. 8B is another schematic diagram of obtaining a limiting distance for the object to continue sliding according to an embodiment of the present application;
FIG. 9 is a flowchart illustrating another embodiment of a method for displaying objects in a checkerboard layout according to an embodiment of the present application;
FIG. 10 is a schematic diagram of an electronic device displaying objects of a chessboard layout according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
FIG. 12 is a flowchart illustrating another embodiment of a method for displaying objects in a checkerboard layout according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of another electronic device according to an embodiment of the present application.
Detailed Description
For purposes of clarity in describing the embodiments of the present application, the words "exemplary" or "such as" are used herein to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
In the embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a alone, a and B together, and B alone, wherein a, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b, or c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or plural.
It should be noted that "at … …" and "at … …" in the embodiments of the present application may be the instant when a certain situation occurs, or may be a period of time after a certain situation occurs, which is not particularly limited in the embodiments of the present application. In addition, the display interface provided by the embodiment of the application is only used as an example, and the display interface can also comprise more or less contents.
The electronic device in the embodiment of the present application may be referred to as a User Equipment (UE), a terminal (terminal), or the like. For example, the electronic device may be a cell phone with a screen, a tablet (portable android device, PAD), a personal digital assistant (personal digital assistant, PDA), a handheld device with wireless communication functionality, a computing device, an in-vehicle device, or a wearable device, a Virtual Reality (VR) terminal device, an augmented reality (augmented reality, AR) terminal device, a wireless terminal in an industrial control (industrial control), a wireless terminal in a smart home (smart home), or the like. The form of the electronic device in the embodiments of the present application is not particularly limited, and the electronic device will be described as a wristwatch in the following embodiments.
Fig. 1A is a schematic layout diagram of an application icon displayed on a desktop of an electronic device. The application icons may include, but are not limited to, icons of system applications, and icons of third party applications. Referring to fig. 1A, application icons may be arranged in a list style. The user slides up and down the list, and can trigger the sliding of the application icons, so that the user can select the corresponding application icons. It should be understood that fig. 1A and 1B illustrate examples in which the icon of application 1, the icon of application 2, …, and the icon of application N are displayed on the desktop. N may be an integer greater than or equal to 2.
FIG. 1B is another layout diagram of an application icon displayed on a desktop of an electronic device. Referring to a and B in fig. 1B, the application icons may be arranged in a checkerboard pattern. The user can slide the application icon towards any direction, and the application icon can slide towards the corresponding direction. Referring to a in fig. 1B, the application icons of each row in the board may be aligned. Referring to B in fig. 1B, the application icons of the odd rows in the board may be aligned, and the desktop icons of the even rows may be aligned. Wherein the alignment arrangement can be understood as: each column of application icons in each row of application icons has the same ordinate on the desktop.
The embodiment of the application does not limit the arrangement mode of the application icons in the chessboard. For example, the application icons of each row in the chessboard may not be aligned, or the application icons of the first m rows may be aligned, the application icons of the last n rows are all aligned, and m and n are integers greater than or equal to 1.
Similarly, for example, the application icons in the first m columns in the chessboard may be aligned, and the application icons in the last n columns may be aligned. In this example, the alignment arrangement may be understood as: each row of application icons in each column of application icons has the same abscissa of the desktop.
In some embodiments, the checkerboard pattern may also be referred to as a tiling pattern. In some embodiments, the application icons arranged in a checkerboard pattern may also be understood as: the application icons are tiled on the desktop.
In some embodiments, the desktop of the electronic device displays the application icons in a checkerboard fashion, which may be referred to as a checkerboard desktop.
Currently, when a user slides an object in a checkerboard layout on a desktop, the object may slide in the sliding direction of the user. Referring to a in fig. 2, a plurality of application icons of a checkerboard layout are displayed on a desktop, wherein the application icon 1 may be in a central position of a screen. Referring to b in fig. 2, when the user slides the application icon to the left, the plurality of application icons may slide to the left. The plurality of application icons may cease to slide when the user's finger leaves the desktop.
The application icons of the current chessboard layout can slide based on the sliding operation of a user, when the fingers of the user leave the screen, the plurality of application icons can stop sliding, and the current display mode of the plurality of application icons is single, so that the user experience is poor.
In order to enrich the display modes of the objects in the chessboard layout and improve the user experience, the embodiment of the application provides the display method of the objects in the chessboard layout, in the method, based on the operation of sliding the objects in the chessboard layout by the user, the objects can slide along with the sliding operation of the user, and can also slide for a certain distance after the fingers of the user leave, so that the user has better operation feeling. In addition, when the object stops sliding, the center position of the object closest to the center position of the screen can be overlapped with the center position of the screen, so that the layout of the object has center symmetry, the problem that a user feels that the position of the object deviates is avoided, and the user experience is improved.
It should be understood that in the embodiment of the present application, the object of the chessboard layout may include, but is not limited to, an application icon displayed on a desktop, for example, the object may also be a thumbnail of a picture of the chessboard layout in a gallery application, a message of the chessboard layout in a social class application, and so on. Illustratively, taking an object as an example of a thumbnail of a picture of a checkerboard layout in a gallery application, fig. 3 shows an interface for displaying a thumbnail of a picture in a gallery application, where the thumbnail of a picture may be laid out in a checkerboard fashion. It should be understood that, in fig. 3, the electronic device is taken as an example of a mobile phone, and in fig. 3, a thumbnail of a picture is represented by a box.
The application icons displayed on the table surface are taken as the objects of the chessboard layout in an exemplary manner in the following embodiments, and the display modes of the objects of other chessboard layouts can be referred to as descriptions in the following embodiments.
The following describes a method for displaying objects in a chessboard layout according to an embodiment of the present application with reference to specific embodiments. The following embodiments may be combined with each other, and some embodiments may not be repeated for the same or similar concepts or processes.
Fig. 4 is a flowchart of an embodiment of a method for displaying objects in a checkerboard layout according to an embodiment of the present application. Referring to fig. 4, a method for displaying an object of a chessboard layout according to an embodiment of the present application may include:
s401, displaying a first interface, where the first interface includes a plurality of objects in a checkerboard layout, and a center position of a first object in the plurality of objects overlaps with a center position of a screen.
Illustratively, referring to a in fig. 5, taking the first interface as a desktop as an example, the desktop includes a plurality of application icons in a checkerboard layout, and each application icon may be an object. The plurality of application icons may include an icon of application 1, an icon of application 2, …, and an icon of application N, among others. A in fig. 5 represents application icons with the numerals 1, 2, …, and N, respectively. Wherein, the center position of the icon of the application 1 in the plurality of application icons overlaps with the center position of the screen, and the icon of the application 1 is positioned at the center position of the screen. Wherein the icon of application 1 may be the first object.
In fig. 5 a, the application icon is illustrated as a circle, and the center position of the application icon may be the center of the circle. The shape of the object (such as an application icon) is not limited in the embodiment of the application, and the shape of the object can be rectangular, square, triangular and the like.
It should be appreciated that other objects may be included on the desktop, such as wallpaper, time, power identification, etc., as embodiments of the present application are not limited in this regard.
S402, in response to the operation of sliding the objects, the objects are controlled to slide towards the first direction for a first distance.
Because the plurality of objects are laid out in a checkerboard pattern, the user can slide the objects toward any direction.
In some embodiments, the first direction may include at least one direction and the first distance may include a distance in each direction. For example, a user may touch a desktop of an electronic device with a finger and not loosen his hand, slide the object first to the left, then slide the object downward, where the first direction may include the left side, and the lower side. The first distance may include a distance to slide to the left, and a distance to slide downward.
For example, referring to b in fig. 5, taking a user sliding an object to the left as an example, the electronic device may control the plurality of application icons to be slid to the left a first distance according to a sliding operation of the user. Wherein, after the plurality of application icons slide a first distance to the left, the icon of application 1 deviates from the center position of the screen. It should be understood that the first distance is not shown in fig. 5.
Wherein the first distance may be equal to a sliding distance of the user on the screen. Or the electronic device may calculate the first distance according to the sliding distance of the user on the screen and the preset ratio. Or, the electronic device may calculate the first distance according to the sliding distance of the user on the screen and a preset calculation method, which is not limited in the embodiment of the present application.
S403, when the sliding operation is finished, controlling the plurality of objects to slide toward the second direction by the second distance.
In the prior art, when the operation of sliding objects by a user is finished, a plurality of objects can stop sliding, which can cause the feeling of sliding and stopping for the user, and the user experience is poor. In the embodiment of the application, when the operation of sliding the objects by the user is finished, for example, when the finger of the user leaves the screen, the electronic device can also control the objects to continue to slide by inertia for a certain distance towards the second direction.
In some embodiments, when the first direction comprises one direction, the second direction is the same as the first direction. For example, as shown in b of fig. 5, after the user slides the object to the left, the user's finger leaves the screen, the sliding operation ends, and the second direction may be the left.
In some embodiments, when the first direction includes at least two directions, the second direction may be a last direction of the first directions. Illustratively, after the user slides the object first to the left and then to the bottom, the user's finger leaves the screen and the second direction may be the bottom.
In some embodiments, the second direction may be considered as the sliding direction at the end of the sliding operation, or the sliding direction when the user's finger is off the screen.
In some embodiments, the second distance may be a preset distance. Therefore, when the finger of the user leaves the screen, the electronic device can control the objects to slide continuously towards the second direction for a preset distance, the objects have sliding buffering instead of suddenly stopping sliding, and user experience can be improved.
In some embodiments, the second distance may be related to a sliding speed at the end of the sliding operation, which may be said to be related to a user's speed of departure, which may be understood as the sliding speed of the user's finger as it leaves the screen.
Illustratively, taking the hands-off speed as an example, for example, the hands-off speed is V, the second distance may be nV, and n may be an empirical value.
Illustratively, taking the hands-off speed as an example, the electronic device may obtain the hands-off speed V of the X-axis in the screen coordinate system X And Y-axis hand-out speed V Y . Correspondingly, the electronic equipment can acquire the inertial sliding distance D of the X axis X1 And an inertial sliding distance D of Y axis Y1 . Wherein the second distance may include an inertial sliding distance D of the X-axis X1 And an inertial sliding distance D of Y axis Y1
In some embodiments, the electronic device may calculate D based on equation 1 below X1 And calculating D based on the following formula 2 Y1
D X1 =V X X T x m equation 1
D Y1 =V Y X T x m equation 2
In some embodiments, T is a period in which the electronic device collects touch data, which may include a touch position, a touch duration, and the like. The electronic device can acquire the X-axis hand-leaving speed V in the screen coordinate system based on the touch data X And Y-axis hand-out speed V Y This calculation process is not described here, and reference may be made to the description of fig. 11. Illustratively, T is 0.0167s.
Where m may be an inertial factor, an empirical value, e.g., m may be 9.
For example, referring to c in fig. 5, the electronic device may control the plurality of application icons to slide leftwards a first distance, and may further control the plurality of application icons to continue to slide leftwards a second distance. It should be understood that the second distance is not shown in fig. 5.
In this embodiment, the second distance may be related to the sliding speed at the end of the sliding operation, so that the faster the user slides the object, the longer the second distance for inertial sliding of the plurality of application icons, so that the second distance is more in line with the operation experience of the user, and the user experience may be further improved.
S404, displaying a second interface, wherein the second interface comprises a plurality of objects in a chessboard layout, and the center position of the second object in the plurality of objects is overlapped with the center position of the screen.
In the embodiment of the application, after the electronic device controls the plurality of objects to slide towards the second direction for the second distance, the second object closest to the central position of the screen can be determined, and the central position of the second object is overlapped with the central position of the screen. The electronic device may acquire a center position of each object, and calculate a distance between the center position of each object and a center position of the screen to determine a second object closest to the center position of the screen.
In some embodiments, the first object and the second object may be the same or different.
After determining the second object, the electronic device may display a second interface, where the second interface includes a plurality of objects in a checkerboard layout, and a center position of the second object in the plurality of objects overlaps a center position of the screen. For example, referring to c in fig. 5, after the plurality of application icons continue to slide leftwards a second distance, the icon of the application 15 is closest to the center position of the screen, the icon of the application 15 may be taken as a second object, and the electronic device may display a second interface. Referring to d in fig. 5, the center position of the icon of the application 15 in the second interface overlaps with the center position of the screen.
In the embodiment of the application, the electronic equipment can control the object in the chessboard layout to continue to slide by a certain distance by inertia after the finger of the user leaves the screen besides sliding the object based on the sliding operation of the user, so that the sliding and stopping feeling of the user is avoided, the user has better operation feeling, and the user experience is improved. In addition, when the object stops sliding, the center position of the object closest to the center position of the screen can be overlapped with the center position of the screen, so that the problem that the user feels that the position of the object deviates is avoided, and the user experience can be improved.
The above embodiment describes that the electronic device may determine the second distance for the object to continue the inertial sliding based on the sliding speed when the sliding operation is finished. In some embodiments, when the sliding speed of the user at the end of the sliding operation is smaller, the second distance for the object to continue to slide inertially is determined to be smaller based on the sliding speed, and even if the object continues to slide inertially for the second distance, the user cannot intuitively feel the continued sliding of the object, so in some embodiments, based on the better operation feel for the user, in order to reduce the workload of the electronic device, the electronic device may determine whether to control the object to continue to slide inertially for the second distance based on the sliding speed at the end of the sliding operation.
Referring to fig. 6, a method for displaying an object of a chessboard layout according to an embodiment of the present application may include:
s601, displaying a first interface, wherein the first interface comprises a plurality of objects in a chessboard layout, and the center position of a first object in the plurality of objects is overlapped with the center position of a screen.
S602, in response to an operation of sliding the objects, controlling the plurality of objects to slide a first distance toward the first direction.
S601 to S602 may refer to the descriptions in S401 to S402.
S603, when the sliding operation is ended, it is determined whether or not the plurality of objects are controlled to continue sliding based on the sliding speed at the end of the sliding operation. If yes, S604-S605 are executed, and if no, S605 is executed directly.
In some embodiments, the electronic device may compare the sliding speed at the end of the sliding operation with a speed threshold based on the sliding speed at the end of the sliding operation, determine to control the plurality of objects to continue sliding when the sliding speed at the end of the sliding operation is greater than or equal to the speed threshold, and determine not to control the plurality of objects to continue sliding when the sliding speed at the end of the sliding operation is less than the speed threshold.
In some embodiments, the speed threshold may include a first speed threshold for the X-axis and a second speed threshold for the Y-axis, and the sliding speed at the end of the sliding operation includes the speed of the X-axis and the speed of the Y-axis. Wherein the electronic device may determine to control the plurality of objects to continue sliding when the speed of the X-axis is greater than or equal to the first speed threshold and the speed of the Y-axis is greater than or equal to the second speed threshold. The electronic device may determine not to control the plurality of objects to continue sliding when the speed of the X-axis is less than the first speed threshold or the speed of the Y-axis is less than the second speed threshold.
In some embodiments, the first speed threshold and the second speed threshold may be equal or unequal. For example, the first and second speed thresholds may be equal, e.g., the first and second speed thresholds are each 350px/s.
S604, controlling the plurality of objects to slide towards the second direction for a second distance.
S605, displaying a second interface including a plurality of objects of a checkerboard layout, a center position of a second object of the plurality of objects overlapping a center position of the screen.
S604-S605 may refer to the descriptions in S403-S404.
In the embodiment of the application, the electronic equipment can determine whether the control object continues to inertially slide for the second distance based on the sliding speed when the sliding operation is finished, wherein when the sliding speed is larger when the sliding operation is finished, the electronic equipment can control the object to continue inertially slide for the second distance based on the speed, so that the user is prevented from feeling that the sliding is finished, the user has better operation feeling, and the user experience is improved. When the sliding speed is smaller when the sliding operation is finished, the user hardly perceives that the object continues inertial sliding, so that the electronic device can directly display the second interface without controlling the object to continue inertial sliding, and the central position of the second object is enabled to overlap with the central position of the screen, and the workload of the electronic device can be reduced.
In the above embodiments, it is described that the electronic device may determine the second distance based on the sliding speed at the end of the sliding operation, and in some embodiments, in order to avoid that the object of the chessboard layout exceeds the range of the screen display, the electronic device may further determine the limiting distance for the object to continue sliding based on the grid, and the electronic device may determine the third distance for the object to continue sliding based on the second distance and the limiting distance.
Referring to fig. 7, a method for displaying an object of a chessboard layout according to an embodiment of the present application may include:
s701, displaying a first interface, the first interface including a plurality of objects of a checkerboard layout, a center position of a first object of the plurality of objects overlapping a center position of a screen.
S702, in response to the operation of sliding the objects, controlling the objects to slide towards the first direction for a first distance.
S703, when the sliding operation is ended, determining whether to control the plurality of objects to continue sliding based on the sliding speed at the end of the sliding operation. If yes, S704-S708 are executed, and if no, S708 is executed directly.
S704, based on the sliding speed at the end of the sliding operation, the second distance is acquired.
S701 to S703 may refer to the descriptions in S601 to S603, and S704 may refer to the descriptions in S403.
S705, based on the sliding direction at the end of the sliding operation, the limit distance for the object to continue sliding is acquired.
In some embodiments, a grid may be set on the screen in advance, and the size of the grid may be smaller than or equal to the size of the screen. In the embodiment of the application, the mesh is set for the purposes of: and determining the boundary of object display of the chessboard layout, and avoiding the object from sliding beyond the boundary of the grid. The shape of the grid is not limited in the embodiment of the present application, and the grid may be circular or rectangular, for example.
In the embodiment of the application, when the sliding operation is finished, the electronic device can determine the third object closest to the central position of the screen, namely the electronic device can determine the third object closest to the central position of the screen when the user is away from the hand. The method for determining the third object closest to the central position of the screen by the electronic device can refer to the electronic device to determine the related description of the second object closest to the central position of the screen. After the electronic device determines the third object closest to the central position of the screen, the limiting distance for the object to continue sliding can be obtained based on the third object and the grid.
In some embodiments, the electronic device may calculate at least one distance of the center position of the third object from the boundary of the grid, and take the maximum distance as the limiting distance for the object to continue sliding. For example, taking a grid as an example, the electronic device may calculate a distance of a center position of the third object from a left boundary of the grid, a distance from a right boundary of the grid, a distance from an upper boundary of the grid, and a distance from a lower boundary of the grid, and take the maximum distance as a limiting distance in which the object continues to slide.
In some embodiments, the electronic device may obtain the limited distance for the object to continue sliding based on the center position of the third object, the grid, and the sliding direction at the end of the sliding operation. For example, when the user slides the object to the left, the object will slide to the left, and when the object continues to slide to the left by a large distance, a large number of blank areas are generated on the right side of the grid, that is, the object exceeds the screen display range, so as to affect the viewing experience of the user. In the embodiment of the present application, the electronic device may calculate the restriction distance toward the opposite direction of the sliding direction at the end of the sliding operation according to the center position of the third object and the grid. Among them, it can be understood that: the electronic device may score a line in a direction opposite to the sliding direction at the end of the sliding operation with the center position of the third object as a starting point, the line and the mesh may be selected at an intersection point, and the electronic device may use a distance between the center position of the third object and the intersection point as a limiting distance. In some embodiments, the sliding direction at the end of the sliding operation may be understood as the second direction, and the opposite direction of the sliding direction at the end of the sliding operation may be understood as the opposite direction of the second direction.
Illustratively, taking a grid as a rectangle in fig. 8A as an example, referring to a-b in fig. 8A, a user slides an object to the left, and the electronic device may control the plurality of application icons to slide to the left a first distance according to a sliding operation of the user. When the user's finger leaves the screen, i.e., before the electronic device controls the plurality of application icons to continue sliding a second distance to the left, the electronic device may determine a third object, such as an icon of application 4, that is closest to the center of the screen. Referring to b in fig. 8A, the electronic device may calculate a distance d of a center position of the icon of the application 4 from a right boundary of the grid, which may be a limiting distance for the object to continue to slide, from the icon of the application 4.
Where the distance d can be seen as: based on the center position of the third object and the grid, a restriction distance is calculated toward the opposite direction of the sliding direction at the end of the sliding operation. Wherein the sliding direction is left and the opposite direction is right at the end of the sliding operation, so the electronic device can take the distance d of the center position of the third object from the right boundary of the grid as the limiting distance for the object to continue sliding.
In some embodiments, the limited distance for continued sliding of the object may include a limited distance D of the X-axis X2 And a limiting distance D of Y axis Y2 . Exemplary, referring to b in FIG. 8A, the limiting distance for continued sliding of the object may include D X2 =d,D Y2 =0。
For example, when the sliding direction is left-down when the user's finger leaves the screen, the electronic device may acquire a distance d1 of the center position of the third object from the right boundary of the grid and a distance d2 of the center position of the third object from the upper boundary of the grid. Wherein the limited distance for the object to continue sliding may include D X2 =d1,D Y2 =d2。
For example, taking a grid as a circle in fig. 8B as an example, referring to a-B in fig. 8B, a user slides an object to the left, and the electronic device may control the plurality of application icons to slide to the left a first distance according to a sliding operation of the user. When the user's finger leaves the screen, i.e., before the electronic device controls the plurality of application icons to continue sliding a second distance to the left, the electronic device may determine a third object, such as an icon of application 4, that is closest to the center of the screen. Referring to B in fig. 8B, the electronic device may calculate a distance d of the center position of the icon of the application 4 from the right boundary of the grid, which may be a limiting distance for the object to continue to slide, from the icon of the application 4.
S706, determining a third distance for the object to continue sliding according to the second distance and the limiting distance.
The limiting distance for the object to continue sliding may be regarded as the maximum distance for the object to continue inertial sliding. The electronic device may determine a third distance over which the object continues to slide based on the second distance and the limiting distance. When the second distance is less than or equal to the limiting distance, the electronic device may take the second distance as a third distance. When the second distance is greater than the limit distance, the electronic device may take the limit distance as a third distance.
In some embodiments, the third distance may include a distance D of the X-axis X3 And distance D of Y axis Y3 . For example, D X3 =max(D X1 ,D X2 ),D Y4 =max(D Y1 ,D Y2 )。
S707, controlling the plurality of objects to slide a third distance toward the second direction.
S707 may refer to the description in S403.
S708, displaying a second interface including a plurality of objects of a checkerboard layout, a center position of a second object of the plurality of objects overlapping a center position of the screen.
S708 may refer to the description in S404.
In the embodiment of the application, the electronic device can calculate the continuous inertial sliding limiting distance of the object according to the third object closest to the central position of the screen when the sliding operation is finished, the sliding direction when the sliding operation is finished and the grid. The electronic equipment can determine the third distance for the object to continue sliding based on the second distance and the limiting distance, and the embodiment of the application can avoid the inertial sliding of the object in the chessboard layout from exceeding the display range of the screen, generate a large number of blank areas on the screen and improve the viewing experience of the user.
In the above embodiment, when the finger of the user leaves the screen, the electronic device may display the second interface after controlling the plurality of objects to continue to inertially slide for the third distance. After the inertial sliding is finished, the electronic device enables the object at the center position of the screen to overlap with the center position of the screen, and a user perceives position jump of the object and experiences the user poorly. For example, referring to c and d in fig. 5, after the electronic device displays the second interface, the center position of the icon of the application 15 may overlap with the center position of the screen, and the positions of the icon of the application 15 and other application icons on the second interface may jump (change greatly).
In some embodiments, the electronic device may combine the two steps of inertial sliding of the object and enabling the object located at a position away from the center of the screen to overlap the center of the screen into a dynamic process, so that the user perceives that the position of the object is continuously changed, and no jump is generated, so as to improve the user experience.
Referring to fig. 9, a method for displaying an object of a chessboard layout according to an embodiment of the present application may include:
s901, displaying a first interface including a plurality of objects in a checkerboard layout, a center position of a first object of the plurality of objects overlapping a center position of a screen.
S902, in response to an operation of sliding the object, the plurality of objects are controlled to slide a first distance toward the first direction.
S903, when the sliding operation is ended, it is determined whether or not the plurality of objects are controlled to continue sliding based on the sliding speed at the end of the sliding operation. If yes, S904-S910 are performed, and if no, S911 is performed.
S904, a second distance is acquired based on the sliding speed at the end of the sliding operation.
S905, based on the sliding direction at the end of the sliding operation, a limit distance for the object to continue sliding is acquired.
S906, determining a third distance for the object to continue sliding according to the second distance and the limiting distance.
S901 to S906 may refer to the descriptions in S701 to S706.
S907, a fourth object closest to the target position, which is a position at a third distance from the center position of the screen, is determined.
In the embodiment of the application, the electronic equipment determines the third object to continue slidingAfter the distance, a third distance by which the plurality of objects continue to slide toward the second direction is not directly controlled, but an object that finally overlaps with the center position of the screen is determined based on the third distance. Wherein the target position is a position at a third distance from the center position of the screen. Exemplary, for example, the coordinates of the center position of the screen are (X 0 ,Y 0 ) The coordinates of the position at the third distance from the center position of the screen may be (X) 0 -D X3 ,Y 0 -D Y3 ) The coordinates of the target position are (X 0 -D X3 ,Y 0 -D Y3 )。
When the sliding operation is ended, the electronic device may determine a fourth object closest to the target position. For example, the electronic device may acquire a distance between the center position of each object and the target position, and take the object having the smallest distance as the fourth object. The electronic device may take this fourth object as an object that eventually overlaps the center of the screen.
S908, a fourth distance between the fourth object and the center position of the screen is acquired.
In some embodiments, for example, the coordinates of the fourth object are (X 1 ,Y 1 ) The electronic device may be configured to determine the coordinates (X 0 ,Y 0 ) And the coordinates of the fourth object are (X 1 ,Y 1 ) A fourth distance between a fourth object and a center position of the screen is acquired.
In some embodiments, the fourth distance of the fourth object from the center position of the screen may include a distance D of the X-axis X4 And distance D of X axis Y4 . For example, the fourth object has coordinates (X 1 ,Y 1 ) D is then X4 =X 0 -X 1 ,D Y4 =Y 0 -Y 1
S909, generating an inertial sliding motion effect according to the fourth distance.
In some embodiments, the number of frames of the images included in the inertial sliding motion effect may be preset, for example, the number of frames of the images included in the inertial sliding motion effect is a preset number of frames. The electronic device may generate each frame of image in the inertial sliding motion effect according to the fourth distance and the preset frame number.
The electronic device may sequentially draw n frames of images according to the distance between the same objects in the two adjacent frames of images, and obtain the inertial sliding movement effect.
In some embodiments, the electronic device may determine a duration of the inertial sliding motion based on the fourth distance. Illustratively, the duration t= [ max (D X4 ,D Y4 )]And/m. The electronic device may determine the number of image frames included in the inertial sliding motion according to the screen refresh rate of the electronic device and the duration t of the inertial sliding motion. Illustratively, the screen refresh rate of the electronic device is 60Hz, i.e., 1s may display 60 frame images and t s may display 60t frame images.
The electronic device may generate each frame of image in the inertial sliding motion according to the fourth distance and the number of frames of images included in the inertial sliding motion. For example, the image frame number included in the inertial sliding motion effect is 60t frames, and the electronic device may divide the fourth distance into 60t parts, to obtain the distance between the same objects in two adjacent frames of images. The electronic device can sequentially draw 60t frame images by taking the position of the object at the end of the sliding operation as a starting point according to the distance between the same objects in two adjacent frame images, so as to obtain the inertial sliding movement effect.
In some embodiments, the minimum duration tmin of the inertial sliding motion can also be preset to avoid the problem of too short the inertial sliding motion. After determining the duration of the inertial sliding motion effect according to the fourth distance, when the duration t of the inertial sliding motion effect is greater than or equal to tmin, the electronic device may determine the number of image frames included in the inertial sliding motion effect according to the screen refresh rate of the electronic device and the duration t of the inertial sliding motion effect, and then the electronic device may generate each frame of image in the inertial sliding motion effect according to the fourth distance and the number of image frames included in the inertial sliding motion effect.
When the duration t of the inertial sliding motion effect is smaller than tmin, the electronic device may determine the number of image frames included in the inertial sliding motion effect according to the screen refresh rate of the electronic device and tmin, and further the electronic device may generate each frame of image in the inertial sliding motion effect according to the fourth distance and the number of image frames included in the inertial sliding motion effect.
S910, playing the inertial sliding motion effect, wherein after the inertial sliding motion effect is played, the center position of the fourth object is overlapped with the center position of the screen.
In the embodiment of the application, after the electronic equipment controls the plurality of objects to slide for the first distance towards the first direction, the inertial sliding effect can be played, the positions of the plurality of objects in the inertial sliding effect can be continuously changed, and the problem of abrupt position change can be avoided. In the embodiment of the application, because the electronic device is a fourth distance determined based on the fourth object and the central position of the screen and the inertial sliding motion effect is generated based on the fourth distance, the central position of the fourth object overlaps with the central position of the screen after the playing of the inertial sliding motion effect is finished.
For example, referring to a and b in fig. 10, the user slides the object to the left, and the electronic device may control the plurality of application icons to slide to the left a first distance according to a sliding operation of the user. When the user's finger leaves the screen, the electronic device may determine that the object closest to the target location is an icon of the application 8, and the icon of the application 8 may be the fourth object. The electronic device may obtain a fourth distance of the icon of the application 8 from the center position of the screen and generate an inertial sliding action based on the fourth distance. It should be appreciated that the target location is represented in fig. 10 by a black dot.
Referring to c-e in fig. 10, c-e in fig. 10 shows three frames of images included in the inertial sliding motion effect, thus illustrating the electronic device playing the inertial sliding motion effect. Referring to f in fig. 10, after the end of the inertia-slip active play, the center position of the icon of the application 8 overlaps with the center position of the screen.
Referring to fig. 10, when a user performs a sliding operation, a plurality of objects in a chessboard layout gradually slide towards a sliding direction along with the sliding operation of the user, and when a finger of the user leaves a screen, an electronic device can play an inertial sliding motion effect, positions of the plurality of objects in the chessboard layout in the inertial sliding motion effect are continuously changed, a problem of position jump cannot occur, and user experience can be improved.
S911 displays a third interface including a plurality of objects of a checkerboard layout, a center position of a third object of the plurality of objects overlapping a center position of the screen.
In the embodiment of the application, when the sliding operation is finished and the sliding speed at the end of the sliding operation is smaller than the speed threshold, the third object closest to the central position of the screen can be directly determined, and the central position of the third object is enabled to overlap with the central position of the screen. In other words, when the sliding operation is ended and the sliding speed at the end of the sliding operation is less than the speed threshold, the electronic apparatus may directly perform centering, display a third interface including a plurality of objects of the checkerboard layout, a center position of a third object of the plurality of objects overlapping a center position of the screen.
In the embodiment of the application, when the user performs the sliding operation, the objects in the chessboard layout gradually slide towards the sliding direction along with the sliding operation of the user, and when the finger of the user leaves the screen, the electronic device can acquire a fourth distance between a fourth object closest to the target position and the central position of the screen, and based on the fourth distance, an inertial sliding motion effect is generated. The electronic equipment can play the inertial sliding movement effect, the positions of a plurality of objects in the chessboard layout in the inertial sliding movement effect are continuously changed, the problem of position jump cannot occur, and the user experience can be improved.
In some embodiments, the software system of the electronic device may employ a hierarchical architecture, which may be, for example, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. Fig. 11 is a block diagram of a software structure of an electronic device to which an embodiment of the present application is applied. The layered architecture divides the software system of the electronic device into several layers, each of which has a distinct role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the electronic device may be divided into three layers, an application layer (applications), an application framework layer (application framework), and a kernel layer (kernel), respectively.
The application layer may include a series of application packages that run applications by calling an application program interface (application programming interface, API) provided by the application framework layer. By way of example, the application package may include applications for cameras, gallery, calendar, phone calls, maps, navigation, WLAN, bluetooth, music, video, short messages, etc.
In some embodiments, the application layer is illustrated in FIG. 11 as an example in which an application may be included.
The application framework layer provides APIs and programming frameworks for application programs of the application layer. The application framework layer includes a number of predefined functions. The application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.
In some embodiments, as shown in FIG. 11, the application framework layer may include: the touch control data processing module and the inertial sliding module. It should be understood that fig. 11 illustrates a touch data processing module and an inertial sliding module according to an embodiment of the present application.
The touch data processing module is used for determining the sliding operation of the user, finishing the sliding operation of the user and determining the sliding speed and the sliding direction when the sliding is finished based on the touch data.
The inertial sliding module is configured to acquire the second distance, and acquire the limited distance of the inertial sliding of the object, and the third distance, and the like based on the sliding speed at the end of the sliding, and specifically may refer to the description in fig. 12.
The kernel layer is a layer between hardware and software. The kernel layer is used for driving the hardware so that the hardware works. The inner core layer at least includes display driving, camera driving, audio driving, sensor driving, motor driving, etc., which is not limited in this embodiment of the present application. Illustratively, in embodiments of the present application, the core layer employs a motor drive to drive the motor (hardware) in the electronic device to move to generate vibrations.
In some embodiments, the kernel layer may include a touch driver. The touch control driver is used for reporting touch control data to the touch control data processing module. It should be understood that fig. 11 illustrates a touch drive and a display drive according to an embodiment of the present application.
In some embodiments, the electronic device may further include a hardware layer, which may include a touch chip, a touch screen, and a display screen.
The touch control chip is used for collecting touch control data of the touch screen and reporting the touch control data to the touch control driver.
The touch control data processing module is used for periodically reading touch control data from the touch control drive, or the touch control drive can periodically report the touch control data to the touch control data processing module. The period of the touch data processing module for reading the touch data and the period of the touch driver for reporting the touch data may be T.
The touch data processing module can determine touch operations of a user, such as sliding, double clicking and the like, according to the touch drive acquired in each period. When the user performs the operation of the sliding object, the touch data processing module may obtain the sliding duration, the sliding direction, the sliding speed, and the like according to the touch data. In addition, the touch data processing module may also detect that the user starts to perform the sliding operation, ends the sliding operation, and so on. The embodiment of the application does not describe the principle in detail, and can refer to the existing related technology.
Taking the embodiment of fig. 9 as an example on the basis of fig. 11, the following describes a method for displaying objects in a chessboard layout according to an embodiment of the present application with reference to fig. 12:
S1201, the display screen displays a first interface including a plurality of objects in a checkerboard layout, a center position of a first object of the plurality of objects overlapping a center position of the screen.
S1201 can refer to the description in S901.
S1202, according to the touch data, when the touch data processing module determines that the user executes the operation of the sliding object, the touch data processing module sends the sliding direction and the sliding distance to the inertial sliding module.
For example, the touch data processing module may obtain the sliding direction and the sliding distance according to the touch data of each period.
S1203, the inertial sliding module controls the display screen to display a screen in which the objects slide a first distance toward the first direction according to the sliding direction and the sliding distance.
For example, the inertial sliding module may determine the first direction and the first distance in which the plurality of objects slide according to the sliding direction and the sliding distance, and the inertial sliding module may send the first direction and the first distance in which the plurality of objects slide to the drawing module in the electronic device, so that the drawing module may draw a screen in which the plurality of objects slide by the first distance toward the first direction, so that the display screen may display a screen in which the plurality of objects slide by the first distance toward the first direction.
S1203 may refer to the description in S902.
And S1204, according to the touch data, when the touch data processing module determines that the sliding operation is finished, the touch data processing module acquires the sliding direction and the sliding speed when the sliding operation is finished according to the touch data acquired in the last period.
S1205, the touch data processing module sends the sliding direction and the sliding speed when the sliding operation is finished to the inertial sliding module.
S1206, the inertial sliding module determines whether to control the plurality of objects to continue sliding based on the sliding speed at the end of the sliding operation. If yes, S1207 to S1213 are executed, and if no, S1214 is executed.
S1206 may refer to the description in S903.
S1207, the inertial sliding module acquires the second distance based on the sliding speed at the end of the sliding operation.
S1208, the inertial sliding module acquires a limit distance for the object to continue sliding based on the sliding direction at the end of the sliding operation.
S1209, the inertial sliding module determines a third distance for the object to continue sliding according to the second distance and the limiting distance.
S1210, the inertial sliding module determines a fourth object closest to a target position, the target position being a position at a third distance from a center position of the screen.
S1211, the inertial sliding module acquires a fourth distance of the fourth object from the center position of the screen.
S1212, the inertial sliding module executes an action callback dragThrownailimatosilBack according to the fourth distance, generating an inertial sliding action.
S1213, the inertial sliding module controls the display screen to play the inertial sliding movement effect.
Referring to the description in S909, the inertial sliding module may acquire the fourth distance, and the duration of the inertial sliding action. In some embodiments, the fourth distance may be an inertial rolling distance that acts as an inertial sliding motion.
In some embodiments, the inertial sliding module may set the inertial rolling distance and the duration of the inertial sliding motion, register the motion callback function dragthrowanimate callback, and start the inertial sliding motion.
In some embodiments, the inertial sliding module may detect, once every T, whether the inertial sliding module reaches the duration of the inertial sliding action, where if the duration of the inertial sliding action has been reached, the inertial sliding module controls the display screen to stop playing the inertial sliding action. If the duration of the inertial sliding action is not reached, the inertial sliding module executes an action callback dragthrowanimate call, so that the position of each object in the next frame of image can be calculated, and a plurality of objects in the chessboard layout are moved. For example, when the frame number of the image is n frames, the inertial sliding module executes an action callback dragthreshold, and can determine that the distance between the same object in two adjacent frames of images is the fourth distance/n, so that the position of each object in the next frame of image can be calculated according to the position of the object in the previous frame of image and the distance between the same object in two adjacent frames of images.
S1214, the inertial sliding module controls the display screen to display a third interface, wherein the third interface comprises a plurality of objects in a chessboard layout, and the center position of the third object in the plurality of objects is overlapped with the center position of the screen.
S1207 to S1214 may refer to the descriptions in S904 to S911.
It should be understood that the method for displaying the object in the chessboard layout according to the embodiment of the present application has the same principle and technical effects as those of the above embodiment, and reference may be made to the description of the above embodiment.
It should be understood that, in the embodiment of the present application, the screen of the terminal device may be a touch screen or a non-touchable screen. When the screen of the terminal device is a touch screen, the user may operate the screen using a finger, a joint, or a stylus. When the screen of the terminal device is a non-touchable screen, the user may operate the screen using an input device of the terminal device, wherein the input device may include, but is not limited to, a mouse, a keyboard, and the like. It should be understood that the screen of the terminal device may be a touch screen in the above embodiments, and the explanation will be given taking as an example that the user operates the screen with a finger.
In some embodiments, when the user can operate the screen using a finger, a joint, or a stylus, etc., the end of the sliding operation may be understood as the user's finger, joint, or stylus, etc., leaving the screen. In some embodiments, when the user operates the screen using the input device of the terminal device, the end of the sliding operation may be understood as the user suspending operation of the input device.
It should be noted that, the data (including, but not limited to, the data for analysis, the stored data, the displayed data, etc.) related to the present application are all information and data authorized by the user or fully authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region, and are provided with corresponding operation entries for the user to select authorization or rejection.
In one embodiment, the embodiment of the application also provides electronic equipment. Fig. 13 is a schematic structural diagram of an electronic device according to the present application, and as shown in fig. 13, the electronic device 100 may include: processor 110, external memory interface 120, internal memory 121, universal serial bus (universal serial bus, USB) interface 130, charge management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headset interface 170D, sensor 180, keys 190, motor 191, indicator 192, camera 193, display 194, and subscriber identity module (subscriber identification module, SIM) card interface 195, etc. It is to be understood that the structure illustrated in the present embodiment does not constitute a specific limitation on the electronic apparatus 100. In other embodiments of the application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, a display processing unit (display process unit, DPU), and/or a neural-network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors. In some embodiments, the electronic device 100 may also include one or more processors 110.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others. The USB interface 130 is an interface conforming to the USB standard, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transfer data between the electronic device 100 and a peripheral device. And can also be used for connecting with a headset, and playing audio through the headset.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present application is only illustrative, and is not meant to limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also employ different interfacing manners in the above embodiments, or a combination of multiple interfacing manners.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 140 may receive a charging input of a wired charger through the USB interface 130. In some wireless charging embodiments, the charge management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may also supply power to the electronic device 100 through the power management module 141 while charging the battery 142.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 to power the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be configured to monitor battery capacity, battery cycle number, battery health (leakage, impedance) and other parameters. In other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charge management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like. The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier, etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN), bluetooth, global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), NFC, infrared (IR), etc. applied to the electronic device 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 150 of electronic device 100 are coupled, and antenna 2 and wireless communication module 160 are coupled, such that electronic device 100 may communicate with a network and other devices through wireless communication techniques. Wireless communication techniques may include GSM, GPRS, CDMA, WCDMA, TD-SCDMA, LTE, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a Beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The electronic device 100 may implement display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (flex), a mini, a Micro led, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
Electronic device 100 may implement shooting functionality through an ISP, one or more cameras 193, video codecs, a GPU, one or more display screens 194, an application processor, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, data files such as music, photos, videos, etc. are stored in an external memory card.
The internal memory 121 may be used to store one or more computer programs, including instructions. The processor 110 may cause the electronic device 100 to execute various functional applications, data processing, and the like by executing the above-described instructions stored in the internal memory 121. The internal memory 121 may include a storage program area and a storage data area. The storage program area can store an operating system; the storage area may also store one or more applications (e.g., gallery, contacts, etc.), and so forth. The storage data area may store data created during use of the electronic device 100 (e.g., photos, contacts, etc.), and so on. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like. In some embodiments, the processor 110 may cause the electronic device 100 to perform various functional applications and data processing by executing instructions stored in the internal memory 121, and/or instructions stored in a memory provided in the processor 110.
The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc. Wherein the audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or a portion of the functional modules of the audio module 170 may be disposed in the processor 110. The speaker 170A, also referred to as a "horn," is used to convert audio electrical signals into sound signals. The electronic device 100 may listen to music, or to hands-free conversations, through the speaker 170A. A receiver 170B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal. When electronic device 100 is answering a telephone call or voice message, voice may be received by placing receiver 170B in close proximity to the human ear. Microphone 170C, also referred to as a "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can sound near the microphone 170C through the mouth, inputting a sound signal to the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, and may implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may also be provided with three, four, or more microphones 170C to enable collection of sound signals, noise reduction, identification of sound sources, directional recording functions, etc. The earphone interface 170D is used to connect a wired earphone. The earphone interface 170D may be a USB interface 130, or may be a 3.5mm open mobile electronic device platform (open mobile terminal platform, OMTP) standard interface, or may be a american cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The sensors 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like. The function of each sensor is not repeated in the embodiment of the application.
The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys or touch keys. The electronic device 100 may receive key inputs, generating key signal inputs related to user settings and function controls of the electronic device 100.
The SIM card interface 195 is used to connect a SIM card. The SIM card may be inserted into the SIM card interface 195, or removed from the SIM card interface 195 to enable contact and separation with the electronic device 100. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support Nano SIM cards, micro SIM cards, and the like. The same SIM card interface 195 may be used to insert multiple cards simultaneously. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, i.e.: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
The display method of the chessboard layout objects provided by the embodiment of the application can be applied to the electronic equipment with the communication function. The electronic device includes a terminal device, and specific device forms and the like of the terminal device may refer to the above related descriptions, which are not repeated herein.
The embodiment of the application provides electronic equipment, which comprises: comprising the following steps: a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to cause the terminal device to perform the method described above.
The embodiment of the application provides a chip. The chip comprises a processor for invoking a computer program in a memory to perform the technical solutions in the above embodiments. The principle and technical effects of the present application are similar to those of the above-described related embodiments, and will not be described in detail herein.
The embodiment of the application also provides a computer readable storage medium. The computer-readable storage medium stores a computer program. The computer program realizes the above method when being executed by a processor. The methods described in the above embodiments may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer readable media can include computer storage media and communication media and can include any medium that can transfer a computer program from one place to another. The storage media may be any target media that is accessible by a computer.
In one possible implementation, the computer readable medium may include RAM, ROM, compact disk-read only memory (CD-ROM) or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium targeted for carrying or storing the desired program code in the form of instructions or data structures and accessible by a computer. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (Digital Subscriber Line, DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes optical disc, laser disc, optical disc, digital versatile disc (Digital Versatile Disc, DVD), floppy disk and blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
Embodiments of the present application provide a computer program product comprising a computer program which, when executed, causes a computer to perform the above-described method.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processing unit of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing detailed description of the application has been presented for purposes of illustration and description, and it should be understood that the foregoing is by way of illustration and description only, and is not intended to limit the scope of the application.
The term "plurality" herein refers to two or more. The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship; in the formula, the character "/" indicates that the front and rear associated objects are a "division" relationship. In addition, it should be understood that in the description of the present application, the words "first," "second," and the like are used merely for distinguishing between the descriptions and not for indicating or implying any relative importance or order.
It will be appreciated that the various numerical numbers referred to in the embodiments of the present application are merely for ease of description and are not intended to limit the scope of the embodiments of the present application.
It should be understood that, in the embodiment of the present application, the sequence number of each process does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.

Claims (16)

1. A method for displaying objects in a checkerboard layout, the method comprising:
displaying a first interface, wherein the first interface comprises a plurality of objects in a chessboard layout, and the central position of a first object in the plurality of objects is overlapped with the central position of a screen of the electronic equipment;
controlling the plurality of objects to slide a first distance toward a first direction in response to an operation of sliding the objects;
when the sliding operation is finished, controlling the plurality of objects to slide towards a second direction for a second distance;
and displaying a second interface, wherein the second interface comprises a plurality of objects in a chessboard layout, and the center position of a second object in the plurality of objects is overlapped with the center position of the screen.
2. The method of claim 1, wherein when the first direction comprises one direction, the second direction is the same as the first direction;
when the first direction includes at least one direction, the second direction is a sliding direction at the end of a sliding operation.
3. The method of claim 1 or 2, wherein prior to controlling the plurality of objects to slide a second distance toward a second direction, further comprising:
Acquiring a sliding speed at the end of a sliding operation;
and when the sliding speed is greater than or equal to a speed threshold, acquiring the second distance according to the sliding speed at the end of the sliding operation.
4. A method according to claim 3, wherein the sliding speed comprises an X-axis speed and a Y-axis speed, and the second distance comprises a distance of the X-axis and a distance of the Y-axis;
the obtaining the second distance according to the sliding speed at the end of the sliding operation includes:
acquiring the distance of the X axis according to the speed of the X axis;
and acquiring the distance of the Y axis according to the speed of the Y axis.
5. The method according to claim 3 or 4, characterized in that when the sliding operation is ended, the method further comprises:
determining a third object nearest to the center position of the screen;
calculating a limiting distance towards the opposite direction of the second direction according to the central position of the third object and the grid, wherein the limiting distance is the maximum distance of sliding of the objects towards the second direction;
after the second distance is acquired, the method further comprises:
and determining a third distance according to the limiting distance and the second distance.
6. The method of claim 5, wherein determining a third distance based on the limiting distance and the second distance comprises:
when the second distance is less than or equal to the limit distance, taking the second distance as the third distance;
and when the second distance is larger than the limiting distance, taking the limiting distance as the third distance.
7. The method of claim 5 or 6, wherein the controlling the plurality of objects to slide a second distance toward a second direction comprises:
controlling the plurality of objects to slide the third distance toward the second direction.
8. The method of claim 5 or 6, wherein after determining the third distance, further comprising:
determining a fourth object closest to a target position, wherein the target position is a position which is the third distance from the central position of the screen;
acquiring a fourth distance between the center position of the fourth object and the center position of the screen;
generating an inertial sliding motion effect according to the fourth distance;
playing the inertial sliding motion effect;
the displaying a second interface includes:
And when the sliding speed is smaller than the speed threshold value, displaying a third interface, wherein the center position of the third object in the third interface is overlapped with the center position of the screen.
9. The method of claim 8, wherein generating an inertial sliding motion effect based on the fourth distance comprises:
acquiring the duration of the inertial sliding movement effect according to the fourth distance;
determining the number of image frames included in the inertial sliding motion effect according to the refreshing rate of the screen and the duration;
and generating the inertial sliding motion effect according to the position of each object at the end of the sliding operation, the fourth distance and the image frame number.
10. A method for displaying objects in a checkerboard layout, the method comprising:
displaying a first interface, wherein the first interface comprises a plurality of objects in a chessboard layout, and the central position of a first object in the plurality of objects is overlapped with the central position of a screen of the electronic equipment;
controlling the plurality of objects to slide a first distance toward a first direction in response to an operation of sliding the objects;
when the sliding operation is finished, determining a fourth object closest to a target position, wherein the target position is a position which is a third distance from the central position of the screen, and the third distance is a distance that the plurality of objects should continue sliding when the sliding operation is finished;
Acquiring a fourth distance between the center position of the fourth object and the center position of the screen;
generating an inertial sliding motion effect according to the fourth distance;
and playing the inertial sliding movement effect.
11. The method of claim 10, wherein when the sliding operation is finished, the method further comprises:
acquiring a sliding speed at the end of a sliding operation;
when the sliding speed is greater than or equal to a speed threshold, acquiring a second distance according to the sliding speed at the end of the sliding operation;
determining a third object nearest to the center position of the screen;
calculating a limiting distance towards the opposite direction of the sliding direction when the sliding operation is finished according to the central position of the third object and the grid, wherein the limiting distance is the maximum distance that the plurality of objects should continue sliding when the sliding operation is finished;
and determining a third distance according to the limiting distance and the second distance.
12. The method of claim 11, wherein the sliding speed comprises an X-axis speed and a Y-axis speed, and the second distance comprises a distance of the X-axis and a distance of the Y-axis;
the obtaining the second distance according to the sliding speed at the end of the sliding operation includes:
Acquiring the distance of the X axis according to the speed of the X axis;
and acquiring the distance of the Y axis according to the speed of the Y axis.
13. The method according to claim 11 or 12, wherein said determining a third distance from said limiting distance, and said second distance, comprises:
when the second distance is less than or equal to the limit distance, taking the second distance as the third distance;
and when the second distance is larger than the limiting distance, taking the limiting distance as the third distance.
14. The method according to any one of claims 11-13, further comprising:
and when the sliding speed is smaller than the speed threshold value, displaying a third interface, wherein the center position of the third object in the third interface is overlapped with the center position of the screen.
15. An electronic device, comprising: a processor and a memory;
the memory stores computer-executable instructions;
the processor executing computer-executable instructions stored in the memory, causing the processor to perform the method of any one of claims 1-14.
16. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program or instructions, which when executed, implement the method of any of claims 1-14.
CN202310798469.3A 2023-06-29 2023-06-29 Display method of chessboard layout object, electronic equipment and readable storage medium Pending CN117032851A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310798469.3A CN117032851A (en) 2023-06-29 2023-06-29 Display method of chessboard layout object, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310798469.3A CN117032851A (en) 2023-06-29 2023-06-29 Display method of chessboard layout object, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN117032851A true CN117032851A (en) 2023-11-10

Family

ID=88601140

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310798469.3A Pending CN117032851A (en) 2023-06-29 2023-06-29 Display method of chessboard layout object, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN117032851A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101578578A (en) * 2007-01-07 2009-11-11 苹果公司 Application programming interfaces for scrolling operations
CN102129340A (en) * 2009-12-25 2011-07-20 爱信艾达株式会社 Map display system, map display method, and computer-readable storage medium
CN102375588A (en) * 2010-08-19 2012-03-14 上海博泰悦臻电子设备制造有限公司 Method and device for controlling equipment operation through gesture on screen of electronic equipment
WO2017097142A1 (en) * 2015-12-09 2017-06-15 阿里巴巴集团控股有限公司 Interface operation processing method and apparatus, and a smart terminal
CN107168628A (en) * 2017-04-25 2017-09-15 福建星网视易信息系统有限公司 A kind of screen sliding display methods and device
CN109976609A (en) * 2019-03-18 2019-07-05 努比亚技术有限公司 Slide response method, wearable device and computer readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101578578A (en) * 2007-01-07 2009-11-11 苹果公司 Application programming interfaces for scrolling operations
CN102129340A (en) * 2009-12-25 2011-07-20 爱信艾达株式会社 Map display system, map display method, and computer-readable storage medium
CN102375588A (en) * 2010-08-19 2012-03-14 上海博泰悦臻电子设备制造有限公司 Method and device for controlling equipment operation through gesture on screen of electronic equipment
WO2017097142A1 (en) * 2015-12-09 2017-06-15 阿里巴巴集团控股有限公司 Interface operation processing method and apparatus, and a smart terminal
CN107168628A (en) * 2017-04-25 2017-09-15 福建星网视易信息系统有限公司 A kind of screen sliding display methods and device
CN109976609A (en) * 2019-03-18 2019-07-05 努比亚技术有限公司 Slide response method, wearable device and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN110377250B (en) Touch method in screen projection scene and electronic equipment
EP3910457A1 (en) Image rendering method and electronic device
EP4002066A1 (en) Air gesture interaction method and electronic device
US10630629B2 (en) Screen display method, apparatus, terminal, and storage medium
CN111447074B (en) Reminding method, device, equipment and medium in group session
CN109948581B (en) Image-text rendering method, device, equipment and readable storage medium
CN108958587B (en) Split screen processing method and device, storage medium and electronic equipment
CN111462742B (en) Text display method and device based on voice, electronic equipment and storage medium
US20230119849A1 (en) Three-dimensional interface control method and terminal
CN111142838A (en) Audio playing method and device, computer equipment and storage medium
CN112825048B (en) Message reminding method and device, electronic equipment and storage medium
WO2022166713A1 (en) Electronic device and display method for application thereof, and medium
CN112023403B (en) Battle process display method and device based on image-text information
KR20170055296A (en) Tethering type head mounted display and method for controlling the same
CN109040427B (en) Split screen processing method and device, storage medium and electronic equipment
EP4321978A1 (en) Display method, electronic device, storage medium and program product
CN113391865B (en) Scenario chatting method, scenario chatting device, terminal, server and storage medium
CN117032851A (en) Display method of chessboard layout object, electronic equipment and readable storage medium
CN114327197B (en) Message sending method, device, equipment and medium
CA2873555A1 (en) Device and method for processing user input
EP4210307A1 (en) Incoming call prompting method and electronic device
CN116048236B (en) Communication method and related device
EP4283450A1 (en) Display method, electronic device, storage medium, and program product
CN113064537B (en) Media resource playing method, device, equipment, medium and product
CN115379274A (en) Interaction method and device based on picture, electronic equipment and storage medium

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