Display method and device for switching soft keyboard through expression panel and storage medium

By detecting the switching event and adjusting the display height in the soft keyboard mode in the squeezing mode, the delay jitter problem when the emoticon panel is switched back to the soft keyboard is solved, and smooth switching between the emoticon panel and the soft keyboard is achieved, improving the user experience.

CN120295530APending Publication Date: 2025-07-11HANGZHOU ALICLOUD FEITIAN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410037988.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-10
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

In the application, when the emoticon panel switches back to the soft keyboard, delayed jitter often occurs, especially after the soft keyboard height changes, delayed jitter caused by the emoticon panel and the soft keyboard height.

Method used

Use extrusion mode to detect switching events, display the soft keyboard by narrowing the input box view, and suspend the display emoticon panel when the soft keyboard height is less than or equal to the threshold, or use the historical or configured extrusion parameters to adjust the display height when switching horizontally and vertically, insert a blank view to avoid perspective problems.

Benefits of technology

It effectively avoids delayed jitter caused by soft keyboard coverage and uncovering, ensures smooth switching between the emoticon panel and the soft keyboard, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120295530A_ABST
    Figure CN120295530A_ABST
Patent Text Reader

Abstract

The invention provides a display method and device for switching an expression panel to a soft keyboard and a storage medium, and the method comprises the steps: detecting a first switching event of switching the expression panel to the soft keyboard under the condition that the mode of the soft keyboard is an extrusion mode; and in response to the first switching event, switching an expression panel displayed in a current display window of the application program into a soft keyboard according to the extrusion mode. When the switching event indicating to switch the expression panel to the soft keyboard is detected, the mode of the soft keyboard is the extrusion mode, so that in the process of switching the expression panel to the soft keyboard, the process of overlapping the soft keyboard on the expression panel does not exist. Therefore, even if the condition that the height of the soft keyboard is changed due to the change of the input method occurs before the expression panel is switched into the soft keyboard, the process of covering the input box first and then removing the covering after the soft keyboard pops up does not exist, so that the problem of delayed jitter caused by covering the input box and removing the covering does not exist.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of computer technology, and particularly relates to a method, device, and storage medium for displaying a soft keyboard with an expression panel switch. Background Art

[0002] In an application (APP), many comment input boxes integrate an emoji function, often involving the interaction between the emoji panel and the soft keyboard. For smooth switching, the emoji panel and the soft keyboard need to have the same height and adapt to the soft keyboard animation process.

[0003] In the related art, when switching the soft keyboard called by the application to the emoji panel of the application, the mode of the soft keyboard is set to the SOFT_INPUT_ADJUST_PAN mode (overlay mode), and the emoji panel is displayed at the same time. In the SOFT_INPUT_ADJUST_PAN mode, the emoji panel and the soft keyboard have the same height, and the emoji panel is displayed superimposed on the soft keyboard. After switching to the emoji panel, if the user switches the input method from the settings, the height of the soft keyboard will change. In this case, if the user switches the emoji panel back to the soft keyboard for display, there will be a problem of delay and jitter. Summary of the Invention

[0004] This application proposes a method, device, and storage medium for displaying a soft keyboard with an expression panel switch, which can alleviate the problem of delay and jitter that occurs when the expression panel is switched back to the soft keyboard for display in the related art.

[0005] The first aspect embodiment of this application proposes a method for displaying a soft keyboard with an expression panel switch, including:

[0006] When the mode of the soft keyboard is the squeeze mode, detecting a first switching event of switching from the expression panel to the soft keyboard; the squeeze mode is used to represent displaying the soft keyboard by shrinking the view where the input box is located in the window;

[0007] In response to the first switching event, switching the expression panel displayed in the current display window of the application to the soft keyboard according to the squeeze mode.

[0008] In one or more embodiments, it further includes:

[0009] When the soft keyboard is displayed, detecting a second switching event of switching from the soft keyboard to the expression panel;

[0010] In response to the second switching event, obtaining a page squeeze parameter and calculating the height of the soft keyboard; the page squeeze parameter is used to represent the squeezing deformation amount of the soft keyboard on the view where the input box is located in the current display window;

[0011] When the height of the soft keyboard is less than or equal to the height threshold, obtain the display height of the emoji panel; the height of the emoji panel is greater than the height of the soft keyboard;

[0012] Based on the display height of the emoji panel, floatingly display the emoji panel.

[0013] In one or more embodiments, obtaining a page extrusion parameter includes:

[0014] Detect the distance between the bottom of the view where the input box is located and the bottom of the current display window;

[0015] Take the distance as the page extrusion parameter.

[0016] In one or more embodiments, obtaining the display height of the emoji panel includes:

[0017] Obtain the historical height at which the application last displayed the emoji panel;

[0018] Take the historical height as the display height of the emoji panel.

[0019] In one or more embodiments, it further includes:

[0020] When the current display window is in landscape mode, it is detected that the current display window switches from landscape mode to portrait mode;

[0021] When the page view in the current display window has not been reconstructed, obtain the landscape page extrusion parameter corresponding to the landscape display and obtain the portrait page extrusion parameter for portrait display;

[0022] When the portrait page extrusion parameter is equal to the landscape page extrusion parameter, obtain a target extrusion parameter; the target extrusion parameter is equal to the portrait page extrusion parameter threshold, and the portrait page extrusion parameter threshold is used to characterize the extrusion deformation amount of the view where the input box is located when the soft keyboard is displayed in a portrait display window;

[0023] Display the current display window in portrait mode according to the portrait page extrusion parameter.

[0024] In one or more embodiments, obtaining the target extrusion parameter includes:

[0025] Obtain the historical extrusion parameter of the display window of the most recent portrait display;

[0026] Determine the historical extrusion parameter as the target extrusion parameter.

[0027] In one or more embodiments, displaying the soft keyboard in the current display window of the application according to the squeeze mode includes:

[0028] When the soft keyboard is switched from displaying the expression panel, an input box and a blank view are displayed in the same container; the blank view is used to cover the next layer view of the view where the input box is located;

[0029] The soft keyboard is displayed in the blank view according to the squeeze mode.

[0030] The second aspect of the present application provides a display device for switching an expression panel to a soft keyboard, comprising:

[0031] A detection module, configured to detect a first switching event of switching from the expression panel to the soft keyboard when the mode of the soft keyboard is a squeeze mode; the squeeze mode is used to indicate that the soft keyboard is displayed by reducing the view where the input box in the window is located;

[0032] A switching module, configured to switch the expression panel displayed in the current display window of the application to the soft keyboard in response to the first switching event according to the squeeze mode

[0033] An embodiment of the third aspect of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in the first aspect above.

[0034] An embodiment of the fourth aspect of the present application provides a computer-readable storage medium on which a computer program is stored, and the program is executed by a processor to implement the method described in the first aspect above.

[0035] The technical solution provided in the embodiments of the present application has at least the following technical effects or advantages:

[0036] In the embodiment of the present application, when a switching event indicating that the expression panel is switched to the soft keyboard is detected, the mode of the soft keyboard is the squeeze mode, so in the process of switching the expression panel to the soft keyboard, there will be no process of the soft keyboard being superimposed on the expression panel. In this way, even if the height of the soft keyboard changes due to a change in the input method before the expression panel is switched to the soft keyboard, there will be no process of the soft keyboard first covering the input box and then removing the covering after it pops up, and thus there will be no delay jitter caused by covering the input box and removing the covering.

[0037] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] By reading the following detailed description of the preferred embodiments, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of showing the preferred embodiments and are not considered to be a limitation of the present application. Moreover, throughout the drawings, the same reference numerals are used to represent the same components.

[0039] In the drawings:

[0040] FIG. 1(a) is a schematic diagram of a soft keyboard being popped up in the case where the mode of the soft keyboard in the related art is the SOFT_INPUT_ADJUST_PAN mode;

[0041] FIG. 1(b) is a schematic diagram of the soft keyboard in the related art when the mode is switched to the SOFT_INPUT_ADJUST_RESIZE mode and the soft keyboard is displayed;

[0042] Figure 2 The flowchart of a method for switching and displaying a soft keyboard of an expression panel provided by an embodiment of the present application is shown;

[0043] FIG. 3(a) is a schematic diagram of a display input box shown in an embodiment of the present application;

[0044] FIG. 3(b) is a schematic diagram of a soft keyboard being displayed in the SOFT_INPUT_ADJUST_RESIZE mode shown in an embodiment of the present application;

[0045] FIG. 4(a) is a schematic diagram of a soft keyboard being popped up when the mode of the soft keyboard is the SOFT_INPUT_ADJUST_RESIZE mode shown in an embodiment of the present application;

[0046] FIG. 4(b) is a schematic diagram of an expression panel being displayed when the mode of the soft keyboard is the SOFT_INPUT_ADJUST_RESIZE mode shown in an embodiment of the present application;

[0047] FIG. 4(c) is a schematic diagram of a soft keyboard being popped up when the mode of the soft keyboard is the SOFT_INPUT_ADJUST_RESIZE mode;

[0048] FIG. 4(d) is a schematic diagram of a soft keyboard being displayed when the mode of the soft keyboard is the SOFT_INPUT_ADJUST_RESIZE mode;

[0049] FIG. 5(a) is a schematic diagram of a soft keyboard being horizontally displayed in a display window shown in the related art;

[0050] FIG. 5(b) is a schematic diagram of a process of a soft keyboard being vertically displayed in a display window shown in the related art;

[0051] FIG. 5(c) is a schematic diagram showing the process of vertically displaying a soft keyboard in a display window in the related art;

[0052] FIG. 5(d) is a schematic diagram showing the process of vertically displaying a soft keyboard in a display window in the related art;

[0053] Figure 6 is a schematic diagram of an animated pop-up soft keyboard in the related art in the SOFT_INPUT_ADJUST_RESIZE mode;

[0054] FIG. 7(a) is a schematic diagram showing a displayed expression panel according to an embodiment of the present application;

[0055] FIG. 7(b) is a schematic diagram showing the retraction of the expression panel according to an embodiment of the present application;

[0056] FIG. 7(c) is a schematic diagram showing the retraction of the expression panel according to an embodiment of the present application;

[0057] Figure 8 shows a structural diagram of a display device for switching a soft keyboard of an expression panel provided by an embodiment of the present application;

[0058] Figure 9 shows a schematic structural diagram of an electronic device provided by an embodiment of the present application;

[0059] Figure 10 shows a schematic diagram of a storage medium provided by an embodiment of the present application. Detailed implementation

[0060] Hereinafter, the exemplary embodiments of the present application will be described in more detail with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present application can be more thoroughly understood and the scope of the present application can be fully conveyed to those skilled in the art.

[0061] It should be noted that, unless otherwise specified, the technical terms or scientific terms used in the present application should have the ordinary meanings understood by those skilled in the art to which the present application belongs.

[0062] In the related art, the process of switching the expression panel displayed by an application program to a soft keyboard is as follows. When the mode of the soft keyboard is the SOFT_INPUT_ADJUST_PAN mode, upon detecting a switching event indicating the switching of the expression panel to the soft keyboard, in response to the switching event, the soft keyboard pops up animatedly, and the soft keyboard is superimposed on the expression panel. After the soft keyboard is fully popped up, the mode of the soft keyboard is switched to

[0063] In the SOFT_INPUT_ADJUST_RESIZE mode, the expression panel is hidden. Then, the popped-up soft keyboard is displayed in the application's display window according to the SOFT_INPUT_ADJUST_RESIZE mode.

[0064] Referring to the implementation process of switching the expression panel to the soft keyboard mentioned above, assume that there is a process of switching the soft keyboard called by the application to the expression panel before this process. And after switching the soft keyboard called by the application to the expression panel, the user switches the input method in the settings, making the height of the soft keyboard greater than the height of the expression panel. On this basis, if the expression panel is switched back to the soft keyboard, since the height of the soft keyboard is greater than the height of the expression panel and the position of the input box remains unchanged, that is, the input box is still at the position when the expression panel is displayed, so when the soft keyboard is fully popped up, the soft keyboard will cover a part of the input box. Immediately after the soft keyboard is fully popped up, the mode of the soft keyboard is switched from the SOFT_INPUT_ADJUST_PAN mode to the SOFT_INPUT_ADJUST_PAN mode, and the view where the input box is located is shrunk to display the soft keyboard.

[0065] In short, when the expression panel displayed in the application is switched to the soft keyboard, there is a process where the input box is first covered, and then by shrinking the height of the view where the input box is located, the coverage of the input box is removed and the soft keyboard is displayed. The process of the input box being covered and then uncovered will cause the problem of delay jitter in the display window.

[0066] For easy understanding, schematic diagrams of switching the expression panel to the soft keyboard as shown in Figures 1(a) and 1(b) are given. In Figure 1(a), the mode of the soft keyboard is the SOFT_INPUT_ADJUST_PAN mode. A switching event indicating the switch of the expression panel to the soft keyboard is monitored. In response to this event, the soft keyboard pops up and the soft keyboard covers a part of the input box. In Figure 1(b), the soft keyboard is fully popped up, the mode of the soft keyboard is switched to the SOFT_INPUT_ADJUST_RESIZE mode, the coverage of the input box is removed, and the soft keyboard is displayed.

[0067] To alleviate the problems existing in the related art, embodiments of the present application provide a method, device, and storage medium for displaying a soft keyboard by switching an emoji panel. The method includes detecting a first switching event of switching from an emoji panel to a soft keyboard when the mode of the soft keyboard is the squeezing mode; the squeezing mode is used to represent that the soft keyboard is displayed by shrinking the view where the input box is located in the window; in response to the first switching event, according to the squeezing mode, switch the emoji panel displayed in the current display window of the application to the soft keyboard. Since the mode of the soft keyboard is the squeezing mode when detecting the switching event indicating switching from the emoji panel to the soft keyboard, there is no process of the soft keyboard overlapping the emoji panel during the process of switching the emoji panel to the soft keyboard. Thus, even if there is a situation where the height of the soft keyboard changes due to a change in the input method before the emoji panel is switched to the soft keyboard, there will be no process of the soft keyboard first covering the input box and then removing the coverage, and thus there will be no problem of delay jitter caused by covering and removing the coverage of the input box.

[0068] The following describes a method, device, and storage medium for displaying a soft keyboard by switching an emoji panel according to an embodiment of the present application with reference to the accompanying drawings.

[0069] Please refer to Figure 2 , Figure 2 which is a schematic flowchart of a method for displaying a soft keyboard by switching an emoji panel provided by an embodiment of the present application. The method can be applied to an electronic device, and the electronic device includes a terminal or a server, and the server includes but is not limited to a cloud server.

[0070] As Figure 2 shown, the method may include the following steps:

[0071] Step 201, when the mode of the soft keyboard is the squeezing mode, detect a switching event of switching from an emoji panel to a soft keyboard; the squeezing mode is used to represent that the soft keyboard is displayed by shrinking the view where the input box is located in the window.

[0072] Step 202, in response to the switching event, according to the squeezing mode, switch the emoji panel displayed in the current display window of the application to the soft keyboard.

[0073] In the solution provided by this embodiment, when detecting the switching event indicating switching from the emoji panel to the soft keyboard, the mode of the soft keyboard is the squeezing mode. Therefore, there is no process of the soft keyboard overlapping the emoji panel during the process of switching the emoji panel to the soft keyboard. Thus, even if there is a situation where the height of the soft keyboard changes due to a change in the input method before the emoji panel is switched to the soft keyboard, there will be no process of the soft keyboard first covering the input box and then removing the coverage, and thus there will be no problem of delay jitter caused by covering and removing the coverage of the input box.

[0074] To facilitate the understanding of the SOFT_INPUT_ADJUST_RESIZE mode, the following takes the input box triggering the display of the soft keyboard as an example to elaborate on the SOFT_INPUT_ADJUST_RESIZE mode. As shown in FIGS. 3(a) and 3(b), FIGS. 3(a) and 3(b) are schematic diagrams of the input box triggering the display of the soft keyboard shown in the embodiments of the present application. Among them, FIG. 3(a) shows a schematic diagram of the display window when the soft keyboard is not displayed, and FIG. 3(b) is, after detecting the soft keyboard opening event, in response to this soft keyboard opening event, based on the SOFT_INPUT_ADJUST_RESIZE mode, reducing the height of the view where the input box is located to display the soft keyboard.

[0075] Please refer to Figure 4(a) - Figure 4(d) , Figure 4(a) - Figure 4(b) is a schematic diagram of switching the soft keyboard to the emoji panel when the mode of the soft keyboard in the embodiments of the present application is the SOFT_INPUT_ADJUST_RESIZE mode, Figure 4(c) - Figure 4(d) is a schematic diagram of switching the emoji panel to the soft keyboard when the mode of the soft keyboard is the SOFT_INPUT_ADJUST_RESIZE mode. Among them, in FIG. 4(a), detecting a switching event indicating switching the soft keyboard to the emoji panel, the emoji panel opens, the soft keyboard 1 is hidden, and the view where the input box is located Figure 2 restores squeezing, and the view where the input box is located Figure 2 restores its height from FIG. 4(a) to FIG. 4(b). In FIG. 4(c), detecting a switching event indicating switching the emoji panel to the soft keyboard, the soft keyboard is opened, the emoji panel is hidden, and the height of the view where the input box is located is reduced until the soft keyboard is fully displayed.

[0076] In the related art, when the soft keyboard is displayed in a floating manner, the squeezing change of the soft keyboard on the view where it is located is small, that is, when the soft keyboard is floatingly displayed, the soft keyboard has a small height. In this case, if the soft keyboard is switched to the emoji panel for display, the squeezing change amount of the soft keyboard on the view will not be sufficient to clearly display the emoji panel, so the switched emoji panel will not be floatingly displayed. In the embodiments of the present application, in order to achieve floating display of the emoji panel when switching the floating soft keyboard to the emoji panel, when detecting that the soft keyboard is switched to the emoji panel, if it is determined that the soft keyboard is in a floating state, a height higher than the height of the soft keyboard is re-determined to display the emoji panel.

[0077] Specifically, in an alternative embodiment, the method further includes:

[0078] When the soft keyboard is displayed, detecting a second switching event of switching from the soft keyboard to the emoji panel;

[0079] In response to a second switching event, obtain a page squeezing parameter and calculate the height of the soft keyboard; the page squeezing parameter is used to characterize the squeezing deformation amount of the soft keyboard on the view where the input box is located in the current display window.

[0080] When the height of the soft keyboard is less than or equal to the height threshold, obtain the display height of the emoji panel; the height of the emoji panel is greater than the height of the soft keyboard.

[0081] Based on the display height of the emoji panel, the emoji panel is floatingly displayed.

[0082] It should be understood that the height threshold is used to characterize the height of the soft keyboard in the floating state. This height threshold can be set based on experience or determined based on the historical height of the soft keyboard in the floating state obtained. When determined based on the historical height of the soft keyboard in the floating state obtained, the height threshold can be directly set to the height of the soft keyboard in the floating state. On this basis, it can be understood that the obtained height of the soft keyboard being less than or equal to the height threshold indicates that the soft keyboard is currently displayed in the current display window in a floating state.

[0083] In this embodiment, the display height of the emoji panel can be artificially pre-configured, that is, artificially pre-configure the display height of the floatingly displayed emoji panel, so that when switching the floatingly displayed soft keyboard to the emoji panel, the emoji panel can be displayed based on the pre-set display height of the emoji panel.

[0084] In this embodiment, since the display effect of the emoji panel has a direct relationship with the display height of the emoji panel, in order to ensure the effect of the emoji panel, the display height of the emoji panel can also be determined based on the historical height of the emoji panel.

[0085] Specifically, in an alternative embodiment, obtaining the display height of the emoji panel includes:

[0086] Obtain the historical height of the application's most recent display of the emoji panel;

[0087] Use the historical height as the display height of the emoji panel.

[0088] In this embodiment, the page squeezing parameter is used to reflect how much the view where the input box is located is squeezed. It can be directly represented by the distance between the bottom of the view where the input box is located and the bottom of the current display window. In this embodiment, a component with the fitsSystemWindows value set to true is set in the view where the input box is located, so that the view where the input box is located can be squeezed by the soft keyboard. At the same time, an onApplyWindowInsets component is set in the view where the input box is located, and the onApplyWindowInsets component can monitor the distance between the bottom of the view where the input box is located and the bottom of the current display window.

[0089] In this embodiment, it also supports listening to the callback of the ViewTreeObserver.OnGlobalLayoutListener for layout changes to obtain page extrusion parameters. Among them, the ViewTreeObserver is an observer class used to listen to global changes in the view tree, and the ViewTreeObserver.OnGlobalLayoutListener is a callback function that needs to be called when the view tree is drawn.

[0090] In the related art, when switching the display window of the soft keyboard for landscape display to portrait display, when page reconstruction is not set for the page, there will be a problem of instant abnormal height of the soft keyboard. As an example, please refer to Figure 5(a) - Figure 5(d) , Figure 5(a) is a schematic diagram showing the soft keyboard for landscape display in the display window in the related art, Figure 5(b) - Figure 5(d) is a schematic diagram of the process of displaying the soft keyboard in portrait mode in the display window in the related art. Among them, in Figure 5(a), the page extrusion parameter is represented by x1. In Figure 5(b), the landscape display is switched to portrait display, and the extrusion of the view where the input box is located is restored. Then the electronic device obtains the height x1 of the view where the input box is located after being extruded in landscape display. In Figure 5(c), based on the height x1, the height of the view where the input box is located is reduced to x1. However, due to system anomalies, there is a probability that the height of the soft keyboard in portrait display is first extruded to the height x1 of the view where the input box is located, and then restored to the normal position x2. Therefore, during the process of the soft keyboard popping up, the height of the view where the input box is located will increase from x1 to x2 in Figure 5(d). Since x1 and x2 usually differ by a large amount, from the user's perspective, the position of the soft keyboard on the display window appears instantaneously abnormal, and the page jitters, that is, the page jumps up and then immediately falls, "dropping" from the position in Figure 5(c) to the position in Figure 5(d).

[0091] To alleviate this problem existing in the related art, the following solutions are given:

[0092] When the current display window is in landscape display, it is detected that the current display window is switched from landscape display to portrait display;

[0093] When the page view in the current display window has not been reconstructed, obtain the landscape page extrusion parameter corresponding to landscape display, and obtain the portrait page extrusion parameter for portrait display;

[0094] When the portrait page extrusion parameter is equal to the landscape page extrusion parameter, obtain the target extrusion parameter; the target extrusion parameter is equal to the portrait page extrusion parameter threshold, and the portrait page extrusion parameter threshold is used to characterize the extrusion deformation amount of the view where the input box is located when the soft keyboard is displayed in the portrait display window;

[0095] According to the vertical screen page squeezing parameter, the current display window is vertically displayed.

[0096] It should be understood that the horizontal screen page squeezing parameter here corresponds to x1 in Fig. 5(a), and the vertical screen page squeezing parameter corresponds to x1 in Fig. 5(c). The vertical screen page squeezing parameter being equal to the horizontal screen page squeezing parameter indicates that a height callback anomaly is detected. If this situation is processed according to the related technology, the view where the input box is located will be instantaneously pushed to a very high position (i.e., Fig. 5(c)), then the height of the soft keyboard will immediately return to normal, and the view where the input box is located will return to normal (i.e., Fig. 5(d)), resulting in a problem of page jitter. In this embodiment, when a height callback anomaly is detected, using a target squeezing parameter greater than the vertical screen page squeezing parameter threshold to display the current display window can greatly alleviate this problem.

[0097] In this embodiment, the vertical screen page squeezing parameter threshold can be represented by the historical vertical screen page squeezing parameter or can be configured manually. This embodiment does not make specific limitations on this.

[0098] In this embodiment, the target squeezing parameter can be manually pre-configured, that is, the target squeezing parameter is manually pre-configured. In this way, when switching from horizontal screen display to vertical screen display, the current display window can be vertically displayed based on the pre-set target squeezing parameter.

[0099] In this embodiment, the target squeezing parameter can also be determined based on the historical squeezing parameter of the display window in the most recent vertical screen display. Determining the target squeezing parameter based on the historical squeezing parameter can improve the accuracy of the obtained target squeezing parameter and is beneficial for further alleviating the problem of instantaneous abnormal height of the soft keyboard.

[0100] It should be understood that in practical applications, preferably, the historical squeezing parameter of the display window in the most recent vertical screen display is used as the target squeezing parameter. In the case where the historical squeezing parameter of the display window in the most recent vertical screen display is not recorded, the manually pre-configured parameter is used as the target squeezing parameter.

[0101] In the related technology, in the SOFT_INPUT_ADJUST_RESIZE mode, during the animation process of opening the soft keyboard, there will be a perspective problem between the input box and the soft keyboard. As an example, please refer to Figure 6 , Figure 6 which is a schematic diagram of the soft keyboard popping up in the SOFT_INPUT_ADJUST_RESIZE mode in the related technology. As shown in Figure 6 , when the soft keyboard is not fully popped up, the part between the input box and the soft keyboard will be perspective to the lower layer view of the view where the input box is located.

[0102] To alleviate this problem, in the embodiments of the present application, the step of displaying the soft keyboard in the current display window of the application according to the squeezing mode may specifically include:

[0103] In the case of switching from displaying the emoji panel to displaying the soft keyboard, an input box and a blank view are displayed in the same container; the blank view is used to block the view layer below the view where the input box is located;

[0104] The soft keyboard is displayed in the blank view according to the squeezing mode.

[0105] In the embodiments of the present application, a blank view is inserted between the view where the input box is located and the view layer below the view where the input box is located. The height of this blank view can be set to be higher than the height of the soft keyboard corresponding to the input method. Moreover, the blank view is stored in the container for storing the view where the input box is located, and the distance between the blank view and the bottom of the view where the input box is located is set to a negative value, that is, the negative height of the blank view. For example, if the height of the blank view is 2000dp, then the distance between the blank view and the bottom of the view where the input box is located is -2000dp. Here, setting the distance between the blank view and the bottom of the view where the input box is located to a negative value can ensure that the blank view is displayed outside the container. To ensure that the blank view is not truncated by the container, the container property clipChildren = "false" is also set.

[0106] As an example, please refer to Figure 7(a) - Figure 7(c) , FIG. 7(a) is a schematic diagram showing the display of the emoji panel in the embodiments of the present application, FIG. 7(b) is a schematic diagram showing the retraction of the emoji panel in the embodiments of the present application, and FIG. 7(c) is a schematic diagram showing the retraction of the emoji panel in the embodiments of the present application. During the process of switching the emoji panel to the soft keyboard, a blank view is displayed between the input box and the soft keyboard, and the blank view can block the view layer below the view where the input box is located. At the same time, since the blank view is stored in the container of the view where the input box is located, this blank view does not occupy space.

[0107] The embodiments of the present application further provide a display device for switching the emoji panel to the soft keyboard, which is used to execute the method for switching the emoji panel to the soft keyboard provided in any of the above embodiments. As Figure 8 shown, the device includes:

[0108] A detection module 81, configured to detect a first switching event of switching from the emoji panel to the soft keyboard when the mode of the soft keyboard is the squeezing mode; the squeezing mode is used to represent that the soft keyboard is displayed by shrinking the view where the input box is located in the window;

[0109] A switching module 82, configured to, in response to the first switching event, switch the emoji panel displayed in the current display window of the application to the soft keyboard according to the squeezing mode.

[0110] In one or more embodiments, the device is further configured to:

[0111] When the soft keyboard is being displayed, detect a second switching event of switching from the soft keyboard to the emoji panel;

[0112] In response to the second switching event, obtain a page squeezing parameter and calculate the height of the soft keyboard; the page squeezing parameter is used to characterize the squeezing deformation amount of the soft keyboard on the view where the input box is located in the current display window;

[0113] When the height of the soft keyboard is less than or equal to a height threshold, obtain the display height of the emoji panel; the display height of the emoji panel is greater than the height of the soft keyboard;

[0114] Based on the display height of the emoji panel, display the emoji panel in a floating manner.

[0115] In one or more embodiments, the device is configured to:

[0116] Detect the distance between the bottom of the view where the input box is located and the bottom of the current display window;

[0117] Use the distance as the page squeezing parameter.

[0118] In one or more embodiments, the device is configured to:

[0119] Obtain the historical height at which the application last displayed the emoji panel;

[0120] Use the historical height as the display height of the emoji panel.

[0121] In one or more embodiments, the device is further configured to:

[0122] When the current display window is in landscape mode, detect that the current display window switches from landscape mode to portrait mode;

[0123] When the page view in the current display window has not been rebuilt, obtain the landscape page squeezing parameter corresponding to the landscape display and obtain the portrait page squeezing parameter for portrait display;

[0124] When the portrait page squeezing parameter is equal to the landscape page squeezing parameter, obtain a target squeezing parameter; the target squeezing parameter is equal to the portrait page squeezing parameter threshold, and the portrait page squeezing parameter threshold is used to characterize the squeezing deformation amount of the view where the input box is located when the soft keyboard is displayed in a portrait-oriented window;

[0125] Display the current display window in portrait mode according to the portrait page squeezing parameter.

[0126] In one or more embodiments, the device is further configured to:

[0127] Obtain historical squeezing parameters of the display window that was last vertically displayed;

[0128] Determine that the historical squeezing parameters are the target squeezing parameters.

[0129] In one or more embodiments, the switching module 82 is configured to:

[0130] When switching from displaying an expression panel to displaying the soft keyboard, display an input box and a blank view in the same container; the blank view is used to obscure the view layer below the view where the input box is located;

[0131] Display the soft keyboard in the blank view according to the squeezing mode.

[0132] The display device for switching the soft keyboard by the expression panel provided by the embodiments of the present application and the display method for switching the soft keyboard by the expression panel provided by the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the method adopted, run, or implemented by it.

[0133] The embodiments of the present application further provide an electronic device to execute the above-mentioned display method for switching the soft keyboard by the expression panel. Please refer to Figure 9 It shows a schematic diagram of an electronic device provided by some embodiments of the present application. As Figure 9 shown, the electronic device 9 includes: a processor 900, a memory 901, a bus 902, and a communication interface 903. The processor 900, the communication interface 903, and the memory 901 are connected through the bus 902; a computer program that can run on the processor 900 is stored in the memory 901, and when the processor 900 runs the computer program, it executes the display method for switching the soft keyboard by the expression panel provided by any of the foregoing embodiments of the present application.

[0134] Among them, the memory 901 may include a high-speed random access memory (RAM: Random Access Memory), and may also include a non-volatile memory, such as at least one disk memory. Through at least one communication interface 903 (which can be wired or wireless), a communication connection is realized between the device network element and at least one other network element, and the Internet, wide area network, local area network, metropolitan area network, etc. can be used.

[0135] The bus 902 can be an ISA bus, a PCI bus, an EISA bus, or the like. The bus can be divided into an address bus, a data bus, a control bus, and the like. Among them, the memory 901 is used to store a program. After receiving an execution instruction, the processor 900 executes the program. The method for displaying the expression panel switching soft keyboard disclosed in any implementation manner of the embodiments of the present application can be applied to or implemented by the processor 900.

[0136] The processor 900 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit in the hardware of the processor 900 or the instructions in the form of software. The above-mentioned processor 900 can be a general-purpose processor, including a central processing unit (CPU for short), a network processor (NP for short), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being executed by the hardware decoding processor, or executed by the combination of the hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. This storage medium is located in the memory 901, and the processor 900 reads the information in the memory 901 and combines its hardware to complete the steps of the above method.

[0137] The electronic device provided by the embodiments of the present application and the method for displaying the expression panel switching soft keyboard provided by the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the method adopted, run, or implemented by it.

[0138] The embodiments of the present application also provide a computer-readable storage medium corresponding to the method for displaying the expression panel switching soft keyboard provided in the foregoing embodiments. Please refer to Figure 10 , which shows that the computer-readable storage medium is an optical disc 30, on which a computer program (i.e., a program product) is stored. When the computer program is run by a processor, it will execute the method for displaying the expression panel switching soft keyboard provided in any of the foregoing embodiments.

[0139] It should be noted that examples of the computer-readable storage medium may further include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory, or other optical and magnetic storage media, which will not be elaborated herein one by one.

[0140] The computer-readable storage medium provided by the above embodiments of the present application and the display method of the expression panel switching soft keyboard provided by the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run, or implemented by the application programs stored therein.

[0141] It should be noted that:

[0142] In the specification provided herein, a large number of specific details are set forth. However, it can be understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known structures and technologies have not been shown in detail so as not to obscure the understanding of this specification.

[0143] Similarly, it should be understood that, in order to streamline the present application and assist in understanding one or more of the various inventive aspects, in the foregoing description of the exemplary embodiments of the present application, the various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, the disclosed method should not be construed as reflecting the following schematic view: that the claimed present application requires more features than those expressly recited in each claim. Rather, as reflected by the following claims, the inventive aspects lie in less than all the features of the single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into the detailed description, where each claim stands on its own as a separate embodiment of the present application.

[0144] In addition, those skilled in the art can understand that, although some of the embodiments described herein include certain features included in other embodiments but not other features, the combination of the features of different embodiments means that it is within the scope of the present application and forms different embodiments. For example, in the following claims, any one of the claimed embodiments can be used in any combination.

[0145] The above is only the preferred specific embodiment of the present application, but the protection scope of the present application is not limited thereto. Any change or replacement that can be easily thought of by those skilled in the art within the technical scope disclosed by the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. A method for displaying a soft keyboard by switching an expression panel, characterized in that, Comprising: When the mode of the soft keyboard is the squeezing mode, detecting a first switching event of switching from the expression panel to the soft keyboard; The squeezing mode is used to represent that the soft keyboard is displayed by shrinking the view where the input box is located in the window; In response to the first switching event, switching the expression panel displayed in the current display window of the application to the soft keyboard according to the squeezing mode.

2. The method according to claim 1, wherein Also comprising: When the soft keyboard is displayed, detecting a second switching event of switching from the soft keyboard to the expression panel; In response to the second switching event, obtaining a page squeezing parameter and calculating the height of the soft keyboard; The page squeezing parameter is used to represent the squeezing deformation amount of the soft keyboard on the view where the input box is located in the current display window; When the height of the soft keyboard is less than or equal to the height threshold, obtaining the display height of the expression panel; the display height of the expression panel is greater than the height of the soft keyboard; Based on the display height of the expression panel, floatingly displaying the expression panel.

3. The method according to claim 2, wherein Obtaining a page squeezing parameter includes: Detecting the distance between the bottom of the view where the input box is located and the bottom of the current display window; Taking the distance as the page squeezing parameter.

4. The method according to claim 2, wherein Obtaining the display height of the expression panel includes: Obtaining the historical height of the expression panel when the application last displayed the expression panel; Taking the historical height as the display height of the expression panel.

5. The method according to claim 1, wherein Also comprising: When the current display window is displayed in landscape mode, detecting that the current display window switches from landscape display to portrait display; When the page view in the current display window has not been reconstructed, obtaining the landscape page squeezing parameter corresponding to the landscape display and obtaining the portrait page squeezing parameter for portrait display; When the portrait page squeezing parameter is equal to the landscape page squeezing parameter, obtaining a target squeezing parameter; the target squeezing parameter is greater than or equal to the portrait page squeezing parameter threshold, and the portrait page squeezing parameter threshold is used to represent the squeezing deformation amount of the view where the input box is located when the soft keyboard is displayed in a portrait display window; The portrait page squeezing parameter; Displaying the current display window in portrait mode according to the portrait page squeezing parameter.

6. The method according to claim 4, wherein Obtaining a target squeezing parameter includes: Obtaining the historical squeezing parameter of the display window when it was last displayed in portrait mode; Determining the historical squeezing parameter as the target squeezing parameter.

7. The method according to claim 1, wherein Displaying the soft keyboard in the current display window of the application according to the squeezing mode includes: When switching from displaying the expression panel to displaying the soft keyboard, displaying the input box and a blank view in the same container; the blank view is used to block the view on the lower layer of the view where the input box is located; Displaying the soft keyboard in the blank view according to the squeezing mode.

8. A display device for switching a soft keyboard of an expression panel, characterized in that, Comprising: A detection module, configured to detect a first switching event of switching from the expression panel to the soft keyboard when the mode of the soft keyboard is the squeezing mode; The squeezing mode is used to represent that the soft keyboard is displayed by shrinking the view where the input box is located in the window; A switching module, configured to, in response to the first switching event, switch the expression panel displayed in the current display window of the application program to the soft keyboard according to the squeezing mode.

9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor runs the computer program to implement the method according to any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the method according to any one of claims 1-7.