Card aggregation method and device, readable medium and computer product
By dynamically adjusting the container height and rounded corners during the sliding operation, the problem that existing technologies can only aggregate cards of the same size is solved, enabling the aggregation of cards of different sizes and types, thus improving the interface display effect and application scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZTE CORP
- Filing Date
- 2024-11-11
- Publication Date
- 2026-05-12
AI Technical Summary
Existing technologies can only aggregate cards of the same size, which limits the types of cards and application scenarios.
By dynamically adjusting the target height of the container based on the sequence and size of the cards loaded in the container during the sliding operation, the aggregation of cards of different sizes and types is achieved. An aggregation control is used to load cards and round the corners to improve the aesthetics of the interface.
It enriches the types of cards and the interface display effects, increases the application scenarios of card aggregation, improves its breadth and applicability, and enhances the efficiency of interface utilization.
Smart Images

Figure CN122018765A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a card aggregation method, apparatus, readable medium, and computer product. Background Technology
[0002] With technological advancements, mobile applications (APPs) offer increasingly diverse functions, making operation more complex. To facilitate operation, application interfaces typically display data in lists containing multiple cards. Due to the large number of cards and limited screen size, multiple cards are often presented in an aggregated manner. However, current technologies can only aggregate cards of the same size, significantly limiting the types of cards that can be aggregated together. Summary of the Invention
[0003] This disclosure provides a card aggregation method, apparatus, readable medium, and computer product.
[0004] In a first aspect, embodiments of this disclosure provide a card aggregation method, including:
[0005] If a swipe operation is received in the display area where the first card is displayed and the swipe direction of the swipe operation matches the card aggregation method, the next second card corresponding to the first card in the swipe operation is determined according to the card sequence of the cards already loaded in the container.
[0006] During the sliding operation, the target height of the container is determined based on the sliding operation, the first height of the first card, and the second height of the second card. Then, according to the card aggregation method, at least one of the second card and the first card is displayed in the display area according to the target height of the container.
[0007] Secondly, embodiments of this disclosure also provide a card aggregation apparatus, including a memory and a processor; the memory stores a computer program executable by the processor, and the computer program, when executed by the processor, implements the card aggregation method.
[0008] Thirdly, embodiments of this disclosure also provide a computer-readable medium having a computer program stored thereon, wherein the program, when executed, implements the card aggregation method as described above.
[0009] Fourthly, this disclosure also provides a computer program product comprising a computer program that, when executed by a processor, implements the card aggregation method as described above.
[0010] The card aggregation method in this embodiment includes: when a sliding operation is received in the display area displaying the first card and the sliding direction of the sliding operation matches the card aggregation method, determining the next second card corresponding to the first card according to the card sequence of cards already loaded in the container; during the sliding operation, determining the target height of the container according to the sliding operation, the first height of the first card, and the second height of the second card, and displaying at least one of the second card and the first card in the display area according to the target height of the container according to the card aggregation method. In this embodiment, the height of the container can change with the sliding operation, and the display height of the cards carried by the container also changes accordingly. Therefore, cards of different sizes and types can be aggregated, enriching the types of cards and the interface display effect, increasing the application scenarios of card aggregation, and improving its versatility and applicability. Attached Figure Description
[0011] In the accompanying drawings of the embodiments disclosed herein:
[0012] Figure 1 This is a schematic diagram of the card aggregation process provided in an embodiment of the present disclosure;
[0013] Figure 2a A schematic diagram illustrating the lateral aggregation method and sliding direction provided in the embodiments of this disclosure;
[0014] Figure 2b This is a schematic diagram illustrating the vertical aggregation method and sliding direction provided in the embodiments of this disclosure;
[0015] Figure 2c This is a schematic diagram illustrating the stacking and aggregation method and sliding direction provided in the embodiments of this disclosure;
[0016] Figure 3 This is a comparison diagram of the card horizontal switching effect in related technologies and the card horizontal switching effect in the embodiments of this disclosure;
[0017] Figure 4 This is a schematic diagram illustrating card cutting in a horizontal aggregation method according to an embodiment of this disclosure;
[0018] Figure 5 This is a schematic diagram illustrating the rounded corner treatment under the horizontal aggregation method of this disclosure embodiment;
[0019] Figure 6 This is a schematic diagram illustrating card cutting using the vertical aggregation method disclosed in this invention;
[0020] Figure 7 This is a schematic diagram illustrating the rounded corner treatment in the vertical aggregation method of this disclosure embodiment;
[0021] Figure 8 This is a schematic diagram illustrating card cutting under the stacking and aggregation method implemented in this disclosure;
[0022] Figure 9 This is a schematic diagram illustrating the rounded corner treatment under the stacking and aggregation method of this disclosure embodiment;
[0023] Figure 10 This is a schematic diagram of the module composition of the card aggregation device provided in an embodiment of the present disclosure. Detailed Implementation
[0024] To enable those skilled in the art to better understand the technical solutions of this disclosure, the embodiments of this disclosure will be described in detail below with reference to the accompanying drawings.
[0025] The present disclosure will be described more fully below with reference to the accompanying drawings; however, the embodiments shown may be embodied in different forms, and the present disclosure should not be construed as limited to the embodiments set forth below. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will enable those skilled in the art to fully understand the scope of the disclosure.
[0026] The accompanying drawings of the embodiments disclosed herein are provided to further illustrate the embodiments of this disclosure and form part of the specification. They are used together with the detailed embodiments to explain this disclosure and do not constitute a limitation thereof. The above and other features and advantages will become more apparent to those skilled in the art from the description of the detailed embodiments with reference to the accompanying drawings.
[0027] This disclosure may be described with reference to plan and / or cross-sectional views using the ideal schematic diagrams of this disclosure. Therefore, the example illustrations may be modified according to manufacturing techniques and / or tolerances.
[0028] Where there is no conflict, the various embodiments of this disclosure and the features thereof in the embodiments may be combined with each other.
[0029] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to limit the disclosure. The term "and / or" as used in this disclosure includes any and all combinations of one or more of the associated enumerated entries. The singular forms "a" and "the" as used in this disclosure are also intended to include the plural forms, unless the context clearly indicates otherwise. The terms "comprising," "made of," etc., as used in this disclosure specify the presence of the stated feature, integral, step, operation, element, and / or component, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof.
[0030] Unless otherwise specified, all terms used in this disclosure (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning, unless expressly so defined in this disclosure.
[0031] This disclosure is not limited to the embodiments shown in the accompanying drawings, but includes modifications to the configuration based on the manufacturing process. Therefore, the areas illustrated in the drawings are schematic, and the shapes of the areas shown illustrate specific shapes of the areas of an element, but are not intended to be limiting.
[0032] In related technologies, only cards of the same size can be aggregated together, which greatly limits the number, type, and usage scenarios of the aggregated cards. To address this technical problem, this disclosure provides a card aggregation method for aggregating cards of multiple sizes. In this disclosure, "card" refers to a visual design element in an operating system, such as the Android operating system. Cards contain many interface elements that can display content and provide human-computer interaction for users. Card aggregation refers to placing multiple cards in the same area. Multiple sizes refer to cards of different sizes.
[0033] Figure 1 A schematic diagram of the card aggregation process provided in this embodiment of the disclosure. Figure 1 ,like Figure 1 As shown, the card aggregation method is applied to a card aggregation device, which can be a module in a terminal with touch display functionality. The card aggregation method includes the following steps:
[0034] Step S11: If a sliding operation is received in the display area of the first card and the sliding direction of the sliding operation matches the card aggregation method, the next second card corresponding to the first card of the sliding operation is determined according to the card sequence of the cards loaded in the container.
[0035] The display screen of a terminal with touch display function includes a display area. The display area currently displays the first card. When the user performs a swipe operation in the display area, if the swipe direction matches the card aggregation method, it means that the purpose of the swipe operation is to switch to the next card, so as to display the next card after the first card, i.e., the second card, in the display area.
[0036] In this embodiment, an externally exposed aggregation control is used to aggregate multiple cards of different sizes. This aggregation control includes a container for loading cards. The aggregation control is directly accessible externally, providing an interface for loading all internal cards. It loads externally provided cards into the container, enabling data-triggered interface updates, card caching and reuse, and the display of navigation points and other auxiliary visual effects.
[0037] After the aggregation control loads all cards into its internal container, the container measures the size of all cards and arranges them according to the measured card sizes, aggregation method, and preset card sequence to achieve horizontal, vertical, or stacked display methods. For example, taking horizontal card aggregation as an example, the height and width of all loaded cards are first measured. Then, all cards are arranged according to the preset card sequence, with the first card placed first. The second card is placed at the width of the first card plus the spacing between the two cards, and so on, with the nth card placed at the sum of the widths of the previous n-1 cards plus the spacing between the previous n-1 cards. The aggregation control can control the target height of the container based on the height of the currently displayed card.
[0038] Card aggregation methods can include, but are not limited to: horizontal card aggregation, vertical card aggregation, and stacked card aggregation. The swipe direction can include, but is not limited to: swiping left / right, and swiping up / down. A swipe direction matching a card aggregation method means one of the following: swiping left / right corresponds to horizontal card aggregation, swiping up / down corresponds to vertical aggregation, and swiping up / down corresponds to stacked card aggregation.
[0039] Figures 2a-2c This diagram illustrates the aggregation method and sliding direction provided in an embodiment of this disclosure. The light gray area represents the display area, which is visible to the user, while areas outside the display area are not visible to the user. Figure 2a and Figure 2b The area outside the light gray region is shown to illustrate the arrangement of the loaded cards. Figure 2a This is a diagram illustrating a leftward swipe in a horizontal card aggregation mode, as shown below. Figure 2a As shown, card 2 is positioned horizontally behind card 1, and the displayed card is switched from card 1 to card 2 by sliding to the left; Figure 2b This is a diagram illustrating the upward sliding motion of cards in a vertically aggregated manner, as shown below. Figure 2b As shown, card 2 is vertically positioned behind card 1, and the displayed card is switched from card 1 to card 2 by sliding upwards; Figure 2c This is a diagram illustrating the card stacking and sliding direction, as shown below. Figure 2c As shown, Card 2 is stacked after Card 1, and the displayed card is switched from Card 1 to Card 2 by sliding down.
[0040] Step S12: During the sliding operation, the target height of the container is determined based on the sliding operation, the first height of the first card, and the second height of the second card. According to the card aggregation method, at least one of the second card and the first card is displayed in the display area according to the target height of the container.
[0041] Since the card is loaded inside the container, the target height of the container determines the height of the displayed card; the target height of the container is the height of the display area. In this embodiment, the target height of the container changes with the sliding distance of the sliding operation.
[0042] The cards displayed in the display area can be one of the following: a first card, a second card, or a portion of a first card and a portion of a second card. The specific display method depends on the card aggregation method. In this step, as the swiping operation proceeds, during card switching, the first card, or the second card, or a portion of the first card and a portion of the second card, are displayed in the display area according to the target height of the container. This allows the height of the display area and the height of the displayed cards to dynamically change with the swiping operation.
[0043] Figure 3 This is a comparison diagram of the card horizontal switching effect in related technologies and the card horizontal switching effect in the embodiments of this disclosure, such as... Figure 3 As shown, the left side of the figure illustrates the card horizontal switching effect in related technologies, while the right side illustrates the card horizontal switching effect in this embodiment. Figure 3 As can be seen, in related technologies, all cards in the container are the same size, that is, card 1 and card 2 have the same height. Whether during or after switching, the height of the container (i.e., the height of the display area) remains unchanged and is always the same as before the switch. However, in this embodiment, at least two cards in the container are different in size, that is, card 1 and card 2 have different heights, with card 2 being taller than card 1. During card switching, the height of the container increases with the sliding operation. After switching, the height of the container is the height of card 2, which is greater than the height before the switch (i.e., the height of card 1).
[0044] The card aggregation method in this embodiment includes: when a sliding operation is received in the display area displaying the first card and the sliding direction of the sliding operation matches the card aggregation method, determining the next second card corresponding to the first card according to the card sequence of cards already loaded in the container; during the sliding operation, determining the target height of the container according to the sliding operation, the first height of the first card, and the second height of the second card, and displaying at least one of the second card and the first card in the display area according to the target height of the container according to the card aggregation method; in this embodiment, the height of the container can change with the sliding operation, and the display height of the cards carried by the container also changes accordingly. Therefore, cards of different sizes and types can be aggregated, enriching the types of cards and the interface display effect, increasing the application scenarios of card aggregation, and improving its versatility and applicability.
[0045] In some embodiments, determining the target height of the container based on the sliding operation, the first height of the first card, and the second height of the second card (i.e., step S12) includes the following steps:
[0046] Step S121: Determine the sliding distance based on the sliding operation, and calculate the first adjustment ratio based on the sliding distance and the preset arrangement spacing between two adjacent cards loaded in the container.
[0047] Step S122: Determine the target height of the container based on the first height, the second height, and the first adjustment ratio.
[0048] In some embodiments, the height difference between a first height and a second height is calculated, and the target height of the container is calculated based on the height difference, the first height, and a first adjustment ratio.
[0049] In this embodiment of the disclosure, the target height H of the container can be calculated according to the following formula (1):
[0050]
[0051] Where d is the sliding distance, and D is the spacing between two adjacent cards loaded in the container. H1 is the first adjustment ratio, H2 is the first height of the first card, and H2 is the second height of the second card.
[0052] As can be seen from formula (1), in this embodiment of the present disclosure, the target height of the container can be scaled proportionally according to the sliding distance, thus providing a smooth visual effect for the user.
[0053] The following sections provide detailed explanations of the card display schemes in the display area under horizontal aggregation, vertical aggregation, and stacked aggregation methods.
[0054] Figure 4 This is a schematic diagram illustrating card cutting in a horizontal aggregation mode according to an embodiment of this disclosure, as shown below. Figure 4As shown, the step of displaying at least one of the first and second cards in the display area according to the target height of the container, based on the card aggregation method, includes the following steps: when the card aggregation method is horizontal aggregation, adjusting the height of the target card (the taller of the first and second cards) according to the target height; displaying the adjusted target card and the other card (excluding the target card) in the display area. The target card refers to the taller card between the first and second cards; that is, during the sliding process, the height of the taller card is adjusted, such as shrinking, and the height of the target card (i.e., the target height of the container) changes with the sliding distance. It should be noted that the other card (excluding the target card) is also displayed in the display area, and its height remains constant during the sliding process. By adjusting the height of the target card, at least one of the two cards can be displayed in the display area. During the sliding operation, if the adjusted height of the target card decreases, a portion of the target card is displayed in the display area, and a portion of the other card is also displayed. If the adjusted height of the target card is 0, it means that the target card is not displayed, and only the other card is displayed in the display area. Figure 4 In the embodiment shown, the target card is the second card.
[0055] In some embodiments, adjusting the height of the target card (the taller of the first and second cards) according to the target height includes: cutting the target card along a first direction according to the target height. In this embodiment, the first direction is the x-axis direction. During the sliding process, the second card is cut along the x-axis direction, forming two right-angled target angles with the two sides of the second card on the left and right sides of the bottom of the second card, respectively, and only the upper half of the second card is displayed within the display area.
[0056] In some embodiments, before displaying the adjusted target card and another card (excluding the target card) in the display area, the method further includes the step of: cropping the target card and another card (excluding the target card) in the first and second cards according to a sliding operation along a second direction. Correspondingly, displaying the adjusted target card and another card (excluding the target card) in the display area includes the step of: displaying the target card (cropped along the first and second directions) and the other card (excluding the target card) in the first and second cards (cropped along the second direction) in the display area. That is, in the horizontal aggregation mode, during the sliding process, in addition to cropping in the card height direction, cropping is also performed in the card width direction. It should be noted that both the target card and the other card need to be cropped in the width direction.
[0057] In this embodiment of the disclosure, the second direction is the direction of the y-axis, such as... Figure 4 As shown, during the sliding process, the second card is cut along the y-axis, forming the target angle at the upper right corner of the second card. The first card is also cut along the y-axis, forming target angles at the upper left and lower left sides of the first card. The angles formed by these cuts are the target angles. Figure 4 The rectangle is used to indicate the card. Therefore, what is displayed in the display area is the first card, which has been cropped along the y-axis, and the second card, which has been cropped along both the x-axis and y-axis.
[0058] Because the actual height of the target card is larger than the target height of the container during the sliding process, and because the first and second cards are also clipped in the sliding direction during the sliding process, the resulting target corners are not aesthetically pleasing, causing a cluttered display interface. To solve the above problems, in some embodiments, the card aggregation method may further include the following step: rounding the target corners of the cards displayed in the display area; wherein, the target corners are the corners formed by clipping according to the sliding operation.
[0059] Figure 5 This is a schematic diagram illustrating the rounded corner treatment in the horizontal aggregation method of this disclosure embodiment, combined with... Figure 4 and Figure 5 As shown, in the horizontal aggregation mode, during the sliding process, the display area shows the right side of the first card and the left side of the second card. Therefore, Figure 4 The target corners of the first card and the target corners of the second card are rounded to achieve the effect of rounded corner cards within the display area during the sliding process.
[0060] Figure 6 This is a schematic diagram illustrating card cutting using the vertical aggregation method disclosed in this invention, as shown below. Figure 6 As shown, the step of displaying at least one of the first and second cards in the display area according to the target height of the container, based on the card aggregation method, includes the following steps: When the card aggregation method is vertical aggregation, determine the adjusted first height and the adjusted second height based on the sliding operation; the sum of the adjusted first height and the adjusted second height is the target height; adjust the first card according to the adjusted first height, and adjust the second card according to the adjusted second height; display the adjusted first card and the adjusted second card in the display area. In other words, in the vertical aggregation method, during the sliding process, one of the first card and the second card is located at the top of the display area, and the other is located at the bottom of the display area. It is necessary to simultaneously adjust the heights of the first card and the second card so that the sum of the adjusted heights of the two cards equals the current height of the container, i.e., the target height.
[0061] In some embodiments, determining the adjusted first height and the adjusted second height based on the sliding operation includes the following steps: determining the sliding distance based on the sliding operation, and calculating a second adjustment ratio based on the sliding distance and a preset arrangement spacing between two adjacent cards loaded in the container; determining the adjusted first height based on the first height and the second adjustment ratio, and determining the adjusted second height based on the second height and the second adjustment ratio.
[0062] In some embodiments, the adjusted first height H1' can be calculated using the following formula (2):
[0063] H1'= H1*(1- d / D) (2)
[0064] In some embodiments, the adjusted second height H2' can be calculated using the following formula (3):
[0065] H2'= H2* d / D (3)
[0066] Where d is the sliding distance, and D is the spacing between two adjacent cards loaded in the container. The second adjustment ratio is defined as follows: H1 is the first height of the first card, and H2 is the second height of the second card.
[0067] In some embodiments, such as Figure 6 As shown, adjusting the first card according to the adjusted first height and the second card according to the adjusted second height includes the following steps: cutting the first card along a first direction according to the adjusted first height H1' to obtain the adjusted first card; and cutting the second card along the first direction according to the adjusted second height H2' to obtain the adjusted second card. In the vertical aggregation method, only the height of the card is adjusted, not the width. Therefore, both the first and second cards are cut along the first direction, i.e., along the x-axis. The angle formed by the cutting is the target angle. Figure 6 It is marked with a rectangle.
[0068] To address the issue of unsightly target corners resulting from cropping the first and second cards in the sliding direction during the sliding process, leading to a cluttered display interface, in some embodiments, the card aggregation method may further include the following step: rounding the target corners of the cards displayed in the display area; wherein, the target corner is the corner formed by cropping according to the sliding operation.
[0069] Figure 7 This is a schematic diagram illustrating the rounded corner treatment in the vertical aggregation method of this disclosure embodiment, combined with... Figure 6 and Figure 7As shown, in the vertical aggregation mode, during the sliding process, the display area shows the upper part of the first card and the lower part of the second card. Therefore, Figure 6 The target corners of the first and second cards shown are rounded, so that during the sliding process, the display area achieves the effect of rounded corner cards.
[0070] Figure 8 This is a schematic diagram illustrating card clipping under the stacking and aggregation method implemented in this disclosure, as shown below. Figure 8 As shown, the step of displaying at least one of a second card and a first card in the display area according to the target height of the container, based on the card aggregation method, includes the following steps: when the card aggregation method is stacked aggregation, determining the adjusted first height based on the sliding operation; adjusting the first card according to the adjusted first height, and adjusting the second card according to the target height; and displaying the adjusted first card and the adjusted second card in the display area. That is, in the stacked aggregation method, during the sliding process, the first card is displayed in front and the second card is displayed behind, and the first card partially obscures the second card. Therefore, the heights of both the first and second cards need to be adjusted simultaneously. The adjusted height of the second card is the target height of the container, meaning the second card fills the entire display area, while the adjusted height of the first card is determined by the sliding distance.
[0071] In some embodiments, determining the adjusted first height based on the sliding operation includes the following steps: determining the sliding distance based on the sliding operation, and calculating a third adjustment ratio based on the sliding distance and a preset arrangement spacing between two adjacent cards loaded in the container; and determining the adjusted first height based on the first height and the third adjustment ratio.
[0072] In some embodiments, the adjusted first height H1' of the first card can be calculated using the above formula (2), wherein the third adjustment ratio is
[0073] In some embodiments, adjusting the first card according to the adjusted first height and adjusting the second card according to the target height includes the following steps: cutting the first card along a first direction according to the adjusted first height H1' to obtain the adjusted first card; and cutting the second card along the first direction according to the target height H to obtain the adjusted second card.
[0074] In the stacking aggregation method, only the height of the cards is adjusted, not their width. Therefore, both the first and second cards are clipped along the first direction, i.e., along the x-axis. The clipping angle is the target angle. Figure 8 It is marked with a rectangle.
[0075] To address the issue of unsightly target corners resulting from cropping the first and second cards in the sliding direction during the sliding process, leading to a cluttered display interface, in some embodiments, the card aggregation method may further include the following step: rounding the target corners of the cards displayed in the display area; wherein, the target corner is the corner formed by cropping according to the sliding operation.
[0076] Figure 9 This is a schematic diagram illustrating the rounded corner treatment in the stacking and aggregation method of this disclosure embodiment, combined with... Figure 8 and Figure 9 As shown, in the stacking aggregation mode, during the sliding process, the display area shows the upper part of the first card and the upper part of the second card. Therefore, Figure 8 The target corners of the first and second cards shown are rounded, so that during the sliding process, the display area achieves the effect of rounded corner cards.
[0077] In some embodiments, after displaying at least one of the second card and the first card in the display area according to the target height of the container, the card aggregation method may further include the step of adjusting the position of the display objects outside the display area in the display list according to the target height.
[0078] For example, the display list may include a display area for showing travel information, which can be used to switch between displaying multiple cards for travel information such as flights and trains. The user swipes left or right to enter the state displaying card 2. Cards 1 and 2 have different heights; that is, cards 1 and 2 can be cards of different types, styles, and heights. During the swipe to switch between card 1 and card 2, the target height of the loading card container changes accordingly. After the swipe operation is completed, switching from the shorter card 1 to the taller card 2 increases the target height of the container, and the display positions of other display objects below the display area in the display list shift downwards accordingly.
[0079] In this embodiment, in response to a user's finger swipe operation, the card switching is controlled according to the swipe direction of the finger when the finger is pressed. During the swipe, the position, height, width, and other parameters of the cards before and after the swipe are controlled according to the page-turning effects of the card container, such as smooth, flip, or wave. Specifically, during the swipe, the current height of the container is dynamically calculated based on the swipe distance and the height of the cards before and after the swipe, and the cards before and after the swipe are forcibly clipped according to the current height of the container to achieve a height change effect. In addition, during the swipe, the corners of the clipped target are rounded to improve the aesthetics of the image display. The new card is fully displayed until the swipe ends. While the height of the card and container changes, the display list containing the container also needs to change synchronously. For example, other display objects at the bottom of the display list (such as other cards) will also move down to avoid overlap.
[0080] This disclosure redesigns the implementation of card aggregation, allowing cards of different sizes to be aggregated together. During card switching, the height of the cards and containers, as well as rounded corner effects, are dynamically calculated and adjusted based on the progress of the swiping operation. This allows multiple cards of different types and styles to be aggregated together without limiting the size of the cards, thus enriching the types of cards and visual design.
[0081] This disclosure can be applied to applications with a large number of content cards, where multiple cards can be grouped together in the display list to save space. In related technologies, cards that can be grouped together are all of the same type, with uniform visual style and size. However, in this disclosure, cards of different types, with inconsistent visual styles or sizes, can be grouped together, which can improve the efficiency of the interface.
[0082] This disclosure also provides a card aggregation device, such as... Figure 10 As shown, it includes a memory and a processor; the memory stores a computer program that can be executed by the processor, and when the computer program is executed by the processor, it implements any of the card aggregation methods of the present disclosure embodiments.
[0083] Among them, the processor is a device with data processing capabilities, including but not limited to the central processing unit (CPU); the memory is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), and flash memory (FLASH); the I / O interface (read-write interface) is connected between the processor and the memory, enabling information exchange between the memory and the processor, including but not limited to the data bus (Bus).
[0084] This disclosure also provides a computer-readable medium having a computer program stored thereon, wherein the program, when executed, implements the card aggregation method as described above.
[0085] This disclosure also provides a computer program product, which includes a computer program that, when executed by a processor, implements the card aggregation method as described above.
[0086] Those skilled in the art will understand that all or some of the steps, systems, and devices disclosed above, as functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0087] In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be executed by several physical components working together.
[0088] Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit (CPU), digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technique for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH) or other disk storage; read-only optical disc (CD-ROM), digital versatile disc (DVD) or other optical disc storage; magnetic cartridges, magnetic tapes, disk storage or other magnetic storage; and any other media that can be used to store desired information and can be accessed by a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0089] This disclosure has disclosed exemplary embodiments, and although specific terminology has been used, it is for general illustrative purposes only and should not be construed as limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in connection with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in connection with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of this disclosure as set forth by the appended claims.
Claims
1. A card aggregation method, comprising: If a swipe operation is received in the display area where the first card is displayed and the swipe direction of the swipe operation matches the card aggregation method, the next second card corresponding to the first card in the swipe operation is determined according to the card sequence of the cards already loaded in the container. During the sliding operation, the target height of the container is determined based on the sliding operation, the first height of the first card, and the second height of the second card. Then, according to the card aggregation method, at least one of the second card and the first card is displayed in the display area according to the target height of the container.
2. The method according to claim 1, wherein, Determining the target height of the container based on the sliding operation, the first height of the first card, and the second height of the second card includes: The sliding distance is determined based on the sliding operation, and a first adjustment ratio is calculated based on the sliding distance and the preset arrangement spacing between two adjacent cards loaded in the container. The target height of the container is determined based on the first height, the second height, and the first adjustment ratio.
3. The method according to claim 1, wherein, The step of displaying at least one of the second card and the first card in the display area according to the target height of the container, based on the card aggregation method, includes: When the card aggregation method is horizontal aggregation, adjust the height of the target card with the larger height between the first card and the second card according to the target height; The adjusted target card, as well as another card from the first card and the second card other than the target card, are displayed in the display area.
4. The method according to claim 3, wherein, Adjusting the height of the target card (the taller of the first and second cards) according to the target height includes: The target card is cut along the first direction according to the target height.
5. The method according to claim 4, wherein, Before displaying the adjusted target card and another card other than the target card in the first and second cards in the display area, the process further includes: The target card, as well as another card other than the target card, are cut along the second direction according to the sliding operation; The step of displaying the adjusted target card in the display area, and another card other than the target card among the first card and the second card, includes: The display area displays the target card after it has been cut along the first and second directions, as well as another card from the first and second cards other than the target card after it has been cut along the second direction.
6. The method according to claim 1, wherein, The step of displaying at least one of the second card and the first card in the display area according to the target height of the container, based on the card aggregation method, includes: When the card aggregation method is vertical aggregation, the adjusted first height and the adjusted second height are determined according to the sliding operation, and the sum of the adjusted first height and the adjusted second height is the target height; Adjust the first card according to the adjusted first height, and adjust the second card according to the adjusted second height; The adjusted first card and the adjusted second card are displayed in the display area.
7. The method according to claim 6, wherein, The step of determining the adjusted first height and the adjusted second height based on the sliding operation includes: The sliding distance is determined based on the sliding operation, and the second adjustment ratio is calculated based on the sliding distance and the preset arrangement spacing between two adjacent cards loaded in the container. The adjusted first height is determined based on the first height and the second adjustment ratio, and the adjusted second height is determined based on the second height and the second adjustment ratio.
8. The method according to claim 6, wherein, The step of adjusting the first card according to the adjusted first height and adjusting the second card according to the adjusted second height includes: The first card is cut along the first direction according to the adjusted first height to obtain the adjusted first card; and the second card is cut along the first direction according to the adjusted second height to obtain the adjusted second card.
9. The method according to claim 1, wherein, The step of displaying at least one of the second card and the first card in the display area according to the target height of the container, based on the card aggregation method, includes: When the card aggregation method is stacking aggregation, the adjusted first height is determined according to the sliding operation; Adjust the first card according to the adjusted first height, and adjust the second card according to the target height; The adjusted first card and the adjusted second card are displayed in the display area.
10. The method according to claim 9, wherein, Determining the adjusted first height based on the sliding operation includes: The sliding distance is determined based on the sliding operation, and a third adjustment ratio is calculated based on the sliding distance and the preset spacing between two adjacent cards loaded in the container. The adjusted first height is determined based on the first height and the third adjustment ratio.
11. The method according to claim 9, wherein, The step of adjusting the first card according to the adjusted first height and adjusting the second card according to the target height includes: The first card is cut along the first direction according to the adjusted first height to obtain the adjusted first card; and the second card is cut along the first direction according to the target height to obtain the adjusted second card.
12. The method according to any one of claims 4, 5, 8, and 11, wherein, The method further includes: The target corners of the cards displayed in the display area are rounded; wherein, the target corners are the corners formed by cropping according to the sliding operation.
13. The method according to any one of claims 1-11, wherein, After displaying at least one of the second card and the first card in the display area according to the target height of the container, the method further includes: Adjust the position of display objects outside the display area in the display list according to the target height.
14. A card aggregation apparatus, comprising a memory and a processor; the memory storing a computer program executable by the processor, wherein the computer program, when executed by the processor, implements the card aggregation method according to any one of claims 1-13.
15. A computer-readable medium having a computer program stored thereon, wherein, When the program is executed, it implements the card aggregation method as described in any one of claims 1-13.
16. A computer program product comprising a computer program that, when executed by a processor, implements the card aggregation method according to any one of claims 1-13.