WO2021232960A1 - Method and apparatus for displaying user interface, terminal and storage medium - Google Patents
Method and apparatus for displaying user interface, terminal and storage medium Download PDFInfo
- Publication number
- WO2021232960A1 WO2021232960A1 PCT/CN2021/085049 CN2021085049W WO2021232960A1 WO 2021232960 A1 WO2021232960 A1 WO 2021232960A1 CN 2021085049 W CN2021085049 W CN 2021085049W WO 2021232960 A1 WO2021232960 A1 WO 2021232960A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- resolution
- screen
- current
- target
- size
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/16—Constructional details or arrangements
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/16—Constructional details or arrangements
- G06F1/1613—Constructional details or arrangements for portable computers
- G06F1/1633—Constructional details or arrangements of portable computers not specific to the type of enclosures covered by groups G06F1/1615 - G06F1/1626
- G06F1/1637—Details related to the display arrangement, including those related to the mounting of the display in the housing
- G06F1/1652—Details related to the display arrangement, including those related to the mounting of the display in the housing the display being flexible, e.g. mimicking a sheet of paper, or rollable
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/14—Digital output to display device ; Cooperation and interconnection of the display device with other functional units
- G06F3/147—Digital output to display device ; Cooperation and interconnection of the display device with other functional units using display panels
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
Definitions
- the embodiments of the present application relate to the field of terminal technology, and in particular, to a display method, device, terminal, and storage medium of a user interface.
- the screen resolution of the terminal is also continuously improving, in order to achieve a more delicate display effect.
- the user interface of the application program needs to be adapted according to the screen resolution.
- the interface filling area such as black filling area
- the playback interface of the video application the upper and lower areas of the video screen in the playback interface need to be filled with the interface The area is filled.
- the embodiments of the present application provide a method, device, terminal, and storage medium for displaying a user interface.
- the technical solution is as follows:
- an embodiment of the present application provides a method for displaying a user interface.
- the method is used in a terminal with a flexible display screen.
- the terminal includes a first housing and a second housing.
- the first housing is slidably connected, and the second housing and the first housing change the exposed display area of the flexible display screen through relative movement, and the method includes:
- the current screen resolution is the resolution of the current exposed display area of the flexible display screen
- the flexible display screen is controlled to expand and contract according to the target screen resolution, wherein the interface fill area corresponding to the target screen resolution occupies a low proportion
- the proportion of the interface filled area corresponding to the current screen resolution where the proportion of the interface filled area refers to the proportion of the area of the filled area other than the interface elements in the user interface;
- the user interface of the current application is displayed on the flexible display screen that has been expanded and contracted.
- an embodiment of the present application provides a user interface display device.
- the device is used in a terminal with a flexible display screen.
- the terminal includes a first housing and a second housing. In sliding connection with the first housing, the second housing and the first housing change the exposed display area of the flexible display screen through relative movement, and the device includes:
- An obtaining module configured to obtain a current screen resolution, where the current screen resolution is the resolution of the currently exposed display area of the flexible display screen;
- the control module is configured to control the expansion and contraction of the flexible display screen according to the target screen resolution in response to the current screen resolution being different from the target screen resolution corresponding to the current application, wherein the interface corresponding to the target screen resolution
- the proportion of the filled area is lower than the proportion of the filled area of the interface corresponding to the current screen resolution, and the proportion of the filled area of the interface refers to the proportion of the area of the filled area other than the interface elements in the user interface;
- the display module is configured to display the user interface of the current application on the flexible display screen that has been expanded and contracted.
- an embodiment of the present application provides a terminal, the terminal includes a processor and a memory; the memory stores at least one instruction, and the at least one instruction is used to be executed by the processor to implement the above-mentioned aspects.
- the display method of the user interface includes a processor and a memory; the memory stores at least one instruction, and the at least one instruction is used to be executed by the processor to implement the above-mentioned aspects.
- a computer-readable storage medium stores at least one instruction, and the at least one instruction is used to be executed by a processor to implement the user interface display method as described in the above aspect.
- a computer program product stores at least one instruction, and the at least one instruction is loaded and executed by a processor to implement the user interface display method as described in the foregoing aspect.
- FIG. 1 is a schematic structural diagram of a terminal in a contracted state provided by an exemplary embodiment of the present application
- Fig. 2 is a schematic structural diagram of a terminal in a stretched state provided by an exemplary embodiment of the present application
- FIG. 3 is a three-dimensional exploded schematic diagram of a terminal provided by an exemplary embodiment of the present application.
- FIG. 4 is a schematic structural diagram of a terminal cross-section in a contracted state provided by an exemplary embodiment of the present application
- Fig. 5 is a schematic structural diagram of a terminal cross-section in a stretched state provided by an exemplary embodiment of the present application
- Fig. 6 shows a flowchart of a method for displaying a user interface provided by an exemplary embodiment of the present application
- FIG. 7 is an interface schematic diagram of an implementation process of a user interface display method provided by an exemplary embodiment of the present application.
- FIG. 8 is a flowchart of a method for displaying a user interface according to another exemplary embodiment of the present application.
- Fig. 9 is a schematic diagram of an interface showing a screen size adjustment process according to an exemplary embodiment
- Fig. 10 is a schematic diagram of an interface showing a screen size adjustment process according to another exemplary embodiment
- FIG. 11 shows a structural block diagram of a display device for a user interface provided by an embodiment of the present application.
- FIG. 12 shows a structural block diagram of a terminal provided by an exemplary embodiment of the present application.
- the "plurality” mentioned herein means two or more.
- “And/or” describes the association relationship of the associated objects, indicating that there can be three types of relationships, for example, A and/or B, which can mean: A alone exists, A and B exist at the same time, and B exists alone.
- the character “/” generally indicates that the associated objects before and after are in an "or” relationship.
- the display method of the user interface provided by the embodiment of the present application is applied to a terminal with a flexible display screen.
- the structure of the terminal is first described below.
- the terminal 100 in the embodiment of the present application includes a housing assembly 10, a flexible display screen 30, a driving member 50 and a driving mechanism 70.
- the housing assembly 10 is a hollow structure; components such as the driving member 50, the driving mechanism 70, and the camera 60 can all be arranged in the housing assembly 10.
- the terminal 100 in the embodiment of the present application includes, but is not limited to, mobile terminals such as mobile phones and tablets, or other portable electronic devices.
- the terminal 100 is a mobile phone as an example for description.
- the housing assembly 10 includes a first housing 12 and a second housing 14, and the first housing 12 and the second housing 14 can move relative to each other.
- the first housing 12 and the second housing 14 are slidably connected, that is, the second housing 14 can slide relative to the first housing 12.
- the first housing 12 and the second housing 14 jointly form an accommodating space 16.
- the accommodating space 16 can be used to place components such as the driving member 50, the camera 60, and the driving mechanism 70.
- the housing assembly 10 may further include a back cover 18, and the back cover 18 and the first housing 12 and the second housing 14 together form an accommodating space 16.
- the driving member 50 is disposed in the second casing 14, one end of the flexible display screen 30 is disposed in the first casing 12, the flexible display screen 30 bypasses the driving member 50, and the other end of the flexible display screen is disposed in the accommodation In the space 16, part of the flexible display screen 30 is hidden in the accommodating space 16, and part of the flexible display screen 30 hidden in the accommodating space 16 may not be lit.
- the first housing 12 and the second housing 14 are relatively far away, and the flexible display screen 30 can be driven by the driving member 50 to expand, so that more flexible display screens 30 are exposed outside the accommodating space 16.
- the flexible display screen 30 exposed to the outside of the accommodating space 16 is lighted up, so that the display area presented by the terminal 100 becomes larger.
- the driving member 50 is a rotating shaft structure with teeth 52 on the outside, and the flexible display screen 30 is linked with the driving member 50 by means of meshing or the like.
- the driving member 50 drives part of the flexible display screen 30 engaged on the driving member 50 to move and unfold.
- the driving member 50 can also be a round shaft without teeth 52.
- the driving member 50 will wind the part of the flexible display screen 30 on the driving member 50. Expand so that more flexible display screens are exposed outside the accommodating space 16 and are in a flat state.
- the driving member 50 is rotatably disposed on the second housing 14, and when the flexible display screen 30 is gradually expanded, the driving member 50 can rotate with the movement of the flexible display screen 30.
- the driving member 50 may also be fixed on the second housing 14, and the driving member 50 has a smooth surface. When the flexible display screen 30 is expanded, the driving member 50 can slidably contact with the flexible display screen 30 through its smooth surface.
- the terminal 100 further includes a resetting member (not shown). One end of the flexible display screen housed in the accommodating space 16 is linked with the resetting member. When the first housing 12 and the second housing 14 are relatively close, the resetting member drives the flexible The display screen 30 is reset, so that part of the flexible display screen is retracted into the accommodating space 16.
- the driving mechanism 70 may be disposed in the accommodating space 16, the driving mechanism 70 may be linked with the second housing 14, and the driving mechanism 70 is used to drive the second housing 14 relative to the first housing 12.
- the separation movement is performed to drive the flexible display screen assembly 30 to stretch.
- the driving mechanism 70 can also be omitted, and the user can directly move the first housing and the second housing relative to one another manually.
- FIG. 6 shows a flowchart of a method for displaying a user interface provided by an exemplary embodiment of the present application.
- the method is executed by the terminal shown in FIGS. 1 to 5 as an example for description, and the process includes the following steps:
- Step 601 Acquire the current screen resolution, which is the resolution of the current exposed display area of the flexible display screen.
- the terminal Since the exposed display area of the flexible display screen in the embodiment of the present application can change with the relative movement of the housing, the terminal needs to obtain the resolution of the current exposed display area of the flexible display screen in order to subsequently determine whether the current resolution needs to be adjusted. .
- the terminal operating system provides an interface for application program calls (which can be native applications or third-party applications), and the current application (ie, the current application) has an impact on the screen resolution.
- application program calls which can be native applications or third-party applications
- the current application ie, the current application
- the application program calls this interface to request the current screen resolution, and then executes the subsequent resolution adjustment process.
- the terminal obtains the current screen size of the current exposed display area of the flexible display screen, and then according to the full screen size, full screen resolution, and current screen size of the flexible display screen, Determine the current screen resolution.
- the embodiment of the present application does not limit the specific method for obtaining the screen resolution.
- Step 602 In response to the current screen resolution being different from the target screen resolution corresponding to the current application, the flexible display screen is controlled to expand and contract according to the target screen resolution, where the interface fill area corresponding to the target screen resolution accounts for lower than the current screen resolution
- the corresponding interface fill area percentage which refers to the area percentage of the filled area outside of the interface elements in the user interface.
- the (current application) user interface when the exposed display area of the flexible display screen is the target screen resolution, the (current application) user interface has a smaller area ratio than when the exposed display area of the flexible display screen is At the current screen resolution, the percentage of the area filled in the interface in the user interface.
- the interface filling area is an area outside the area where the interface element is located in the user interface, and is used to fill the vacancy after the interface element layout.
- the filled area of the interface is a black filled area in the user interface.
- the current application is a shooting application
- the user interface 71 ie, the shooting interface
- contains a status bar element 711 used to display a series of status controls, such as flash control, camera setting control, etc.
- the shooting screen preview element 712 and the control bar element 713 (for example, include a shutter control, a viewing control, and a lens switching control).
- the user interface 71 also includes interface filling areas 714 above and below the shooting screen preview element 712.
- the target screen resolution is determined by the current application, and the target screen resolution may be different in different scenarios. For example, when the photo shooting size is 1080 ⁇ 1080 (1:1) and (1920 ⁇ 1080) 16:9, the target screen resolution corresponding to the shooting application is different.
- the terminal checks whether the two are consistent. If the two are consistent, it indicates that the display effect of the current application is the best under the current screen resolution, so as to maintain the current screen resolution; If the two are inconsistent, it indicates that under the current screen resolution, the area of the interface filled area in the user interface is too high, and the terminal needs to adjust the current screen resolution at this time.
- the screen size and screen resolution of the terminal in the embodiment of the present application can be changed with the relative movement of the housing. Therefore, when the two are inconsistent, the terminal can change according to the target screen.
- the resolution controls the expansion and contraction of the flexible display screen, so that the screen resolution of the exposed display area of the flexible display screen reaches the target screen resolution, thereby reducing the area ratio of the interface filling area in the user interface.
- the terminal controls the relative movement of the first housing and the second housing to change the size of the exposed display area of the flexible display screen, thereby achieving the effect of adjusting the screen resolution.
- the relative movement of the first housing and the second housing is controlled by the terminal through a driving mechanism.
- the terminal controls the separation movement of the first housing and the second housing through the drive mechanism to realize the expansion of the flexible display screen; and controls the movement of the first housing and the second housing through the drive mechanism to realize the contraction of the flexible display screen.
- Step 603 Display the user interface of the current application on the retractable flexible display screen.
- the terminal displays the user interface in the current exposed display area to optimize the display effect of the user interface.
- the shooting screen preview element 712 cannot completely fill the user interface other than the status bar element 711 and the control bar element 713. At this time, The vacant area is filled by the interface filling area 714.
- the terminal can control the flexible display screen to shrink according to the corresponding target screen resolution in the current shooting mode, and display on the shrinked flexible display screen. The user interface 71, thereby eliminating the interface filling area 714 in the user interface 71.
- the flexible display screen After the flexible display screen is stretched, it not only eliminates the impact of the filling area of the interface on the user interface, but also reduces the exposed display area of the flexible display screen, which facilitates the user's one-handed operation and reduces the terminal's screen display power consumption.
- the terminal since the terminal has a flexible display screen, and the exposed display area of the flexible display screen can be changed by controlling the relative movement of the two parts of the terminal housing, the current screen resolution is compared with the target of the current application.
- the terminal can control the expansion of the flexible display according to the target screen resolution, and display the user interface of the current application on the expanded flexible display, thereby reducing the proportion of the interface filling area in the user interface and realizing the screen
- the dynamic adaptation of the resolution and the application resolution reduces the impact of the filling area of the interface on the display effect, and optimizes the display effect of the user interface.
- controlling the extension of the flexible display screen according to the target screen resolution includes:
- a telescopic instruction is sent to the screen mechanical component, and the screen mechanical component is used to control the expansion and contraction of the flexible display screen according to the expansion and contraction instruction, wherein the size of the exposed display area of the flexible display screen after the expansion and contraction is the target screen size.
- generating the scaling instruction according to the current screen size and the target screen size includes:
- the first size in the current screen size and the second size in the target screen size determine the expansion distance and the expansion mode, the first size and the second size are the screen sizes in the relative movement direction of the housing;
- sending a telescopic instruction to the screen mechanical component includes:
- the telescopic instruction is sent to the screen mechanical assembly.
- displaying the user interface of the current application on the retractable flexible display screen includes:
- Adjust the display cache and application window properties according to the target screen resolution, and the application window properties include at least the window size
- the redrawn user interface is displayed on the flexible display screen after expansion.
- the method in response to the current screen resolution being different from the target screen resolution corresponding to the current application, before controlling the expansion and contraction of the flexible display screen according to the target screen resolution, the method further includes:
- the interface element layout and interface element resolution determine the target screen resolution corresponding to the current application.
- the interface element layout includes a horizontal layout and a vertical layout
- the interface element resolution includes a horizontal resolution and a vertical resolution
- the target screen resolution corresponding to the current application including:
- controlling the flexible display screen to expand and contract according to the target screen resolution includes:
- the flexible display screen In response to the power status indicating that the power is higher than the power threshold or in the charging state, the flexible display screen is controlled to expand and contract according to the target screen resolution;
- the method also includes:
- the current screen resolution is maintained.
- the method further includes:
- the preset application type includes at least one of a shooting application, a video application, a short video application, and an album application.
- FIG. 8 shows a flowchart of a method for displaying a user interface provided by another exemplary embodiment of the present application.
- the method is executed by the terminal shown in FIGS. 1 to 5 as an example for description, and the process includes the following steps:
- Step 801 Acquire the current screen resolution, which is the resolution of the current exposed display area of the flexible display screen.
- Step 802 Determine the interface element layout of the interface elements in the user interface and the interface element resolution corresponding to each interface element.
- the terminal when determining the target screen resolution of the user interface, obtains the element layout of each interface element in the user interface corresponding to the current application, and each interface The interface element resolution of the element.
- the layout of the interface elements may be an absolute layout or a relative layout of the interface elements in the user interface.
- the element layout and interface element resolution can be provided to the terminal operating system by the current application.
- the process of determining the target screen resolution may also be executed by the current application, and the current application directly provides the target screen resolution to the terminal operating system. This embodiment does not limit this.
- the terminal obtains that the resolution of the interface element corresponding to the status bar element in the shooting interface is 1080 ⁇ 150, the resolution of the interface element corresponding to the preview element of the shooting screen is 1080 ⁇ 1080, and the resolution of the interface element corresponding to the control bar element is 1080 ⁇ 350, and the interface element layout corresponding to the status bar element is at the top of the user interface, the interface element layout corresponding to the control bar element is at the bottom of the user interface, and the interface element layout corresponding to the shooting screen preview element is between the status bar element and the control bar element .
- Step 803 Determine the target screen resolution corresponding to the current application according to the interface element layout and the interface element resolution.
- the terminal determines the respective resolutions of the height and width of the screen area for the best display effect according to the layout of the interface elements and the resolution of the interface elements, thereby determining the target screen resolution.
- the current screen resolution and the target screen resolution are the resolutions in the direction of expansion and contraction of the flexible display screen (that is, the direction of relative movement with the housing).
- the terminal determines the target horizontal resolution according to the horizontal layout of each interface element and the horizontal resolution of the interface element; determines the target according to the vertical layout of each interface element and the vertical resolution of the interface element Vertical resolution.
- the terminal when the interface element layout indicates that the status bar element, the shooting screen preview element, and the control bar element in the shooting interface are located in the same vertical position and different horizontal positions, the terminal will set the status bar element, shooting screen preview element, and
- the target screen resolution is 1080 ⁇ 1580.
- the foregoing embodiment only takes the shooting interface of the camera application as an example for description, and does not limit the specific calculation method and the layout of the interface elements of the user interface.
- Step 804 in response to the current screen resolution being different from the target screen resolution corresponding to the current application, determine the current screen size and the target screen size corresponding to the target screen resolution.
- the terminal Since the screen resolution of the exposed display area of the flexible display is closely related to its size, and the terminal is also dynamically adjusted by adjusting the size of the exposed display area, the terminal needs to be based on the current screen size before controlling the expansion and contraction of the flexible display. As well as the target screen size, the amount of expansion and contraction of the flexible display screen can be shown.
- the terminal determines the current screen size according to the current screen resolution, and determines the target screen size according to the target screen resolution, where the current screen size and the target screen size are the direction of the flexible display The size of the relative movement direction of the body.
- current screen size (current screen resolution/full screen resolution) ⁇ full screen resolution
- target screen resolution (target screen size/full screen size) ⁇ full screen resolution
- the full screen resolution of the flexible display is 2600 (the minimum screen resolution is 1080), and the corresponding full screen size is 13cm (the minimum screen size is 8cm).
- the current screen resolution is 1920
- the target screen resolution is 1580
- Step 805 Generate a stretch instruction according to the current screen size and the target screen size.
- the terminal determines the telescopic distance and the telescopic method according to the current screen size and the target screen size, thereby generating a telescopic instruction that can be recognized by the mechanical components of the screen, and then controlling the relative movement of the housing through the screen control component.
- the expansion method includes expansion (the exposed display area increases) and contraction (the exposed display area shrinks).
- the screen mechanical assembly is the driving mechanism 70 shown in FIG. 4.
- the stretch command may be a pulse width modulation (Pulse Width Modulation, PWM) signal used to control the rotation of the motor.
- PWM Pulse Width Modulation
- this step includes the following steps:
- the expansion distance and the expansion mode are determined.
- the first size and the second size are the screen sizes in the relative movement direction of the housing.
- the telescopic command generated by the terminal is used to instruct the housing to expand and contract a predetermined distance according to a specified expansion and contraction mode.
- the terminal obtains the first size of the current screen size in the expansion and contraction direction and the second size of the target screen size in the expansion and contraction direction. If the first size is greater than the second size, the expansion method is determined to be contraction; if the first size is smaller than the second size, the expansion method is determined to be expansion, and the expansion distance is the difference between the first size and the second size.
- the terminal determines that the telescopic distance is 1.8 cm, and the telescopic method is contraction.
- the terminal determines the rotation direction of the screen mechanical component according to the telescopic manner, and determines the rotation distance according to the telescopic distance, so as to generate the telescopic instruction.
- the telescopic command generated by the terminal instructs the driving mechanism 70 to rotate counterclockwise, and the rotation distance is 1.8 cm.
- Step 806 Send an expansion and contraction instruction to the screen mechanical component.
- the screen mechanical component is used to control the expansion and contraction of the flexible display screen according to the expansion and contraction instruction, where the size of the exposed display area of the flexible display screen after expansion and contraction is the target screen size.
- the terminal sends a telescopic instruction to the screen mechanical component, and the screen mechanical component controls the flexible display to expand and contract according to the telescopic mode and the telescopic distance indicated by the telescopic instruction, so that the size of the exposed display area of the display after expansion is the target screen size.
- the terminal displays the size adjustment control on the user interface, and when the trigger for the size adjustment control in the user interface is received During operation (indicating that there is a need to adjust the screen size), the terminal sends a telescopic instruction to the screen mechanical component.
- the terminal displays a size adjustment control 715 in the user interface 71.
- the terminal sends a telescopic instruction to the screen mechanical component, thereby controlling the flexible display screen. Shrink, thereby eliminating the interface filling area 714 above and below the shooting preview screen element 712.
- the user can trigger the screen size adjustment by actively performing a scaling operation.
- the telescopic instruction is sent to the terminal screen mechanical component. If the scaling mode indicated by the scaling operation is inconsistent with the scaling mode indicated by the scaling command, the terminal responds to the user's scaling operation without sending the scaling command.
- the terminal will send a telescopic instruction to the screen mechanical component; if the telescopic mode of the telescopic operation instruction is stretch, the terminal will not send it to the screen mechanical component Telescopic instructions.
- a telescopic reminder is given before the terminal controls the expansion and contraction of the flexible display screen.
- the terminal controls the expansion and contraction of the flexible display screen to avoid direct control of the expansion and contraction of the flexible display screen. Adjusting the holding hand according to the size of the exposed display area causes the terminal to fall.
- the current holding posture of the terminal is acquired (for example, the holding posture can be determined according to the sensor data collected by a sensor set at the edge of the terminal). If the holding posture belongs to the preset holding posture (such as the two-handed holding posture, or the one-sided holding posture), the flexible display is controlled to expand; if it is not the preset holding posture (for example, the user holds the On both sides of the terminal), a telescopic prompt is performed so that the user can adjust the holding gesture to prevent the terminal from falling.
- the preset holding posture such as the two-handed holding posture, or the one-sided holding posture
- Step 807 Adjust the display buffer and application window attributes according to the target screen resolution, where the application window attributes include at least the window size.
- the image drawn by the terminal will be stored in the display cache (referred to as video memory for short).
- the display cache remains unchanged. Changes, so the terminal needs to adjust the display cache.
- the window properties of the user interface will also change accordingly, so the terminal also needs to adjust the application window properties synchronously.
- the terminal adjusts the display buffer up, and if the target screen resolution is less than the current screen resolution, the terminal adjusts the display buffer down. In addition, the terminal adjusts the window size of the application window to match the target screen resolution.
- Step 808 Adjust the interface element layout of the interface elements in the user interface according to the display cache and application window attributes, and redraw the user interface.
- the terminal adjusts the interface element layout of the interface elements in the user interface according to the adjusted application window attributes, and redraws the user interface; after the user interface is redrawn, the image data corresponding to the user interface is written into the adjusted display In the buffer, so that in the subsequent display process, the image data in the display buffer is sent to the flexible display screen for display on the flexible display screen.
- Step 809 Display the redrawn user interface on the retractable flexible display screen.
- the terminal displays the redrawn user interface on the flexible display screen after expansion.
- the terminal determines the expansion distance and expansion mode of the flexible display screen, thereby generating corresponding expansion and contraction instructions, and instructs the screen mechanical components to control the expansion and contraction of the flexible display according to the expansion and contraction instructions, thereby improving the screen Accuracy of scaling.
- the terminal adopts a control trigger method or a manual telescopic trigger method to realize the transmission of telescopic instructions, avoiding the influence of the terminal's direct screen telescoping on the user's use.
- the terminal determines the optimal screen resolution (ie target screen resolution) for displaying the user interface based on the layout and resolution of the interface elements in the user interface, and then performs screen dynamics according to the optimal screen resolution Adjustments, display buffer adjustments and user interface redrawing ensure the normal display of the user interface after the screen is stretched.
- the optimal screen resolution ie target screen resolution
- the flexible display screen is contracted as an example for schematic illustration.
- the current application is a video application
- the resolution of the currently played video 1001 in the playback interface It is 1920 ⁇ 1080.
- the terminal determines that the flexible display needs to be stretched according to the current screen resolution of 1500 ⁇ 1080 and the target screen resolution of 1920 ⁇ 1080, and the stretch distance is 1cm, and then the flexible display is controlled to expand and contract through the screen mechanical components.
- the resolution of the rear flexible display is 1920 ⁇ 1080. After the screen is stretched, the currently playing video 1001 can be displayed in the playback interface in full resolution to avoid the influence of the upper and lower black borders on the video viewing.
- the terminal When the target screen resolution is less than the current screen resolution, the terminal reduces the exposed display area of the flexible display screen, which can not only reduce the impact of the interface filling area on the user interface, but also reduce the display power consumption; however, when the target screen resolution is less than At the current screen resolution, since the exposed display area of the flexible display screen increases after stretching, the display power consumption of the terminal increases. Therefore, in a possible implementation manner, if the current screen resolution is different from the target screen resolution, the terminal further compares whether the target screen resolution is higher than the current screen resolution, and if it is higher, the terminal power state is obtained. Among them, the power state of the terminal includes (remaining) power and charging and discharging state.
- the terminal controls the flexible display to expand or contract according to the target screen resolution; if the power state indicates that the power is below the power threshold, or is not in the charging state, the terminal will Keep the current screen resolution to avoid excessive power consumption caused by increasing the exposed display area of the flexible display.
- the power threshold is 50%. This embodiment does not limit this.
- the terminal determines whether to adjust the screen resolution according to the power state of the terminal, so as to avoid excessive power consumption due to increased screen resolution when the remaining power is too low. problem.
- the terminal obtains the application type of the current application, and detects whether the application type belongs to the preset application type, and if it does, executes the acquisition of the current screen resolution and subsequent screen resolution adjustment procedures; if not, Yes, the terminal maintains the current screen resolution.
- the preset application type includes at least one of a shooting application, a video application, a short video application, and an album application.
- the terminal controls the flexible display screen to shrink to a minimum size, thereby reducing the power consumption of the terminal.
- the terminal controls the flexible display screen to shrink to a minimum size, which will not affect the normal use of the application, but can also reduce the power consumption of the terminal.
- FIG. 11 shows a structural block diagram of a user interface display device provided by an embodiment of the present application.
- the device can be implemented as all or a part of the terminal through software, hardware or a combination of the two.
- the device includes:
- the obtaining module 1101 is configured to obtain the current screen resolution, where the current screen resolution is the resolution of the current exposed display area of the flexible display screen;
- the control module 1102 is configured to control the expansion and contraction of the flexible display screen according to the target screen resolution in response to the current screen resolution being different from the target screen resolution corresponding to the current application, wherein the target screen resolution corresponds to The proportion of the interface filling area is lower than the proportion of the interface filling area corresponding to the current screen resolution, and the interface filling area proportion refers to the area proportion of the filling area outside the interface elements in the user interface;
- the display module 1103 is configured to display the user interface of the current application on the flexible display screen that has been expanded and contracted.
- control module 1102 includes:
- the size determining unit is used to determine the current screen size and the target screen size corresponding to the target screen resolution
- An instruction generating unit configured to generate a telescopic instruction according to the current screen size and the target screen size
- the instruction sending unit is configured to send the telescopic instruction to the screen mechanical component, and the screen mechanical component is used to control the expansion and contraction of the flexible display screen according to the expansion and contraction instruction.
- the size is the target screen size.
- the instruction generation unit is used to:
- the expansion distance and the expansion mode are determined, and the first size and the second size are the screens in the relative movement direction of the housing size;
- the telescopic instruction is generated according to the telescopic distance and the telescopic manner.
- the instruction sending unit is used to:
- the telescopic instruction is sent to the screen mechanical assembly.
- the display module 1103 includes:
- An adjustment unit configured to adjust display buffer and application window attributes according to the target screen resolution, where the application window attributes include at least a window size;
- the redrawing unit is configured to adjust the interface element layout of the interface elements in the user interface according to the display buffer and the application window attributes, and redraw the user interface;
- the display unit is configured to display the redrawn user interface on the flexible display screen after expansion.
- the device further includes:
- the first determining module is used to determine the interface element layout of the interface elements in the user interface and the interface element resolution corresponding to each interface element;
- the second determining module is configured to determine the target screen resolution corresponding to the current application according to the interface element layout and the interface element resolution.
- the interface element layout includes a horizontal layout and a vertical layout
- the interface element resolution includes a horizontal resolution and a vertical resolution
- the second determining module includes:
- a first determining unit configured to determine a target horizontal resolution according to the horizontal layout and the horizontal resolution of each of the interface elements
- a second determining unit configured to determine a target vertical resolution according to the vertical layout and the vertical resolution of each of the interface elements
- the third determining unit is configured to determine the target horizontal resolution and the target vertical resolution as the target screen resolution.
- control module 1102 is also used for:
- controlling the flexible display screen In response to the power status indicating that the power is higher than the power threshold or in a charging state, controlling the flexible display screen to expand and contract according to the target screen resolution;
- the device also includes:
- the maintaining module is configured to maintain the current screen resolution in response to the power status indicating that the power is lower than the power threshold and not in the charging state.
- the device further includes:
- the application type obtaining module is used to obtain the application type of the current application
- the obtaining module 1101 is configured to obtain the current screen resolution in response to the application type being a preset application type
- a maintaining module configured to maintain the current screen resolution in response to the application type not belonging to the preset application type
- the preset application type includes at least one of a shooting application, a video application, a short video application, and an album application.
- the terminal since the terminal has a flexible display screen, and the exposed display area of the flexible display screen can be changed by controlling the relative movement of the two parts of the terminal housing, the current screen resolution is compared with the target of the current application.
- the terminal can control the expansion of the flexible display according to the target screen resolution, and display the user interface of the current application on the expanded flexible display, thereby reducing the proportion of the interface filling area in the user interface and realizing the screen
- the dynamic adaptation of the resolution and the application resolution reduces the impact of the filling area of the interface on the display effect, and optimizes the display effect of the user interface.
- the terminal determines the expansion distance and expansion mode of the flexible display screen, thereby generating corresponding expansion and contraction instructions, and instructs the screen mechanical components to control the expansion and contraction of the flexible display according to the expansion and contraction instructions, thereby improving the screen Accuracy of scaling.
- the terminal adopts a control trigger method or a manual telescopic trigger method to realize the transmission of telescopic instructions, avoiding the influence of the terminal's direct screen telescoping on the user's use.
- the terminal determines the optimal screen resolution (ie target screen resolution) for displaying the user interface based on the layout and resolution of the interface elements in the user interface, and then performs screen dynamics according to the optimal screen resolution Adjustments, display buffer adjustments and user interface redrawing ensure the normal display of the user interface after the screen is stretched.
- the optimal screen resolution ie target screen resolution
- the terminal determines whether to adjust the screen resolution according to the power state of the terminal, so as to avoid excessive power consumption due to increased screen resolution when the remaining power is too low. problem.
- FIG. 12 shows a structural block diagram of a terminal provided by an exemplary embodiment of the present application.
- the terminal 1200 may be a smart phone, a tablet computer, a wearable device, etc.
- the terminal 1200 in this application may include one or more of the following components: a processor 1210, a memory 1220, and a flexible display screen 1230.
- the processor 1210 may include one or more processing cores.
- the processor 1210 uses various interfaces and lines to connect various parts of the entire terminal 1200, and executes the terminal by running or executing instructions, programs, code sets, or instruction sets stored in the memory 1220, and calling data stored in the memory 1220.
- the processor 1210 may adopt at least one of digital signal processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA).
- DSP Digital Signal Processing
- FPGA Field-Programmable Gate Array
- PLA Programmable Logic Array
- the processor 1210 can integrate one or more of the central processing unit (CPU), graphics processing unit (GPU), neural network processing unit (NPU), modem, etc.
- the CPU mainly processes the operating system, user interface, and application programs; the GPU is used to render and draw the content that needs to be displayed on the touch screen 1230; the NPU is used to implement artificial intelligence (AI) functions; the modem is used to Handle wireless communication. It is understandable that the above-mentioned modem may not be integrated into the processor 1210, but may be implemented by a chip alone.
- the memory 1220 may include random access memory (RAM) or read-only memory (ROM).
- the memory 1220 includes a non-transitory computer-readable storage medium.
- the memory 1220 may be used to store instructions, programs, codes, code sets or instruction sets.
- the memory 1220 may include a storage program area and a storage data area, where the storage program area may store instructions for implementing the operating system and instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), Instructions for implementing the following various method embodiments, etc.; the storage data area can store data created according to the use of the terminal 800 (such as audio data, phone book), and the like.
- the flexible display screen 1203 is used to receive the user's touch operation on or near any suitable object such as a finger, a touch pen, etc., and to display the user interface of each application program.
- the flexible display screen 1203 is usually arranged on the front panel of the terminal 1200.
- the size of the exposed display area of the flexible display screen 1203 can be changed with the telescopic operation; optionally, the terminal 1200 can only light up the exposed display area of the flexible display screen 1203.
- the terminal 1200 further includes a driving member for driving the flexible display screen to expand or contract.
- the terminal 1200 further includes a driving mechanism, and the driving mechanism is used to drive the first housing and the second housing to move relative to each other.
- the structure of the terminal 1200 shown in the above drawings does not constitute a limitation on the terminal 1200, and the terminal may include more or less components than those shown in the figure, or a combination of certain components. Components, or different component arrangements.
- the terminal 1200 also includes components such as a radio frequency circuit, a photographing component, a sensor, an audio circuit, a wireless fidelity (Wireless Fidelity, WiFi) component, a power supply, and a Bluetooth component, which will not be repeated here.
- the embodiments of the present application also provide a computer-readable medium that stores at least one instruction, and the at least one instruction is loaded and executed by a processor to implement the user interface display method described in each of the above embodiments. .
- the embodiments of the present application also provide a computer program product that stores at least one instruction, and the at least one instruction is loaded and executed by a processor to implement the user interface display method described in each of the above embodiments.
- the functions described in the embodiments of the present application may be implemented by hardware, software, firmware, or any combination thereof. When implemented by software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on the computer-readable medium.
- the computer-readable medium includes a computer storage medium and a communication medium, where the communication medium includes any medium that facilitates the transfer of a computer program from one place to another.
- the storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
A method and apparatus for displaying a user interface, a terminal and a storage medium, which relate to the technical field of terminals. The method comprises: acquiring a current screen resolution, the current screen resolution being the resolution of a currently exposed display region of a flexible display screen; in response to the current screen resolution being different from a target screen resolution corresponding to a current application, controlling the expansion and contraction of the flexible display screen according to the target screen resolution, wherein the proportion with which an interface corresponding to the target screen resolution fills a region is less than the proportion with which an interface corresponding to the current screen resolution fills the region, and the proportion with which the interface fills the region refers to the proportion of the area of a filled region outside of interface elements in a user interface; and displaying the user interface of the current application on the expanded and contracted flexible display screen. By using the foregoing method, the dynamic adaptation of the screen resolution and application resolution is achieved, thereby reducing the influence of an interface-filled region on a display effect, and optimizing the display effect of a user interface.
Description
本申请要求于2020年05月20日提交的申请号为202010431657.9、发明名称为“用户界面的显示方法、装置、终端及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed on May 20, 2020 with the application number 202010431657.9 and the invention title "User interface display method, device, terminal and storage medium", the entire content of which is incorporated herein by reference Applying.
本申请实施例涉及终端技术领域,特别涉及一种用户界面的显示方法、装置、终端及存储介质。The embodiments of the present application relate to the field of terminal technology, and in particular, to a display method, device, terminal, and storage medium of a user interface.
随着屏幕显示技术的不断发展,终端的屏幕分辨率也在不断提高,以此达到更加细腻的显示效果。With the continuous development of screen display technology, the screen resolution of the terminal is also continuously improving, in order to achieve a more delicate display effect.
相关技术中,由于终端的屏幕分辨率固定,因此应用程序的用户界面需要根据屏幕分辨率进行适配。比如,对于相机应用的拍摄界面,拍摄界面中取景画面的上下区域需要使用界面填充区域(比如黑色填充区域)进行填充;对于视频应用的播放界面,播放界面中视频画面的上下区域需要使用界面填充区域进行填充。In related technologies, since the screen resolution of the terminal is fixed, the user interface of the application program needs to be adapted according to the screen resolution. For example, for the shooting interface of the camera application, the upper and lower areas of the viewfinder screen in the shooting interface need to be filled with the interface filling area (such as black filling area); for the playback interface of the video application, the upper and lower areas of the video screen in the playback interface need to be filled with the interface The area is filled.
发明内容Summary of the invention
本申请实施例提供了一种用户界面的显示方法、装置、终端及存储介质。所述技术方案如下:The embodiments of the present application provide a method, device, terminal, and storage medium for displaying a user interface. The technical solution is as follows:
一方面,本申请实施例提供了一种用户界面的显示方法,所述方法用于具有柔性显示屏的终端,所述终端包括第一壳体和第二壳体,所述第二壳体与所述第一壳体滑动连接,所述第二壳体和所述第一壳体通过相对运动改变所述柔性显示屏的外露显示区域,所述方法包括:On the one hand, an embodiment of the present application provides a method for displaying a user interface. The method is used in a terminal with a flexible display screen. The terminal includes a first housing and a second housing. The first housing is slidably connected, and the second housing and the first housing change the exposed display area of the flexible display screen through relative movement, and the method includes:
获取当前屏幕分辨率,所述当前屏幕分辨率为所述柔性显示屏当前外露显示区域的分辨率;Acquiring a current screen resolution, where the current screen resolution is the resolution of the current exposed display area of the flexible display screen;
响应于所述当前屏幕分辨率与当前应用对应的目标屏幕分辨率不同,根据所述目标屏幕分辨率控制所述柔性显示屏伸缩,其中,所述目标屏幕分辨率对应的界面填充区域占比低于所述当前屏幕分辨率对应的界面填充区域占比,所述界面填充区域占比指用户界面中界面元素以外填充区域的面积占比;In response to the current screen resolution being different from the target screen resolution corresponding to the current application, the flexible display screen is controlled to expand and contract according to the target screen resolution, wherein the interface fill area corresponding to the target screen resolution occupies a low proportion The proportion of the interface filled area corresponding to the current screen resolution, where the proportion of the interface filled area refers to the proportion of the area of the filled area other than the interface elements in the user interface;
在经过伸缩的所述柔性显示屏中显示所述当前应用的用户界面。The user interface of the current application is displayed on the flexible display screen that has been expanded and contracted.
另一方面,本申请实施例提供了一种用户界面的显示装置,所述装置用于具有柔性显示屏的终端,所述终端包括第一壳体和第二壳体,所述第二壳体与所述第一壳体滑动连接,所述第二壳体和所述第一壳体通过相对运动改变所述柔性显示屏的外露显示区域,所述装置包括:On the other hand, an embodiment of the present application provides a user interface display device. The device is used in a terminal with a flexible display screen. The terminal includes a first housing and a second housing. In sliding connection with the first housing, the second housing and the first housing change the exposed display area of the flexible display screen through relative movement, and the device includes:
获取模块,用于获取当前屏幕分辨率,所述当前屏幕分辨率为所述柔性显示屏当前外露显示区域的分辨率;An obtaining module, configured to obtain a current screen resolution, where the current screen resolution is the resolution of the currently exposed display area of the flexible display screen;
控制模块,用于响应于所述当前屏幕分辨率与当前应用对应的目标屏幕分辨率不同,根据所述目标屏幕分辨率控制所述柔性显示屏伸缩,其中,所述目标屏幕分辨率对应的界面填充区域占比低于所述当前屏幕分辨率对应的界面填充区域占比,所述界面填充区域占比指用户界面中界面元素以外填充区域的面积占比;The control module is configured to control the expansion and contraction of the flexible display screen according to the target screen resolution in response to the current screen resolution being different from the target screen resolution corresponding to the current application, wherein the interface corresponding to the target screen resolution The proportion of the filled area is lower than the proportion of the filled area of the interface corresponding to the current screen resolution, and the proportion of the filled area of the interface refers to the proportion of the area of the filled area other than the interface elements in the user interface;
显示模块,用于在经过伸缩的所述柔性显示屏中显示所述当前应用的用户界面。The display module is configured to display the user interface of the current application on the flexible display screen that has been expanded and contracted.
另一方面,本申请实施例提供了一种终端,所述终端包括处理器和存储器;所述存储器存储有至少一条指令,所述至少一条指令用于被所述处理器执行以实现如上述方面所述的用 户界面的显示方法。On the other hand, an embodiment of the present application provides a terminal, the terminal includes a processor and a memory; the memory stores at least one instruction, and the at least one instruction is used to be executed by the processor to implement the above-mentioned aspects. The display method of the user interface.
另一方面,提供了一种计算机可读存储介质,所述存储介质存储有至少一条指令,所述至少一条指令用于被处理器执行以实现如上述方面所述的用户界面的显示方法。In another aspect, a computer-readable storage medium is provided, and the storage medium stores at least one instruction, and the at least one instruction is used to be executed by a processor to implement the user interface display method as described in the above aspect.
另一方面,还提供了一种计算机程序产品,该计算机程序产品存储有至少一条指令,所述至少一条指令由处理器加载并执行以实现如上述方面所述的用户界面的显示方法。On the other hand, a computer program product is also provided, and the computer program product stores at least one instruction, and the at least one instruction is loaded and executed by a processor to implement the user interface display method as described in the foregoing aspect.
图1是本申请一个示例性实施例提供的收缩状态下终端的结构示意图;FIG. 1 is a schematic structural diagram of a terminal in a contracted state provided by an exemplary embodiment of the present application;
图2是本申请一个示例性实施例提供的拉伸状态下终端的结构示意图;Fig. 2 is a schematic structural diagram of a terminal in a stretched state provided by an exemplary embodiment of the present application;
图3是本申请一个示例性实施例提供的终端的立体分解示意图;FIG. 3 is a three-dimensional exploded schematic diagram of a terminal provided by an exemplary embodiment of the present application;
图4是本申请一个示例性实施例提供的收缩状态下终端剖面的结构示意图;4 is a schematic structural diagram of a terminal cross-section in a contracted state provided by an exemplary embodiment of the present application;
图5是本申请一个示例性实施例提供的拉伸状态下终端剖面的结构示意图;Fig. 5 is a schematic structural diagram of a terminal cross-section in a stretched state provided by an exemplary embodiment of the present application;
图6示出了本申请一个示例性实施例提供的用户界面的显示方法的流程图;Fig. 6 shows a flowchart of a method for displaying a user interface provided by an exemplary embodiment of the present application;
图7是本申请一个示例性实施例提供的用户界面的显示方法实施过程的界面示意图;FIG. 7 is an interface schematic diagram of an implementation process of a user interface display method provided by an exemplary embodiment of the present application;
图8是本申请另一个示例性实施例提供的用户界面的显示方法的流程图;FIG. 8 is a flowchart of a method for displaying a user interface according to another exemplary embodiment of the present application;
图9是一个示例性实施例示出的屏幕尺寸调整过程的界面示意图;Fig. 9 is a schematic diagram of an interface showing a screen size adjustment process according to an exemplary embodiment;
图10是另一个示例性实施例示出的屏幕尺寸调整过程的界面示意图;Fig. 10 is a schematic diagram of an interface showing a screen size adjustment process according to another exemplary embodiment;
图11示出了本申请一个实施例提供的用户界面的显示装置的结构框图;FIG. 11 shows a structural block diagram of a display device for a user interface provided by an embodiment of the present application;
图12示出了本申请一个示例性实施例提供的终端的结构方框图。FIG. 12 shows a structural block diagram of a terminal provided by an exemplary embodiment of the present application.
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the purpose, technical solutions, and advantages of the present application clearer, the implementation manners of the present application will be described in further detail below in conjunction with the accompanying drawings.
在本文中提及的“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。The "plurality" mentioned herein means two or more. "And/or" describes the association relationship of the associated objects, indicating that there can be three types of relationships, for example, A and/or B, which can mean: A alone exists, A and B exist at the same time, and B exists alone. The character "/" generally indicates that the associated objects before and after are in an "or" relationship.
本申请实施例提供的用户界面的显示方法,应用于具有柔性显示屏的终端,下面首先对终端的结构进行说明。The display method of the user interface provided by the embodiment of the present application is applied to a terminal with a flexible display screen. The structure of the terminal is first described below.
请结合图1至图3,本申请实施例中的终端100包括壳体组件10、柔性显示屏30、带动件50及驱动机构70。壳体组件10为中空结构;带动件50、驱动机构70以及摄像头60等组件均可设置在壳体组件10。可以理解的是,本申请实施例中的终端100包括但不限于手机、平板等移动终端或者其它便携式电子设备,在本文中,以终端100为手机为例进行说明。Referring to FIGS. 1 to 3, the terminal 100 in the embodiment of the present application includes a housing assembly 10, a flexible display screen 30, a driving member 50 and a driving mechanism 70. The housing assembly 10 is a hollow structure; components such as the driving member 50, the driving mechanism 70, and the camera 60 can all be arranged in the housing assembly 10. It is understandable that the terminal 100 in the embodiment of the present application includes, but is not limited to, mobile terminals such as mobile phones and tablets, or other portable electronic devices. In this document, the terminal 100 is a mobile phone as an example for description.
在本申请实施中,壳体组件10包括第一壳体12和第二壳体14,第一壳体12和第二壳体14能够相对运动。在一种可能的实施方式中,第一壳体12和第二壳体14滑动连接,也即是说,第二壳体14能够相对第一壳体12滑动。In the implementation of the present application, the housing assembly 10 includes a first housing 12 and a second housing 14, and the first housing 12 and the second housing 14 can move relative to each other. In a possible implementation, the first housing 12 and the second housing 14 are slidably connected, that is, the second housing 14 can slide relative to the first housing 12.
可选的,请参阅图4及图5,第一壳体12与第二壳体14共同形成有容置空间16。容置空间16可用于放置带动件50、摄像头60及驱动机构70等部件。壳体组件10还可包括后盖18,后盖18与第一壳体12与第二壳体14共同形成容置空间16。Optionally, referring to FIGS. 4 and 5, the first housing 12 and the second housing 14 jointly form an accommodating space 16. The accommodating space 16 can be used to place components such as the driving member 50, the camera 60, and the driving mechanism 70. The housing assembly 10 may further include a back cover 18, and the back cover 18 and the first housing 12 and the second housing 14 together form an accommodating space 16.
可选的,带动件50设置于第二壳体14,柔性显示屏30的一端设置于第一壳体12,柔性显示屏30绕过带动件50,且柔性显示屏的另一端设置于容置空间16内,以使部分柔性显示屏30隐藏于容置空间16内,隐藏于容置空间16内的部分柔性显示屏30可不点亮。第一壳体12和第二壳体14相对远离,可通过带动件50带动柔性显示屏30展开,以使得更多的柔性显示屏30暴露于容置空间16外。点亮暴露于容置空间16外部的柔性显示屏30,以使得终端100所呈现的显示区域变大。Optionally, the driving member 50 is disposed in the second casing 14, one end of the flexible display screen 30 is disposed in the first casing 12, the flexible display screen 30 bypasses the driving member 50, and the other end of the flexible display screen is disposed in the accommodation In the space 16, part of the flexible display screen 30 is hidden in the accommodating space 16, and part of the flexible display screen 30 hidden in the accommodating space 16 may not be lit. The first housing 12 and the second housing 14 are relatively far away, and the flexible display screen 30 can be driven by the driving member 50 to expand, so that more flexible display screens 30 are exposed outside the accommodating space 16. The flexible display screen 30 exposed to the outside of the accommodating space 16 is lighted up, so that the display area presented by the terminal 100 becomes larger.
可选的,带动件50为外部带有齿52的转轴结构,柔性显示屏30通过啮合等方式与带动 件50相联动,第一壳体12和第二壳体14相对远离时,通过带动件50带动啮合于带动件50上的部分柔性显示屏30移动并展开。Optionally, the driving member 50 is a rotating shaft structure with teeth 52 on the outside, and the flexible display screen 30 is linked with the driving member 50 by means of meshing or the like. When the first housing 12 and the second housing 14 are relatively far apart, the driving member 50 drives part of the flexible display screen 30 engaged on the driving member 50 to move and unfold.
可以理解,带动件50还可为不附带齿52的圆轴,第一壳体12和第二壳体14相对远离时,通过带动件50将卷绕于带动件50上的部分柔性显示屏30撑开,以使更多的柔性显示屏暴露于容置空间16外,并处于平展状态。可选的,带动件50可转动地设置于第二壳体14,在逐步撑开柔性显示屏30时,带动件50可随柔性显示屏30的移动而转动。在其它实施例中,带动件50也可固定在第二壳体14上,带动件50具备光滑的表面。在将柔性显示屏30撑开时,带动件50通过其光滑的表面与柔性显示屏30可滑动接触。It can be understood that the driving member 50 can also be a round shaft without teeth 52. When the first housing 12 and the second housing 14 are relatively far away, the driving member 50 will wind the part of the flexible display screen 30 on the driving member 50. Expand so that more flexible display screens are exposed outside the accommodating space 16 and are in a flat state. Optionally, the driving member 50 is rotatably disposed on the second housing 14, and when the flexible display screen 30 is gradually expanded, the driving member 50 can rotate with the movement of the flexible display screen 30. In other embodiments, the driving member 50 may also be fixed on the second housing 14, and the driving member 50 has a smooth surface. When the flexible display screen 30 is expanded, the driving member 50 can slidably contact with the flexible display screen 30 through its smooth surface.
当第一壳体12和第二壳体14相对靠近时,柔性显示屏可通过带动件50带动收回。或者,终端100还包括复位件(图未示),柔性显示屏收容于容置空间16的一端与复位件联动,在第一壳体12和第二壳体14相对靠近时,复位件带动柔性显示屏30复位,进而使得部分柔性显示屏收回于容置空间16内。When the first housing 12 and the second housing 14 are relatively close, the flexible display screen can be retracted by the driving member 50. Alternatively, the terminal 100 further includes a resetting member (not shown). One end of the flexible display screen housed in the accommodating space 16 is linked with the resetting member. When the first housing 12 and the second housing 14 are relatively close, the resetting member drives the flexible The display screen 30 is reset, so that part of the flexible display screen is retracted into the accommodating space 16.
在本申请实施例中,驱动机构70可设置在容置空间16内,驱动机构70可与第二壳体14相联动,驱动机构70用于驱动第二壳体14相对于第一壳体12做相离运动,进而带动柔性显示屏组件30伸展。可以理解,驱动机构70也可以省略,用户可以直接通过手动等方式来使得第一壳体和第二壳体相对运动。In the embodiment of the present application, the driving mechanism 70 may be disposed in the accommodating space 16, the driving mechanism 70 may be linked with the second housing 14, and the driving mechanism 70 is used to drive the second housing 14 relative to the first housing 12. The separation movement is performed to drive the flexible display screen assembly 30 to stretch. It can be understood that the driving mechanism 70 can also be omitted, and the user can directly move the first housing and the second housing relative to one another manually.
请参考图6,其示出了本申请一个示例性实施例提供的用户界面的显示方法的流程图。本实施例以该方法由图1至5所示的终端执行为例进行说明,该过程包括如下步骤:Please refer to FIG. 6, which shows a flowchart of a method for displaying a user interface provided by an exemplary embodiment of the present application. In this embodiment, the method is executed by the terminal shown in FIGS. 1 to 5 as an example for description, and the process includes the following steps:
步骤601,获取当前屏幕分辨率,当前屏幕分辨率为柔性显示屏当前外露显示区域的分辨率。Step 601: Acquire the current screen resolution, which is the resolution of the current exposed display area of the flexible display screen.
由于本申请实施例中柔性显示屏的外露显示区域能够随着壳体相对运动而发生变化,因此终端需要获取柔性显示屏当前外露显示区域的分辨率,以便后续确定是否需要对当前分辨率进行调整。Since the exposed display area of the flexible display screen in the embodiment of the present application can change with the relative movement of the housing, the terminal needs to obtain the resolution of the current exposed display area of the flexible display screen in order to subsequently determine whether the current resolution needs to be adjusted. .
在一种可能的实施方式中,终端操作***提供接口供应用程序调用(可以是原生应用程序,也可以为第三方应用程序),当前台运行的应用程序(即当前应用)对屏幕分辨率存在特定需求时,应用程序即调用该接口请求获取当前屏幕分辨率,进而执行后续分辨率调整流程。In a possible implementation manner, the terminal operating system provides an interface for application program calls (which can be native applications or third-party applications), and the current application (ie, the current application) has an impact on the screen resolution. When there are specific requirements, the application program calls this interface to request the current screen resolution, and then executes the subsequent resolution adjustment process.
针对获取当前屏幕分辨率的方式,在一种可能的实施方式中,终端获取柔性显示屏当前外露显示区域的当前屏幕尺寸,进而根据柔性显示屏完整屏幕尺寸、完整屏幕分辨率以及当前屏幕尺寸,确定当前屏幕分辨率。示意性的,当前屏幕分辨率=(当前屏幕尺寸/完整屏幕尺寸)×完整屏幕分辨率。本申请实施例并不对获取屏幕分辨率的具体方式进行限定。Regarding the way of obtaining the current screen resolution, in a possible implementation manner, the terminal obtains the current screen size of the current exposed display area of the flexible display screen, and then according to the full screen size, full screen resolution, and current screen size of the flexible display screen, Determine the current screen resolution. Illustratively, the current screen resolution=(current screen size/full screen size)×full screen resolution. The embodiment of the present application does not limit the specific method for obtaining the screen resolution.
步骤602,响应于当前屏幕分辨率与当前应用对应的目标屏幕分辨率不同,根据目标屏幕分辨率控制柔性显示屏伸缩,其中,目标屏幕分辨率对应的界面填充区域占比低于当前屏幕分辨率对应的界面填充区域占比,界面填充区域占比指用户界面中界面元素以外填充区域的面积占比。Step 602: In response to the current screen resolution being different from the target screen resolution corresponding to the current application, the flexible display screen is controlled to expand and contract according to the target screen resolution, where the interface fill area corresponding to the target screen resolution accounts for lower than the current screen resolution The corresponding interface fill area percentage, which refers to the area percentage of the filled area outside of the interface elements in the user interface.
在一种可能的实施方式中,当柔性显示屏的外露显示区域为目标屏幕分辨率时,(当前应用)用户界面中界面填充区域的面积占比,低于当柔性显示屏的外露显示区域为当前屏幕分辨率时,用户界面中界面填充区域的面积占比。其中,该界面填充区域是用户界面中界面元素所在区域以外的区域,用于填充界面元素布局后的空缺。比如,该界面填充区域是用户界面中的黑色填充区域。In a possible implementation, when the exposed display area of the flexible display screen is the target screen resolution, the (current application) user interface has a smaller area ratio than when the exposed display area of the flexible display screen is At the current screen resolution, the percentage of the area filled in the interface in the user interface. Wherein, the interface filling area is an area outside the area where the interface element is located in the user interface, and is used to fill the vacancy after the interface element layout. For example, the filled area of the interface is a black filled area in the user interface.
示意性的,如图7所示,当前应用为拍摄应用,用户界面71(即拍摄界面)中包含状态栏元素711(用于显示一系列状态控件,比如闪光灯控件、相机设置控件等等)、拍摄画面预览元素712以及控制栏元素713(比如包括快门控件、查看控件和镜头切换控件)。为了对界面元素以外的区域进行填充,该用户界面71中还包括位于拍摄画面预览元素712上方以及下方的界面填充区域714。Schematically, as shown in FIG. 7, the current application is a shooting application, and the user interface 71 (ie, the shooting interface) contains a status bar element 711 (used to display a series of status controls, such as flash control, camera setting control, etc.), The shooting screen preview element 712 and the control bar element 713 (for example, include a shutter control, a viewing control, and a lens switching control). In order to fill areas other than interface elements, the user interface 71 also includes interface filling areas 714 above and below the shooting screen preview element 712.
在一种可能的实施方式中,该目标屏幕分辨率由当前应用确定得到,且不同场景下该目标屏幕分辨率可能不同。比如,当照片拍摄尺寸为1080×1080(1:1)以及(1920×1080)16:9时,拍摄应用对应的目标屏幕分辨率不同。In a possible implementation manner, the target screen resolution is determined by the current application, and the target screen resolution may be different in different scenarios. For example, when the photo shooting size is 1080×1080 (1:1) and (1920×1080) 16:9, the target screen resolution corresponding to the shooting application is different.
可选的,获取到当前屏幕分辨率和目标屏幕分辨率后,终端检测两者是否一致,若两者一致,表明当前屏幕分辨率下当前应用的显示效果最佳,从而保持当前屏幕分辨率;若两者不一致,表明当前屏幕分辨率下,用户界面中界面填充区域的面积占比过高,此时终端需要调整当前屏幕的分辨率。Optionally, after obtaining the current screen resolution and the target screen resolution, the terminal checks whether the two are consistent. If the two are consistent, it indicates that the display effect of the current application is the best under the current screen resolution, so as to maintain the current screen resolution; If the two are inconsistent, it indicates that under the current screen resolution, the area of the interface filled area in the user interface is too high, and the terminal needs to adjust the current screen resolution at this time.
不同于相关技术中终端的屏幕尺寸以及屏幕分辨率固定,本申请实施例中终端的屏幕尺寸和屏幕分辨率可以随壳体相对运动而发生改变,因此当两者不一致时,终端可以根据目标屏幕分辨率控制柔性显示屏伸缩,使柔性显示屏的外露显示区域的屏幕分辨率达到目标屏幕分辨率,进而降低用户界面中界面填充区域的面积占比。Different from the fixed screen size and screen resolution of the terminal in the related art, the screen size and screen resolution of the terminal in the embodiment of the present application can be changed with the relative movement of the housing. Therefore, when the two are inconsistent, the terminal can change according to the target screen. The resolution controls the expansion and contraction of the flexible display screen, so that the screen resolution of the exposed display area of the flexible display screen reaches the target screen resolution, thereby reducing the area ratio of the interface filling area in the user interface.
在一种可能的实施方式中,终端通过控制第一壳体和第二壳体相对运动,以改变柔性显示屏的外露显示区域的尺寸,进而达到调整屏幕分辨率的效果。其中,第一壳体和第二壳体相对运动由终端通过驱动机构控制。In a possible implementation manner, the terminal controls the relative movement of the first housing and the second housing to change the size of the exposed display area of the flexible display screen, thereby achieving the effect of adjusting the screen resolution. Wherein, the relative movement of the first housing and the second housing is controlled by the terminal through a driving mechanism.
可选的,终端通过驱动机构控制第一壳体和第二壳体相离运动,实现柔性显示屏伸展;通过驱动机构控制第一壳体和第二壳体相运动,实现柔性显示屏收缩。Optionally, the terminal controls the separation movement of the first housing and the second housing through the drive mechanism to realize the expansion of the flexible display screen; and controls the movement of the first housing and the second housing through the drive mechanism to realize the contraction of the flexible display screen.
步骤603,在经过伸缩的柔性显示屏中显示当前应用的用户界面。Step 603: Display the user interface of the current application on the retractable flexible display screen.
柔性显示屏伸缩后,终端即在当前外露显示区域进行用户界面显示,优化用户界面的显示效果。After the flexible display screen is expanded and contracted, the terminal displays the user interface in the current exposed display area to optimize the display effect of the user interface.
示意性的,如图7所示,由于拍摄画面预览元素712的分辨率为1080×1080,因此拍摄画面预览元素712无法完整填充状态栏元素711以及控制栏元素713以外的用户界面,此时需要通过界面填充区域714对空余区域进行填充。而采用本申请实施例提供的方法,由于柔性显示屏的高度可变,因此终端可以根据当前拍摄模式下对应的目标屏幕分辨率,控制柔性显示屏收缩,并在收缩后的柔性显示屏中显示用户界面71,从而消除用户界面71中的界面填充区域714。柔性显示屏经过伸缩后,不仅消除了界面填充区域对用户界面的影响,同时缩小了柔性显示屏的外露显示区域,在方便用户单手进行操控的同时,降低了终端的屏幕显示功耗。Schematically, as shown in FIG. 7, since the resolution of the shooting screen preview element 712 is 1080×1080, the shooting screen preview element 712 cannot completely fill the user interface other than the status bar element 711 and the control bar element 713. At this time, The vacant area is filled by the interface filling area 714. With the method provided by the embodiments of the present application, since the height of the flexible display screen is variable, the terminal can control the flexible display screen to shrink according to the corresponding target screen resolution in the current shooting mode, and display on the shrinked flexible display screen. The user interface 71, thereby eliminating the interface filling area 714 in the user interface 71. After the flexible display screen is stretched, it not only eliminates the impact of the filling area of the interface on the user interface, but also reduces the exposed display area of the flexible display screen, which facilitates the user's one-handed operation and reduces the terminal's screen display power consumption.
综上所述,本申请实施例中,由于终端具有柔性显示屏,且通过控制终端的两部分壳体相对运动可以改变柔性显示屏的外露显示区域,因此在当前屏幕分辨率与当前应用的目标屏幕分辨率不同时,终端可以根据目标屏幕分辨率控制柔性显示屏伸缩,并在经过伸缩的柔性显示屏中显示当前应用的用户界面,从而降低用户界面中界面填充区域的面积占比,实现屏幕分辨率与应用分辨率的动态适配,进而降低界面填充区域对显示效果的影响,优化了用户界面的显示效果。To sum up, in the embodiment of the present application, since the terminal has a flexible display screen, and the exposed display area of the flexible display screen can be changed by controlling the relative movement of the two parts of the terminal housing, the current screen resolution is compared with the target of the current application. When the screen resolution is different, the terminal can control the expansion of the flexible display according to the target screen resolution, and display the user interface of the current application on the expanded flexible display, thereby reducing the proportion of the interface filling area in the user interface and realizing the screen The dynamic adaptation of the resolution and the application resolution reduces the impact of the filling area of the interface on the display effect, and optimizes the display effect of the user interface.
在一种可能的实施方式中,根据目标屏幕分辨率控制柔性显示屏伸,包括:In a possible implementation manner, controlling the extension of the flexible display screen according to the target screen resolution includes:
确定当前屏幕尺寸,以及目标屏幕分辨率对应的目标屏幕尺寸;Determine the current screen size and the target screen size corresponding to the target screen resolution;
根据当前屏幕尺寸和目标屏幕尺寸生成伸缩指令;Generate telescopic instructions according to the current screen size and target screen size;
向屏幕机械组件发送伸缩指令,屏幕机械组件用于根据伸缩指令控制柔性显示屏伸缩,其中,伸缩后柔性显示屏的外露显示区域的尺寸为目标屏幕尺寸。A telescopic instruction is sent to the screen mechanical component, and the screen mechanical component is used to control the expansion and contraction of the flexible display screen according to the expansion and contraction instruction, wherein the size of the exposed display area of the flexible display screen after the expansion and contraction is the target screen size.
在一种可能的实施方式中,根据当前屏幕尺寸和目标屏幕尺寸生成伸缩指令,包括:In a possible implementation manner, generating the scaling instruction according to the current screen size and the target screen size includes:
根据当前屏幕尺寸中的第一尺寸以及目标屏幕尺寸中的第二尺寸,确定伸缩距离和伸缩方式,第一尺寸和第二尺寸为壳体相对运动方向上的屏幕尺寸;According to the first size in the current screen size and the second size in the target screen size, determine the expansion distance and the expansion mode, the first size and the second size are the screen sizes in the relative movement direction of the housing;
根据伸缩距离和伸缩方式生成伸缩指令。Generate telescopic instructions according to telescopic distance and telescopic method.
在一种可能的实施方式中,向屏幕机械组件发送伸缩指令,包括:In a possible implementation manner, sending a telescopic instruction to the screen mechanical component includes:
响应于接收到对用户界面中尺寸调整控件的触发操作,向屏幕机械组件发送伸缩指令;In response to receiving a trigger operation on the size adjustment control in the user interface, sending a telescopic instruction to the screen mechanical component;
或者,or,
响应于接收到对柔性显示屏的伸缩操作,且伸缩操作指示的伸缩方式与伸缩指令指示的伸缩方式一致,向屏幕机械组件发送伸缩指令。In response to receiving the telescopic operation on the flexible display screen, and the telescopic manner indicated by the telescopic operation is consistent with the telescopic manner indicated by the telescopic instruction, the telescopic instruction is sent to the screen mechanical assembly.
在一种可能的实施方式中,在经过伸缩的柔性显示屏中显示当前应用的用户界面包括:In a possible implementation manner, displaying the user interface of the current application on the retractable flexible display screen includes:
根据目标屏幕分辨率调整显示缓存和应用窗口属性,应用窗口属性至少包括窗口尺寸;Adjust the display cache and application window properties according to the target screen resolution, and the application window properties include at least the window size;
根据显示缓存和应用窗口属性,调整用户界面中界面元素的界面元素布局,并重绘用户界面;According to the display cache and application window properties, adjust the interface element layout of the interface elements in the user interface, and redraw the user interface;
在经过伸缩的柔性显示屏中显示重绘后的用户界面。The redrawn user interface is displayed on the flexible display screen after expansion.
在一种可能的实施方式中,响应于当前屏幕分辨率与当前应用对应的目标屏幕分辨率不同,根据目标屏幕分辨率控制柔性显示屏伸缩之前,该方法还包括:In a possible implementation manner, in response to the current screen resolution being different from the target screen resolution corresponding to the current application, before controlling the expansion and contraction of the flexible display screen according to the target screen resolution, the method further includes:
确定用户界面中界面元素的界面元素布局,以及各个界面元素对应的界面元素分辨率;Determine the interface element layout of the interface elements in the user interface, and the interface element resolution corresponding to each interface element;
根据界面元素布局和界面元素分辨率,确定当前应用对应的目标屏幕分辨率。According to the interface element layout and interface element resolution, determine the target screen resolution corresponding to the current application.
在一种可能的实施方式中,所述界面元素布局包括横向布局和纵向布局,所述界面元素分辨率包括横向分辨率和纵向分辨率;In a possible implementation manner, the interface element layout includes a horizontal layout and a vertical layout, and the interface element resolution includes a horizontal resolution and a vertical resolution;
根据界面元素布局和界面元素分辨率,确定当前应用对应的目标屏幕分辨率,包括:According to the interface element layout and interface element resolution, determine the target screen resolution corresponding to the current application, including:
根据各个界面元素的横向布局以及横向分辨率,确定目标横向分辨率;Determine the target horizontal resolution according to the horizontal layout and horizontal resolution of each interface element;
根据各个界面元素的纵向布局以及纵向分辨率,确定目标纵向分辨率;Determine the target vertical resolution according to the vertical layout and vertical resolution of each interface element;
将目标横向分辨率和目标纵向分辨率确定为目标屏幕分辨率。Determine the target horizontal resolution and target vertical resolution as the target screen resolution.
在一种可能的实施方式中,响应于当前屏幕分辨率与当前应用对应的目标屏幕分辨率不同,根据目标屏幕分辨率控制柔性显示屏伸缩,包括:In a possible implementation manner, in response to the current screen resolution being different from the target screen resolution corresponding to the current application, controlling the flexible display screen to expand and contract according to the target screen resolution includes:
响应于当前屏幕分辨率与目标屏幕分辨率不同,且目标屏幕分辨率高于当前屏幕分辨率,获取终端电量状态;In response to the current screen resolution being different from the target screen resolution, and the target screen resolution is higher than the current screen resolution, obtain the terminal battery status;
响应于电量状态指示电量高于电量阈值,或处于充电状态,根据目标屏幕分辨率控制柔性显示屏伸缩;In response to the power status indicating that the power is higher than the power threshold or in the charging state, the flexible display screen is controlled to expand and contract according to the target screen resolution;
该方法还包括:The method also includes:
响应于电量状态指示电量低于电量阈值,且未处于充电状态,保持当前屏幕分辨率。In response to the power status indicating that the power is lower than the power threshold and not in a charging state, the current screen resolution is maintained.
在一种可能的实施方式中,该方法还包括:In a possible implementation manner, the method further includes:
获取当前应用的应用类型;Get the application type of the current application;
响应于应用类型属于预设应用类型,执行获取当前屏幕分辨率的步骤;In response to the application type belonging to the preset application type, execute the step of obtaining the current screen resolution;
响应于应用类型不属于预设应用类型,保持当前屏幕分辨率;In response to the application type not belonging to the preset application type, keep the current screen resolution;
其中,预设应用类型包括拍摄应用、视频应用、短视频应用和相册应用中的至少一种。Wherein, the preset application type includes at least one of a shooting application, a video application, a short video application, and an album application.
请参考图8,其示出了本申请另一个示例性实施例提供的用户界面的显示方法的流程图。本实施例以该方法由图1至5所示的终端执行为例进行说明,该过程包括如下步骤:Please refer to FIG. 8, which shows a flowchart of a method for displaying a user interface provided by another exemplary embodiment of the present application. In this embodiment, the method is executed by the terminal shown in FIGS. 1 to 5 as an example for description, and the process includes the following steps:
步骤801,获取当前屏幕分辨率,当前屏幕分辨率为柔性显示屏当前外露显示区域的分辨率。Step 801: Acquire the current screen resolution, which is the resolution of the current exposed display area of the flexible display screen.
本步骤的实施方式可以参考上述步骤601,本实施例在此不再赘述。For the implementation of this step, reference may be made to the above step 601, which will not be repeated in this embodiment.
步骤802,确定用户界面中界面元素的界面元素布局,以及各个界面元素对应的界面元素分辨率。Step 802: Determine the interface element layout of the interface elements in the user interface and the interface element resolution corresponding to each interface element.
关于确定用户界面对应目标屏幕分辨率的方式,在一种可能的实施方式中,在确定用户界面的目标屏幕分辨率时,终端获取当前应用对应用户界面中各个界面元素的元素布局,以及各个界面元素的界面元素分辨率。其中,该界面元素布局可以为界面元素在用户界面中的绝对布局或者相对布局。Regarding the method of determining the target screen resolution corresponding to the user interface, in a possible implementation manner, when determining the target screen resolution of the user interface, the terminal obtains the element layout of each interface element in the user interface corresponding to the current application, and each interface The interface element resolution of the element. The layout of the interface elements may be an absolute layout or a relative layout of the interface elements in the user interface.
可选的,该元素布局和界面元素分辨率可以由当前应用提供给终端操作***。在其他可能的实施方式中,确定目标屏幕分辨率的过程也可以由当前应用执行,并由当前应用将目标屏幕分辨率直接提供给终端操作***。本实施例对此不作限定。Optionally, the element layout and interface element resolution can be provided to the terminal operating system by the current application. In other possible implementation manners, the process of determining the target screen resolution may also be executed by the current application, and the current application directly provides the target screen resolution to the terminal operating system. This embodiment does not limit this.
示意性的,终端获取到拍摄界面中状态栏元素对应的界面元素分辨率为1080×150,拍摄画面预览元素对应的界面元素分辨率为1080×1080,控制栏元素对应的界面元素分辨率为1080×350,且状态栏元素对应的界面元素布局为用户界面顶部,控制栏元素对应的界面元素布局为用户界面底部,而拍摄画面预览元素对应的界面元素布局为状态栏元素与控制栏元素之间。Illustratively, the terminal obtains that the resolution of the interface element corresponding to the status bar element in the shooting interface is 1080×150, the resolution of the interface element corresponding to the preview element of the shooting screen is 1080×1080, and the resolution of the interface element corresponding to the control bar element is 1080 ×350, and the interface element layout corresponding to the status bar element is at the top of the user interface, the interface element layout corresponding to the control bar element is at the bottom of the user interface, and the interface element layout corresponding to the shooting screen preview element is between the status bar element and the control bar element .
步骤803,根据界面元素布局和界面元素分辨率,确定当前应用对应的目标屏幕分辨率。Step 803: Determine the target screen resolution corresponding to the current application according to the interface element layout and the interface element resolution.
进一步的,终端根据界面元素布局和界面元素分辨率,确定出最佳显示效果时屏幕区域在高度和宽度上各自的分辨率,从而确定出目标屏幕分辨率。其中,当前屏幕分辨率和目标屏幕分辨率为柔性显示屏伸缩方向(即与壳体相对运动方向)上的分辨率。Further, the terminal determines the respective resolutions of the height and width of the screen area for the best display effect according to the layout of the interface elements and the resolution of the interface elements, thereby determining the target screen resolution. Wherein, the current screen resolution and the target screen resolution are the resolutions in the direction of expansion and contraction of the flexible display screen (that is, the direction of relative movement with the housing).
在一种可能的实施方式中,终端根据各个界面元素的横向布局以及界面元素的横向分辨率,确定出目标横向分辨率;根据各个界面元素的纵向布局以及界面元素的纵向分辨率,确定出目标纵向分辨率。In a possible implementation, the terminal determines the target horizontal resolution according to the horizontal layout of each interface element and the horizontal resolution of the interface element; determines the target according to the vertical layout of each interface element and the vertical resolution of the interface element Vertical resolution.
结合上述步骤中的示例,当界面元素布局指示拍摄界面中状态栏元素、拍摄画面预览元素和控制栏元素位于同一纵向位置,且位于不同横向位置时,终端将状态栏元素、拍摄画面预览元素和控制栏元素各自对应横向分辨率中的分辨率最大值确定为目标横向分辨率,即目标横向分辨率为1080;将状态栏元素、拍摄画面预览元素和控制栏元素各自对应纵向分辨率之和确定为目标纵向分辨率,即目标纵向分辨率为150+1080+350=1580。相应的,目标屏幕分辨率即为1080×1580。Combining the example in the above steps, when the interface element layout indicates that the status bar element, the shooting screen preview element, and the control bar element in the shooting interface are located in the same vertical position and different horizontal positions, the terminal will set the status bar element, shooting screen preview element, and The maximum resolution in the horizontal resolution of each control bar element is determined as the target horizontal resolution, that is, the target horizontal resolution is 1080; the sum of the corresponding vertical resolutions of the status bar elements, shooting screen preview elements, and control bar elements is determined Is the target vertical resolution, that is, the target vertical resolution is 150+1080+350=1580. Correspondingly, the target screen resolution is 1080×1580.
需要说明的是,上述实施例仅以相机应用的拍摄界面为例进行说明,并不对具体的计算方式以及用户界面的界面元素布局方式构成限定。It should be noted that the foregoing embodiment only takes the shooting interface of the camera application as an example for description, and does not limit the specific calculation method and the layout of the interface elements of the user interface.
步骤804,响应于当前屏幕分辨率与当前应用对应的目标屏幕分辨率不同,确定当前屏幕尺寸,以及目标屏幕分辨率对应的目标屏幕尺寸。Step 804, in response to the current screen resolution being different from the target screen resolution corresponding to the current application, determine the current screen size and the target screen size corresponding to the target screen resolution.
由于柔性显示屏外露显示区域的屏幕分辨率与其尺寸密切相关,而终端也正是通过调整外露显示区域的尺寸实现屏幕分辨率动态调整,因此终端在控制柔性显示屏伸缩前,需要根据当前屏幕尺寸以及目标屏幕尺寸,能够出柔性显示屏的伸缩量。Since the screen resolution of the exposed display area of the flexible display is closely related to its size, and the terminal is also dynamically adjusted by adjusting the size of the exposed display area, the terminal needs to be based on the current screen size before controlling the expansion and contraction of the flexible display. As well as the target screen size, the amount of expansion and contraction of the flexible display screen can be shown.
在一种可能的实施方式中,终端根据当前屏幕分辨率确定当前屏幕尺寸,并根据目标屏幕分辨率确定目标屏幕尺寸,其中,当前屏幕尺寸和目标屏幕尺寸为柔性显示屏伸缩方向(即与壳体相对运动方向)上的尺寸。In a possible implementation manner, the terminal determines the current screen size according to the current screen resolution, and determines the target screen size according to the target screen resolution, where the current screen size and the target screen size are the direction of the flexible display The size of the relative movement direction of the body.
示意性的,当前屏幕尺寸=(当前屏幕分辨率/完整屏幕分辨率)×完整屏幕分辨率,目标屏幕分辨率=(目标屏幕尺寸/完整屏幕尺寸)×完整屏幕分辨率。Illustratively, current screen size=(current screen resolution/full screen resolution)×full screen resolution, and target screen resolution=(target screen size/full screen size)×full screen resolution.
比如,柔性显示屏的完整屏幕分辨率为2600(最小屏幕分辨率为1080),对应的完整屏幕尺寸为13cm(最小屏幕尺寸为8cm),若当前屏幕分辨率为1920时,当前屏幕尺寸为(1920/2600)×13=9.6cm;若目标屏幕分辨率为1580时,当前屏幕尺寸为(1580/2600)×13=7.9cm。For example, the full screen resolution of the flexible display is 2600 (the minimum screen resolution is 1080), and the corresponding full screen size is 13cm (the minimum screen size is 8cm). If the current screen resolution is 1920, the current screen size is ( 1920/2600)×13=9.6cm; if the target screen resolution is 1580, the current screen size is (1580/2600)×13=7.9cm.
步骤805,根据当前屏幕尺寸和目标屏幕尺寸生成伸缩指令。Step 805: Generate a stretch instruction according to the current screen size and the target screen size.
在一种可能的实施方式中,终端根据当前屏幕尺寸和目标屏幕尺寸确定伸缩距离和伸缩方式,从而生成屏幕机械组件所能识别的伸缩指令,进而通过屏幕控制组件控制壳体进行相对运动,实现柔性显示屏的伸缩。其中,该伸缩方式包括伸展(外露显示区域增大)和收缩(外露显示区域缩小)。In a possible implementation manner, the terminal determines the telescopic distance and the telescopic method according to the current screen size and the target screen size, thereby generating a telescopic instruction that can be recognized by the mechanical components of the screen, and then controlling the relative movement of the housing through the screen control component. The expansion and contraction of the flexible display screen. Among them, the expansion method includes expansion (the exposed display area increases) and contraction (the exposed display area shrinks).
可选的,屏幕机械组件为图4所示的驱动机构70。Optionally, the screen mechanical assembly is the driving mechanism 70 shown in FIG. 4.
可选的,该伸缩指令可以是用于控制马达转动的脉冲宽度调制(Pulse Width Modulation,PWM)信号。Optionally, the stretch command may be a pulse width modulation (Pulse Width Modulation, PWM) signal used to control the rotation of the motor.
在一种可能的实施方式中,本步骤包括如下步骤:In a possible implementation, this step includes the following steps:
一、根据当前屏幕尺寸中的第一尺寸以及目标屏幕尺寸中的第二尺寸,确定伸缩距离和伸缩方式,第一尺寸和第二尺寸为壳体相对运动方向上的屏幕尺寸。1. According to the first size in the current screen size and the second size in the target screen size, the expansion distance and the expansion mode are determined. The first size and the second size are the screen sizes in the relative movement direction of the housing.
由于柔性显示屏仅能够在伸缩方向(壳体相对运动方向)上进行伸缩,因此,终端生成的伸缩指令用于指示壳体按照指定伸缩方式伸缩预定距离。Since the flexible display screen can only expand and contract in the telescopic direction (the relative movement direction of the housing), the telescopic command generated by the terminal is used to instruct the housing to expand and contract a predetermined distance according to a specified expansion and contraction mode.
可选的,终端获取当前屏幕尺寸在伸缩方向上的第一尺寸以及目标屏幕尺寸在伸缩方向上的第二尺寸。若第一尺寸大于第二尺寸,则确定伸缩方式为收缩,若第一尺寸小于第二尺寸,则确定伸缩方式为伸展,而伸缩距离即为第一尺寸和第二尺寸的差值。Optionally, the terminal obtains the first size of the current screen size in the expansion and contraction direction and the second size of the target screen size in the expansion and contraction direction. If the first size is greater than the second size, the expansion method is determined to be contraction; if the first size is smaller than the second size, the expansion method is determined to be expansion, and the expansion distance is the difference between the first size and the second size.
结合上述步骤的示例,由于第一尺寸9.6cm大于第二尺寸7.9cm,因此终端确定伸缩距离为1.8cm,伸缩方式为收缩。Combining the example of the above steps, since the first dimension is 9.6 cm larger than the second dimension 7.9 cm, the terminal determines that the telescopic distance is 1.8 cm, and the telescopic method is contraction.
二、根据伸缩距离和伸缩方式生成伸缩指令。2. Generate telescopic instructions according to telescopic distance and telescopic method.
在一种可能的实施方式中,终端根据伸缩方式确定屏幕机械组件的转动方向,根据伸缩距离确定转动距离,从而生成伸缩指令。In a possible implementation manner, the terminal determines the rotation direction of the screen mechanical component according to the telescopic manner, and determines the rotation distance according to the telescopic distance, so as to generate the telescopic instruction.
比如,结合上述事例,在图5所示的结构中,终端生成的伸缩指令指示驱动机构70逆时针转动,且转动距离为1.8cm。For example, in combination with the above examples, in the structure shown in FIG. 5, the telescopic command generated by the terminal instructs the driving mechanism 70 to rotate counterclockwise, and the rotation distance is 1.8 cm.
步骤806,向屏幕机械组件发送伸缩指令,屏幕机械组件用于根据伸缩指令控制柔性显示屏伸缩,其中,伸缩后柔性显示屏的外露显示区域的尺寸为目标屏幕尺寸。Step 806: Send an expansion and contraction instruction to the screen mechanical component. The screen mechanical component is used to control the expansion and contraction of the flexible display screen according to the expansion and contraction instruction, where the size of the exposed display area of the flexible display screen after expansion and contraction is the target screen size.
生成伸缩指令后,终端向屏幕机械组件发送伸缩指令,屏幕机械组件即根据伸缩指令指示的伸缩方式和伸缩距离控制柔性显示屏伸缩,使伸缩后显示屏的外露显示区域的尺寸为目标屏幕尺寸。After the telescopic instruction is generated, the terminal sends a telescopic instruction to the screen mechanical component, and the screen mechanical component controls the flexible display to expand and contract according to the telescopic mode and the telescopic distance indicated by the telescopic instruction, so that the size of the exposed display area of the display after expansion is the target screen size.
针对触发发送伸缩指令的方式,在一种可能的实施方式中,若当前屏幕分辨率与目标屏幕分辨率不同,终端在用户界面显示尺寸调整控件,当接收到对用户界面中尺寸调整控件的触发操作时(表明存在调整屏幕尺寸的需求),终端向屏幕机械组件发送伸缩指令。Regarding the method of triggering the sending of the scaling command, in a possible implementation manner, if the current screen resolution is different from the target screen resolution, the terminal displays the size adjustment control on the user interface, and when the trigger for the size adjustment control in the user interface is received During operation (indicating that there is a need to adjust the screen size), the terminal sends a telescopic instruction to the screen mechanical component.
示意性的,如图9所示,终端在用户界面71中显示尺寸调整控件715,当接收到对尺寸调整控件715的点击操作时,终端即向屏幕机械组件发送伸缩指令,从而控制柔性显示屏收缩,从而消除拍摄预览画面元素712上下方的界面填充区域714。Schematically, as shown in FIG. 9, the terminal displays a size adjustment control 715 in the user interface 71. When a click operation on the size adjustment control 715 is received, the terminal sends a telescopic instruction to the screen mechanical component, thereby controlling the flexible display screen. Shrink, thereby eliminating the interface filling area 714 above and below the shooting preview screen element 712.
在另一种可能的实施方式中,用户可以通过主动进行伸缩操作,触发屏幕尺寸调整。可选的,当接收到对柔性显示屏的伸缩操作,且伸缩操作指示的伸缩方式与伸缩指令指示的伸缩方式一致,向终端屏幕机械组件发送伸缩指令。若伸缩操作指示的伸缩方式与伸缩指令指示的伸缩方式不一致,终端则响应用户的伸缩操作,而不会进行伸缩指令发送。In another possible implementation manner, the user can trigger the screen size adjustment by actively performing a scaling operation. Optionally, when a telescopic operation on the flexible display screen is received, and the telescopic manner indicated by the telescopic operation is consistent with the telescopic manner indicated by the telescopic instruction, the telescopic instruction is sent to the terminal screen mechanical component. If the scaling mode indicated by the scaling operation is inconsistent with the scaling mode indicated by the scaling command, the terminal responds to the user's scaling operation without sending the scaling command.
示意性的,在上述步骤的示例中,若伸缩操作指示的伸缩方式为收缩,终端则向屏幕机械组件发送伸缩指令;若伸缩操作指示的伸缩方式为伸展,终端则不会向屏幕机械组件发送伸缩指令。Schematically, in the example of the above steps, if the telescopic mode of the telescopic operation instruction is contraction, the terminal will send a telescopic instruction to the screen mechanical component; if the telescopic mode of the telescopic operation instruction is stretch, the terminal will not send it to the screen mechanical component Telescopic instructions.
当然,除了上述两种触发发送伸缩指令的方式外,还可以通过语音、手势等方式触发,本实施例对此不作限定。Of course, in addition to the aforementioned two ways of triggering the sending of the telescopic instruction, it can also be triggered by voice, gesture, etc., which is not limited in this embodiment.
在一种可能的实施方式中,终端控制柔性显示屏伸缩前,进行伸缩提示,当接收到确认伸缩反馈时,终端控制柔性显示屏进行伸缩,避免直接控制柔性显示屏伸缩时,因用户未及时根据外露显示区域的尺寸调整握持手持导致终端跌落。In a possible implementation, before the terminal controls the expansion and contraction of the flexible display screen, a telescopic reminder is given. When the confirmation of expansion and contraction feedback is received, the terminal controls the expansion and contraction of the flexible display screen to avoid direct control of the expansion and contraction of the flexible display screen. Adjusting the holding hand according to the size of the exposed display area causes the terminal to fall.
在其他可能的实施方式中,终端控制柔性显示屏伸缩前,获取终端当前所处的握持姿态(比如可以根据终端边缘设置的传感器采集到的传感器数据确定握持姿态)。若该握持姿态属于预设握持姿态(比如双手握持姿态,或者单侧握持姿态),则控制柔性显示屏伸缩;若不属于预设握持姿态(比如用户使用单手同时握持终端两侧),则进行伸缩提示,以便用户调整握持手势,以此避免终端跌落。In other possible implementation manners, before the terminal controls the flexible display screen to expand and contract, the current holding posture of the terminal is acquired (for example, the holding posture can be determined according to the sensor data collected by a sensor set at the edge of the terminal). If the holding posture belongs to the preset holding posture (such as the two-handed holding posture, or the one-sided holding posture), the flexible display is controlled to expand; if it is not the preset holding posture (for example, the user holds the On both sides of the terminal), a telescopic prompt is performed so that the user can adjust the holding gesture to prevent the terminal from falling.
步骤807,根据目标屏幕分辨率调整显示缓存和应用窗口属性,应用窗口属性至少包括窗口尺寸。Step 807: Adjust the display buffer and application window attributes according to the target screen resolution, where the application window attributes include at least the window size.
终端绘制的图像会存储在显示缓存(简称为显存)中,对于屏幕尺寸以及分辨率固定的终端,该显示缓存保持不变,而本申请实施例中,由于终端的屏幕尺寸以及屏幕分辨率发生变化,因此终端需要对显示缓存进行调整。The image drawn by the terminal will be stored in the display cache (referred to as video memory for short). For a terminal with a fixed screen size and resolution, the display cache remains unchanged. Changes, so the terminal needs to adjust the display cache.
此外,为了适配屏幕分辨率变化,用户界面的窗口属性也会相应发生变化,因此终端还需要对应用窗口属性进行同步调整。In addition, in order to adapt to changes in screen resolution, the window properties of the user interface will also change accordingly, so the terminal also needs to adjust the application window properties synchronously.
在一种可能的实施方式中,若目标屏幕分辨率大于当前屏幕分辨率,终端则上调显示缓存,若目标屏幕分辨率小于当前屏幕分辨率,终端则下调显示缓存。此外,终端将应用窗口的窗口尺寸调整至与目标屏幕分辨率相匹配。In a possible implementation manner, if the target screen resolution is greater than the current screen resolution, the terminal adjusts the display buffer up, and if the target screen resolution is less than the current screen resolution, the terminal adjusts the display buffer down. In addition, the terminal adjusts the window size of the application window to match the target screen resolution.
步骤808,根据显示缓存和应用窗口属性,调整用户界面中界面元素的界面元素布局,并重绘用户界面。Step 808: Adjust the interface element layout of the interface elements in the user interface according to the display cache and application window attributes, and redraw the user interface.
进一步的,终端根据调整后的应用窗口属性,对用户界面中界面元素的界面元素布局进行调整,并重绘用户界面;完成用户界面重绘后,用户界面对应的图像数据被写入调整后的显示缓存中,以便后续显示过程中,将显示缓存中的图像数据发送至柔性显示屏,供柔性显示屏进行显示。Further, the terminal adjusts the interface element layout of the interface elements in the user interface according to the adjusted application window attributes, and redraws the user interface; after the user interface is redrawn, the image data corresponding to the user interface is written into the adjusted display In the buffer, so that in the subsequent display process, the image data in the display buffer is sent to the flexible display screen for display on the flexible display screen.
步骤809,在经过伸缩的柔性显示屏中显示重绘后的用户界面。Step 809: Display the redrawn user interface on the retractable flexible display screen.
最终,终端将重绘后的用户界面显示在伸缩后的柔性显示屏中。Finally, the terminal displays the redrawn user interface on the flexible display screen after expansion.
本实施例中,终端基于当前屏幕尺寸以及目标屏幕尺寸,确定出柔性显示屏的伸缩距离以及伸缩方式,从而生成相应的伸缩指令,指示屏幕机械组件根据伸缩指令控制柔性显示屏伸缩,提高了屏幕伸缩的准确性。同时,终端采用控件触发方式或手动伸缩触发方式,实现伸缩指令发送,避免终端直接进行屏幕伸缩对用户使用造成的影响。In this embodiment, based on the current screen size and the target screen size, the terminal determines the expansion distance and expansion mode of the flexible display screen, thereby generating corresponding expansion and contraction instructions, and instructs the screen mechanical components to control the expansion and contraction of the flexible display according to the expansion and contraction instructions, thereby improving the screen Accuracy of scaling. At the same time, the terminal adopts a control trigger method or a manual telescopic trigger method to realize the transmission of telescopic instructions, avoiding the influence of the terminal's direct screen telescoping on the user's use.
此外,本实施例中,终端基于用户界面中界面元素的布局以及分辨率,确定出显示用户界面的最佳屏幕分辨率(即目标屏幕分辨率),进而根据该最佳屏幕分辨率进行屏幕动态调整、显示缓存调整和用户界面重绘,保证屏幕伸缩后用户界面的正常显示。In addition, in this embodiment, the terminal determines the optimal screen resolution (ie target screen resolution) for displaying the user interface based on the layout and resolution of the interface elements in the user interface, and then performs screen dynamics according to the optimal screen resolution Adjustments, display buffer adjustments and user interface redrawing ensure the normal display of the user interface after the screen is stretched.
上述实施例中以柔性显示屏收缩为例进行了示意性说明,在另一种可能的应用场景下,如图9所示,当前应用为视频应用,且播放界面中当前播放视频1001的分辨率为1920×1080。然而,由于当前柔性显示屏外露显示区域的分辨率为1500×1080,导致当前播放视频1001的画面经过压缩后显示在播放界面中,且播放界面的上下方存在黑边1002。为了提升视频显示效果,终端根据当前屏幕分辨率1500×1080以及目标屏幕分辨率1920×1080,确定需要伸展柔性显示屏,且伸展距离为1cm,进而通过屏幕机械组件控制柔性显示屏伸缩,使伸缩后柔性显示屏的分辨率为1920×1080。完成屏幕伸缩后,当前播放视频1001即可全分辨率显示在播放界面中,避免上下黑边对视频观看造成的影响。In the above embodiment, the flexible display screen is contracted as an example for schematic illustration. In another possible application scenario, as shown in FIG. 9, the current application is a video application, and the resolution of the currently played video 1001 in the playback interface It is 1920×1080. However, because the current resolution of the exposed display area of the flexible display screen is 1500×1080, the screen of the currently playing video 1001 is compressed and displayed in the playback interface, and there are black borders 1002 above and below the playback interface. In order to improve the video display effect, the terminal determines that the flexible display needs to be stretched according to the current screen resolution of 1500×1080 and the target screen resolution of 1920×1080, and the stretch distance is 1cm, and then the flexible display is controlled to expand and contract through the screen mechanical components. The resolution of the rear flexible display is 1920×1080. After the screen is stretched, the currently playing video 1001 can be displayed in the playback interface in full resolution to avoid the influence of the upper and lower black borders on the video viewing.
当目标屏幕分辨率小于当前屏幕分辨率时,终端通过缩小柔性显示屏的外露显示区域,不仅可以降低界面填充区域对用户界面的影响,还可以降低显示功耗;然而,当目标屏幕分辨率小于当前屏幕分辨率时,由于伸展后柔性显示屏的外露显示区域增大,因此终端的显示功耗增加。因此在一种可能的实施方式中,若当前屏幕分辨率与目标屏幕分辨率不同时,终端进一步比较目标屏幕分辨率是否高于当前屏幕分辨率,若高于,则获取终端电量状态。其中,该终端电量状态包括(剩余)电量和充放电状态。When the target screen resolution is less than the current screen resolution, the terminal reduces the exposed display area of the flexible display screen, which can not only reduce the impact of the interface filling area on the user interface, but also reduce the display power consumption; however, when the target screen resolution is less than At the current screen resolution, since the exposed display area of the flexible display screen increases after stretching, the display power consumption of the terminal increases. Therefore, in a possible implementation manner, if the current screen resolution is different from the target screen resolution, the terminal further compares whether the target screen resolution is higher than the current screen resolution, and if it is higher, the terminal power state is obtained. Among them, the power state of the terminal includes (remaining) power and charging and discharging state.
可选的,若电量状态指示电量高于电量阈值,或处于充电状态,终端则根据目标屏幕分辨率控制柔性显示屏伸缩;若电量状态指示电量低于电量阈值,或未处于充电状态,终端则保持当前屏幕分辨率,避免增大柔性显示屏外露显示区域后造成电量消耗过快。Optionally, if the power status indicates that the power is higher than the power threshold or is in a charging state, the terminal controls the flexible display to expand or contract according to the target screen resolution; if the power state indicates that the power is below the power threshold, or is not in the charging state, the terminal will Keep the current screen resolution to avoid excessive power consumption caused by increasing the exposed display area of the flexible display.
比如,该电量阈值为50%。本实施例对此不作限定。For example, the power threshold is 50%. This embodiment does not limit this.
本实施例中,终端在当前屏幕分辨率低于目标屏幕分辨率时,根据终端电量状态确定是否进行屏幕分辨率调节,避免在剩余电量过低时,因提高屏幕分辨率导致电量消耗过快的问题。In this embodiment, when the current screen resolution is lower than the target screen resolution, the terminal determines whether to adjust the screen resolution according to the power state of the terminal, so as to avoid excessive power consumption due to increased screen resolution when the remaining power is too low. problem.
此外,由于并非所有应用程序对屏幕分辨率存在较高需求,比如,视频播放、图片预览以及拍摄类应用对屏幕分辨率要求较高,而电子书、新闻阅读、购物以及音频播放类应用对 屏幕分辨率要求较低。因此在一种可能的实施方式中,终端获取当前应用的应用类型,并检测该应用类型是否属于预设应用类型,若属于,则执行获取当前屏幕分辨率以及后续屏幕分辨率调整流程;若不属于,终端则保持当前屏幕分辨率。其中,该预设应用类型包括拍摄应用、视频应用、短视频应用和相册应用中的至少一种。In addition, because not all applications have high requirements for screen resolution, for example, video playback, picture preview, and shooting applications have high screen resolution requirements, while e-books, news reading, shopping, and audio playback applications have high requirements for screen resolution. The resolution requirement is low. Therefore, in a possible implementation manner, the terminal obtains the application type of the current application, and detects whether the application type belongs to the preset application type, and if it does, executes the acquisition of the current screen resolution and subsequent screen resolution adjustment procedures; if not, Yes, the terminal maintains the current screen resolution. Wherein, the preset application type includes at least one of a shooting application, a video application, a short video application, and an album application.
当然,其他与图片、视频显示以及拍摄相关的应用程序都可以被归为预设应用类型,本申请实施例并不对此进行限定。Of course, other applications related to the display of pictures, videos, and shooting can all be classified as preset application types, which are not limited in the embodiment of the present application.
可选的,若应用类型不属于预设应用类型,终端控制柔性显示屏收缩至最小尺寸,从而降低终端的功耗。比如,若当前应用为音乐播放应用,终端控制柔性显示屏收缩至最小尺寸,既不影响应用的正常使用,又能够降低终端功耗。Optionally, if the application type does not belong to the preset application type, the terminal controls the flexible display screen to shrink to a minimum size, thereby reducing the power consumption of the terminal. For example, if the current application is a music playback application, the terminal controls the flexible display screen to shrink to a minimum size, which will not affect the normal use of the application, but can also reduce the power consumption of the terminal.
请参考图11,其示出了本申请一个实施例提供的用户界面的显示装置的结构框图。该装置可以通过软件、硬件或者两者的结合实现成为终端的全部或一部分。该装置包括:Please refer to FIG. 11, which shows a structural block diagram of a user interface display device provided by an embodiment of the present application. The device can be implemented as all or a part of the terminal through software, hardware or a combination of the two. The device includes:
获取模块1101,用于获取当前屏幕分辨率,所述当前屏幕分辨率为所述柔性显示屏当前外露显示区域的分辨率;The obtaining module 1101 is configured to obtain the current screen resolution, where the current screen resolution is the resolution of the current exposed display area of the flexible display screen;
控制模块1102,用于响应于所述当前屏幕分辨率与当前应用对应的目标屏幕分辨率不同,根据所述目标屏幕分辨率控制所述柔性显示屏伸缩,其中,所述目标屏幕分辨率对应的界面填充区域占比低于所述当前屏幕分辨率对应的界面填充区域占比,所述界面填充区域占比指用户界面中界面元素以外填充区域的面积占比;The control module 1102 is configured to control the expansion and contraction of the flexible display screen according to the target screen resolution in response to the current screen resolution being different from the target screen resolution corresponding to the current application, wherein the target screen resolution corresponds to The proportion of the interface filling area is lower than the proportion of the interface filling area corresponding to the current screen resolution, and the interface filling area proportion refers to the area proportion of the filling area outside the interface elements in the user interface;
显示模块1103,用于在经过伸缩的所述柔性显示屏中显示所述当前应用的用户界面。The display module 1103 is configured to display the user interface of the current application on the flexible display screen that has been expanded and contracted.
可选的,控制模块1102,包括:Optionally, the control module 1102 includes:
尺寸确定单元,用于确定当前屏幕尺寸,以及所述目标屏幕分辨率对应的目标屏幕尺寸;The size determining unit is used to determine the current screen size and the target screen size corresponding to the target screen resolution;
指令生成单元,用于根据所述当前屏幕尺寸和所述目标屏幕尺寸生成伸缩指令;An instruction generating unit, configured to generate a telescopic instruction according to the current screen size and the target screen size;
指令发送单元,用于向屏幕机械组件发送所述伸缩指令,所述屏幕机械组件用于根据所述伸缩指令控制所述柔性显示屏伸缩,其中,伸缩后所述柔性显示屏的外露显示区域的尺寸为所述目标屏幕尺寸。The instruction sending unit is configured to send the telescopic instruction to the screen mechanical component, and the screen mechanical component is used to control the expansion and contraction of the flexible display screen according to the expansion and contraction instruction. The size is the target screen size.
可选的,指令生成单元,用于:Optionally, the instruction generation unit is used to:
根据所述当前屏幕尺寸中的第一尺寸以及所述目标屏幕尺寸中的第二尺寸,确定伸缩距离和伸缩方式,所述第一尺寸和所述第二尺寸为壳体相对运动方向上的屏幕尺寸;According to the first size in the current screen size and the second size in the target screen size, the expansion distance and the expansion mode are determined, and the first size and the second size are the screens in the relative movement direction of the housing size;
根据所述伸缩距离和所述伸缩方式生成所述伸缩指令。The telescopic instruction is generated according to the telescopic distance and the telescopic manner.
可选的,指令发送单元,用于:Optionally, the instruction sending unit is used to:
响应于接收到对所述用户界面中尺寸调整控件的触发操作,向所述屏幕机械组件发送所述伸缩指令;In response to receiving a trigger operation on the size adjustment control in the user interface, sending the telescopic instruction to the screen mechanical component;
或者,or,
响应于接收到对所述柔性显示屏的伸缩操作,且所述伸缩操作指示的伸缩方式与所述伸缩指令指示的伸缩方式一致,向所述屏幕机械组件发送所述伸缩指令。In response to receiving a telescopic operation on the flexible display screen, and the telescopic manner indicated by the telescopic operation is consistent with the telescopic manner indicated by the telescopic instruction, the telescopic instruction is sent to the screen mechanical assembly.
可选的,显示模块1103,包括:Optionally, the display module 1103 includes:
调整单元,用于根据所述目标屏幕分辨率调整显示缓存和应用窗口属性,所述应用窗口属性至少包括窗口尺寸;An adjustment unit, configured to adjust display buffer and application window attributes according to the target screen resolution, where the application window attributes include at least a window size;
重绘单元,用于根据所述显示缓存和所述应用窗口属性,调整所述用户界面中界面元素的界面元素布局,并重绘所述用户界面;The redrawing unit is configured to adjust the interface element layout of the interface elements in the user interface according to the display buffer and the application window attributes, and redraw the user interface;
显示单元,用于在经过伸缩的所述柔性显示屏中显示重绘后的所述用户界面。The display unit is configured to display the redrawn user interface on the flexible display screen after expansion.
可选的,所述装置还包括:Optionally, the device further includes:
第一确定模块,用于确定所述用户界面中界面元素的界面元素布局,以及各个界面元素对应的界面元素分辨率;The first determining module is used to determine the interface element layout of the interface elements in the user interface and the interface element resolution corresponding to each interface element;
第二确定模块,用于根据所述界面元素布局和所述界面元素分辨率,确定所述当前应用 对应的所述目标屏幕分辨率。The second determining module is configured to determine the target screen resolution corresponding to the current application according to the interface element layout and the interface element resolution.
可选的,所述界面元素布局包括横向布局和纵向布局,所述界面元素分辨率包括横向分辨率和纵向分辨率;Optionally, the interface element layout includes a horizontal layout and a vertical layout, and the interface element resolution includes a horizontal resolution and a vertical resolution;
所述第二确定模块,包括:The second determining module includes:
第一确定单元,用于根据各个所述界面元素的所述横向布局以及所述横向分辨率,确定目标横向分辨率;A first determining unit, configured to determine a target horizontal resolution according to the horizontal layout and the horizontal resolution of each of the interface elements;
第二确定单元,用于根据各个所述界面元素的所述纵向布局以及所述纵向分辨率,确定目标纵向分辨率;A second determining unit, configured to determine a target vertical resolution according to the vertical layout and the vertical resolution of each of the interface elements;
第三确定单元,用于将所述目标横向分辨率和所述目标纵向分辨率确定为所述目标屏幕分辨率。The third determining unit is configured to determine the target horizontal resolution and the target vertical resolution as the target screen resolution.
可选的,控制模块1102,还用于:Optionally, the control module 1102 is also used for:
响应于所述当前屏幕分辨率与所述目标屏幕分辨率不同,且所述目标屏幕分辨率高于所述当前屏幕分辨率,获取终端电量状态;In response to the current screen resolution being different from the target screen resolution, and the target screen resolution is higher than the current screen resolution, acquiring the terminal power state;
响应于所述电量状态指示电量高于电量阈值,或处于充电状态,根据所述目标屏幕分辨率控制所述柔性显示屏伸缩;In response to the power status indicating that the power is higher than the power threshold or in a charging state, controlling the flexible display screen to expand and contract according to the target screen resolution;
所述装置还包括:The device also includes:
保持模块,用于响应于所述电量状态指示电量低于电量阈值,且未处于充电状态,保持所述当前屏幕分辨率。The maintaining module is configured to maintain the current screen resolution in response to the power status indicating that the power is lower than the power threshold and not in the charging state.
可选的,所述装置还包括:Optionally, the device further includes:
应用类型获取模块,用于获取所述当前应用的应用类型;The application type obtaining module is used to obtain the application type of the current application;
获取模块1101,用于响应于所述应用类型属于预设应用类型,获取当前屏幕分辨率;The obtaining module 1101 is configured to obtain the current screen resolution in response to the application type being a preset application type;
保持模块,用于响应于所述应用类型不属于所述预设应用类型,保持所述当前屏幕分辨率;A maintaining module, configured to maintain the current screen resolution in response to the application type not belonging to the preset application type;
其中,所述预设应用类型包括拍摄应用、视频应用、短视频应用和相册应用中的至少一种。Wherein, the preset application type includes at least one of a shooting application, a video application, a short video application, and an album application.
综上所述,本申请实施例中,由于终端具有柔性显示屏,且通过控制终端的两部分壳体相对运动可以改变柔性显示屏的外露显示区域,因此在当前屏幕分辨率与当前应用的目标屏幕分辨率不同时,终端可以根据目标屏幕分辨率控制柔性显示屏伸缩,并在经过伸缩的柔性显示屏中显示当前应用的用户界面,从而降低用户界面中界面填充区域的面积占比,实现屏幕分辨率与应用分辨率的动态适配,进而降低界面填充区域对显示效果的影响,优化了用户界面的显示效果。To sum up, in the embodiment of the present application, since the terminal has a flexible display screen, and the exposed display area of the flexible display screen can be changed by controlling the relative movement of the two parts of the terminal housing, the current screen resolution is compared with the target of the current application. When the screen resolution is different, the terminal can control the expansion of the flexible display according to the target screen resolution, and display the user interface of the current application on the expanded flexible display, thereby reducing the proportion of the interface filling area in the user interface and realizing the screen The dynamic adaptation of the resolution and the application resolution reduces the impact of the filling area of the interface on the display effect, and optimizes the display effect of the user interface.
本实施例中,终端基于当前屏幕尺寸以及目标屏幕尺寸,确定出柔性显示屏的伸缩距离以及伸缩方式,从而生成相应的伸缩指令,指示屏幕机械组件根据伸缩指令控制柔性显示屏伸缩,提高了屏幕伸缩的准确性。同时,终端采用控件触发方式或手动伸缩触发方式,实现伸缩指令发送,避免终端直接进行屏幕伸缩对用户使用造成的影响。In this embodiment, based on the current screen size and the target screen size, the terminal determines the expansion distance and expansion mode of the flexible display screen, thereby generating corresponding expansion and contraction instructions, and instructs the screen mechanical components to control the expansion and contraction of the flexible display according to the expansion and contraction instructions, thereby improving the screen Accuracy of scaling. At the same time, the terminal adopts a control trigger method or a manual telescopic trigger method to realize the transmission of telescopic instructions, avoiding the influence of the terminal's direct screen telescoping on the user's use.
此外,本实施例中,终端基于用户界面中界面元素的布局以及分辨率,确定出显示用户界面的最佳屏幕分辨率(即目标屏幕分辨率),进而根据该最佳屏幕分辨率进行屏幕动态调整、显示缓存调整和用户界面重绘,保证屏幕伸缩后用户界面的正常显示。In addition, in this embodiment, the terminal determines the optimal screen resolution (ie target screen resolution) for displaying the user interface based on the layout and resolution of the interface elements in the user interface, and then performs screen dynamics according to the optimal screen resolution Adjustments, display buffer adjustments and user interface redrawing ensure the normal display of the user interface after the screen is stretched.
本实施例中,终端在当前屏幕分辨率低于目标屏幕分辨率时,根据终端电量状态确定是否进行屏幕分辨率调节,避免在剩余电量过低时,因提高屏幕分辨率导致电量消耗过快的问题。In this embodiment, when the current screen resolution is lower than the target screen resolution, the terminal determines whether to adjust the screen resolution according to the power state of the terminal, so as to avoid excessive power consumption due to increased screen resolution when the remaining power is too low. problem.
上述装置实施例中,各个模块或单元的功能实施过程可以参考上述方法实施例,本实施例在此不再赘述。In the above-mentioned device embodiment, the function implementation process of each module or unit can refer to the above-mentioned method embodiment, and this embodiment will not be repeated here.
请参考图12,其示出了本申请一个示例性实施例提供的终端的结构方框图。该终端1200 可以是智能手机、平板电脑、可穿戴式设备等。本申请中的终端1200可以包括一个或多个如下部件:处理器1210、存储器1220和柔性显示屏1230。Please refer to FIG. 12, which shows a structural block diagram of a terminal provided by an exemplary embodiment of the present application. The terminal 1200 may be a smart phone, a tablet computer, a wearable device, etc. The terminal 1200 in this application may include one or more of the following components: a processor 1210, a memory 1220, and a flexible display screen 1230.
处理器1210可以包括一个或者多个处理核心。处理器1210利用各种接口和线路连接整个终端1200内的各个部分,通过运行或执行存储在存储器1220内的指令、程序、代码集或指令集,以及调用存储在存储器1220内的数据,执行终端1200的各种功能和处理数据。可选地,处理器1210可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器1210可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)、神经网络处理器(Neural-network Processing Unit,NPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作***、用户界面和应用程序等;GPU用于负责触摸显示屏1230所需要显示的内容的渲染和绘制;NPU用于实现人工智能(Artificial Intelligence,AI)功能;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器1210中,单独通过一块芯片进行实现。The processor 1210 may include one or more processing cores. The processor 1210 uses various interfaces and lines to connect various parts of the entire terminal 1200, and executes the terminal by running or executing instructions, programs, code sets, or instruction sets stored in the memory 1220, and calling data stored in the memory 1220. The various functions and processing data of the 1200. Optionally, the processor 1210 may adopt at least one of digital signal processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA). A kind of hardware form to realize. The processor 1210 can integrate one or more of the central processing unit (CPU), graphics processing unit (GPU), neural network processing unit (NPU), modem, etc. The combination. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is used to render and draw the content that needs to be displayed on the touch screen 1230; the NPU is used to implement artificial intelligence (AI) functions; the modem is used to Handle wireless communication. It is understandable that the above-mentioned modem may not be integrated into the processor 1210, but may be implemented by a chip alone.
存储器1220可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory,ROM)。可选地,该存储器1220包括非瞬时性计算机可读介质(non-transitory computer-readable storage medium)。存储器1220可用于存储指令、程序、代码、代码集或指令集。存储器1220可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作***的指令、用于至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等;存储数据区可存储根据终端800的使用所创建的数据(比如音频数据、电话本)等。The memory 1220 may include random access memory (RAM) or read-only memory (ROM). Optionally, the memory 1220 includes a non-transitory computer-readable storage medium. The memory 1220 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 1220 may include a storage program area and a storage data area, where the storage program area may store instructions for implementing the operating system and instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), Instructions for implementing the following various method embodiments, etc.; the storage data area can store data created according to the use of the terminal 800 (such as audio data, phone book), and the like.
柔性显示屏1203用于接收用户使用手指、触摸笔等任何适合的物体在其上或附近的触摸操作,以及显示各个应用程序的用户界面。柔性显示屏1203通常设置在终端1200的前面板。本申请实施例中,柔性显示屏1203外露显示区域的尺寸能够随伸缩操作而改变;可选的,终端1200能够仅点亮柔性显示屏1203的外露显示区域。The flexible display screen 1203 is used to receive the user's touch operation on or near any suitable object such as a finger, a touch pen, etc., and to display the user interface of each application program. The flexible display screen 1203 is usually arranged on the front panel of the terminal 1200. In the embodiment of the present application, the size of the exposed display area of the flexible display screen 1203 can be changed with the telescopic operation; optionally, the terminal 1200 can only light up the exposed display area of the flexible display screen 1203.
本申请实施例中,终端1200中还包括带动件,该带动件用于带动柔性显示屏展开或收缩。可选的,终端1200中还包括驱动机构,该驱动机构用于驱动第一壳体和第二壳体做相对运动。In the embodiment of the present application, the terminal 1200 further includes a driving member for driving the flexible display screen to expand or contract. Optionally, the terminal 1200 further includes a driving mechanism, and the driving mechanism is used to drive the first housing and the second housing to move relative to each other.
除此之外,本领域技术人员可以理解,上述附图所示出的终端1200的结构并不构成对终端1200的限定,终端可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。比如,终端1200中还包括射频电路、拍摄组件、传感器、音频电路、无线保真(Wireless Fidelity,WiFi)组件、电源、蓝牙组件等部件,在此不再赘述。In addition, those skilled in the art can understand that the structure of the terminal 1200 shown in the above drawings does not constitute a limitation on the terminal 1200, and the terminal may include more or less components than those shown in the figure, or a combination of certain components. Components, or different component arrangements. For example, the terminal 1200 also includes components such as a radio frequency circuit, a photographing component, a sensor, an audio circuit, a wireless fidelity (Wireless Fidelity, WiFi) component, a power supply, and a Bluetooth component, which will not be repeated here.
本申请实施例还提供了一种计算机可读介质,该计算机可读介质存储有至少一条指令,所述至少一条指令由处理器加载并执行以实现如上各个实施例所述的用户界面的显示方法。The embodiments of the present application also provide a computer-readable medium that stores at least one instruction, and the at least one instruction is loaded and executed by a processor to implement the user interface display method described in each of the above embodiments. .
本申请实施例还提供了一种计算机程序产品,该计算机程序产品存储有至少一条指令,所述至少一条指令由处理器加载并执行以实现如上各个实施例所述的用户界面的显示方法。The embodiments of the present application also provide a computer program product that stores at least one instruction, and the at least one instruction is loaded and executed by a processor to implement the user interface display method described in each of the above embodiments.
本领域技术人员应该可以意识到,在上述一个或多个示例中,本申请实施例所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。Those skilled in the art should be aware that, in one or more of the foregoing examples, the functions described in the embodiments of the present application may be implemented by hardware, software, firmware, or any combination thereof. When implemented by software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on the computer-readable medium. The computer-readable medium includes a computer storage medium and a communication medium, where the communication medium includes any medium that facilitates the transfer of a computer program from one place to another. The storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.
以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above are only optional embodiments of this application and are not intended to limit this application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included in the protection of this application. Within range.
Claims (20)
- 一种用户界面的显示方法,所述方法用于具有柔性显示屏的终端,所述终端包括第一壳体和第二壳体,所述第二壳体与所述第一壳体滑动连接,所述第二壳体和所述第一壳体通过相对运动改变所述柔性显示屏的外露显示区域,所述方法包括:A method for displaying a user interface, the method being used in a terminal with a flexible display screen, the terminal comprising a first housing and a second housing, the second housing being slidably connected to the first housing, The second housing and the first housing change the exposed display area of the flexible display screen through relative movement, and the method includes:获取当前屏幕分辨率,所述当前屏幕分辨率为所述柔性显示屏当前外露显示区域的分辨率;Acquiring a current screen resolution, where the current screen resolution is the resolution of the current exposed display area of the flexible display screen;响应于所述当前屏幕分辨率与当前应用对应的目标屏幕分辨率不同,根据所述目标屏幕分辨率控制所述柔性显示屏伸缩,其中,所述目标屏幕分辨率对应的界面填充区域占比低于所述当前屏幕分辨率对应的界面填充区域占比,所述界面填充区域占比指用户界面中界面元素以外填充区域的面积占比;In response to the current screen resolution being different from the target screen resolution corresponding to the current application, the flexible display screen is controlled to expand and contract according to the target screen resolution, wherein the interface fill area corresponding to the target screen resolution occupies a low proportion The proportion of the interface filled area corresponding to the current screen resolution, where the proportion of the interface filled area refers to the proportion of the area of the filled area other than the interface elements in the user interface;在经过伸缩的所述柔性显示屏中显示所述当前应用的用户界面。The user interface of the current application is displayed on the flexible display screen that has been expanded and contracted.
- 根据权利要求1所述的方法,其中,所述根据所述目标屏幕分辨率控制所述柔性显示屏伸,包括:The method according to claim 1, wherein the controlling the extension of the flexible display screen according to the target screen resolution comprises:确定当前屏幕尺寸,以及所述目标屏幕分辨率对应的目标屏幕尺寸;Determining the current screen size and the target screen size corresponding to the target screen resolution;根据所述当前屏幕尺寸和所述目标屏幕尺寸生成伸缩指令;Generating a telescopic instruction according to the current screen size and the target screen size;向屏幕机械组件发送所述伸缩指令,所述屏幕机械组件用于根据所述伸缩指令控制所述柔性显示屏伸缩,其中,伸缩后所述柔性显示屏的外露显示区域的尺寸为所述目标屏幕尺寸。Send the telescopic instruction to a screen mechanical component, and the screen mechanical component is used to control the flexible display screen to expand and contract according to the telescopic instruction, wherein the size of the exposed display area of the flexible display screen after the expansion and contraction is the target screen size.
- 根据权利要求2所述的方法,其中,所述根据所述当前屏幕尺寸和所述目标屏幕尺寸生成伸缩指令,包括:The method according to claim 2, wherein the generating a telescopic instruction according to the current screen size and the target screen size comprises:根据所述当前屏幕尺寸中的第一尺寸以及所述目标屏幕尺寸中的第二尺寸,确定伸缩距离和伸缩方式,所述第一尺寸和所述第二尺寸为壳体相对运动方向上的屏幕尺寸;According to the first size in the current screen size and the second size in the target screen size, the expansion distance and the expansion mode are determined, and the first size and the second size are the screens in the relative movement direction of the housing size;根据所述伸缩距离和所述伸缩方式生成所述伸缩指令。The telescopic instruction is generated according to the telescopic distance and the telescopic manner.
- 根据权利要求2所述的方法,其中,所述向屏幕机械组件发送所述伸缩指令,包括:The method according to claim 2, wherein the sending the telescopic instruction to the screen mechanical component comprises:响应于接收到对所述用户界面中尺寸调整控件的触发操作,向所述屏幕机械组件发送所述伸缩指令;In response to receiving a trigger operation on the size adjustment control in the user interface, sending the telescopic instruction to the screen mechanical component;或者,or,响应于接收到对所述柔性显示屏的伸缩操作,且所述伸缩操作指示的伸缩方式与所述伸缩指令指示的伸缩方式一致,向所述屏幕机械组件发送所述伸缩指令。In response to receiving a telescopic operation on the flexible display screen, and the telescopic manner indicated by the telescopic operation is consistent with the telescopic manner indicated by the telescopic instruction, the telescopic instruction is sent to the screen mechanical assembly.
- 根据权利要求1至4任一所述的方法,其中,所述在经过伸缩的所述柔性显示屏中显示所述当前应用的用户界面包括:The method according to any one of claims 1 to 4, wherein the displaying the user interface of the current application on the retractable flexible display screen comprises:根据所述目标屏幕分辨率调整显示缓存和应用窗口属性,所述应用窗口属性至少包括窗口尺寸;Adjusting display buffer and application window attributes according to the target screen resolution, where the application window attributes include at least a window size;根据所述显示缓存和所述应用窗口属性,调整所述用户界面中界面元素的界面元素布局,并重绘所述用户界面;Adjusting the interface element layout of interface elements in the user interface according to the display cache and the application window attributes, and redrawing the user interface;在经过伸缩的所述柔性显示屏中显示重绘后的所述用户界面。The redrawn user interface is displayed on the flexible display screen that has undergone expansion and contraction.
- 根据权利要求1至4任一所述的方法,其中,所述响应于所述当前屏幕分辨率与当前应用对应的目标屏幕分辨率不同,根据所述目标屏幕分辨率控制所述柔性显示屏伸缩之前,所述方法还包括:The method according to any one of claims 1 to 4, wherein, in response to the current screen resolution being different from the target screen resolution corresponding to the current application, the flexible display screen is controlled to expand and contract according to the target screen resolution Previously, the method also included:确定所述用户界面中界面元素的界面元素布局,以及各个界面元素对应的界面元素分辨 率;Determining the interface element layout of the interface elements in the user interface and the interface element resolution corresponding to each interface element;根据所述界面元素布局和所述界面元素分辨率,确定所述当前应用对应的所述目标屏幕分辨率。Determine the target screen resolution corresponding to the current application according to the interface element layout and the interface element resolution.
- 根据权利要求6所述的方法,其中,所述界面元素布局包括横向布局和纵向布局,所述界面元素分辨率包括横向分辨率和纵向分辨率;The method according to claim 6, wherein the interface element layout includes a horizontal layout and a vertical layout, and the interface element resolution includes a horizontal resolution and a vertical resolution;所述根据所述界面元素布局和所述界面元素分辨率,确定所述当前应用对应的所述目标屏幕分辨率,包括:The determining the target screen resolution corresponding to the current application according to the interface element layout and the interface element resolution includes:根据各个所述界面元素的所述横向布局以及所述横向分辨率,确定目标横向分辨率;Determine a target horizontal resolution according to the horizontal layout and the horizontal resolution of each of the interface elements;根据各个所述界面元素的所述纵向布局以及所述纵向分辨率,确定目标纵向分辨率;Determine a target vertical resolution according to the vertical layout and the vertical resolution of each of the interface elements;将所述目标横向分辨率和所述目标纵向分辨率确定为所述目标屏幕分辨率。The target horizontal resolution and the target vertical resolution are determined as the target screen resolution.
- 根据权利要求1至4任一所述的方法,其中,所述响应于所述当前屏幕分辨率与当前应用对应的目标屏幕分辨率不同,根据所述目标屏幕分辨率控制所述柔性显示屏伸缩,包括:The method according to any one of claims 1 to 4, wherein, in response to the current screen resolution being different from the target screen resolution corresponding to the current application, the flexible display screen is controlled to expand and contract according to the target screen resolution ,include:响应于所述当前屏幕分辨率与所述目标屏幕分辨率不同,且所述目标屏幕分辨率高于所述当前屏幕分辨率,获取终端电量状态;In response to the current screen resolution being different from the target screen resolution, and the target screen resolution is higher than the current screen resolution, acquiring the terminal power state;响应于所述电量状态指示电量高于电量阈值,或处于充电状态,根据所述目标屏幕分辨率控制所述柔性显示屏伸缩;In response to the power status indicating that the power is higher than the power threshold or in a charging state, controlling the flexible display screen to expand and contract according to the target screen resolution;所述方法还包括:The method also includes:响应于所述电量状态指示电量低于电量阈值,且未处于充电状态,保持所述当前屏幕分辨率。In response to the power status indicating that the power is lower than the power threshold and not in the charging state, the current screen resolution is maintained.
- 根据权利要求1至4任一所述的方法,其中,所述方法还包括:The method according to any one of claims 1 to 4, wherein the method further comprises:获取所述当前应用的应用类型;Obtaining the application type of the current application;响应于所述应用类型属于预设应用类型,执行所述获取当前屏幕分辨率的步骤;In response to the application type being a preset application type, executing the step of obtaining the current screen resolution;响应于所述应用类型不属于所述预设应用类型,保持所述当前屏幕分辨率;In response to the application type not belonging to the preset application type, maintaining the current screen resolution;其中,所述预设应用类型包括拍摄应用、视频应用、短视频应用和相册应用中的至少一种。Wherein, the preset application type includes at least one of a shooting application, a video application, a short video application, and an album application.
- 一种用户界面的显示装置,所述装置用于具有柔性显示屏的终端,所述终端包括第一壳体和第二壳体,所述第二壳体与所述第一壳体滑动连接,所述第二壳体和所述第一壳体通过相对运动改变所述柔性显示屏的外露显示区域,所述装置包括:A display device for a user interface, the device being used in a terminal with a flexible display screen, the terminal comprising a first housing and a second housing, the second housing being slidably connected to the first housing, The second housing and the first housing change the exposed display area of the flexible display screen through relative movement, and the device includes:获取模块,用于获取当前屏幕分辨率,所述当前屏幕分辨率为所述柔性显示屏当前外露显示区域的分辨率;An obtaining module, configured to obtain a current screen resolution, where the current screen resolution is the resolution of the currently exposed display area of the flexible display screen;控制模块,用于响应于所述当前屏幕分辨率与当前应用对应的目标屏幕分辨率不同,根据所述目标屏幕分辨率控制所述柔性显示屏伸缩,其中,所述目标屏幕分辨率对应的界面填充区域占比低于所述当前屏幕分辨率对应的界面填充区域占比,所述界面填充区域占比指用户界面中界面元素以外填充区域的面积占比;The control module is configured to control the expansion and contraction of the flexible display screen according to the target screen resolution in response to the current screen resolution being different from the target screen resolution corresponding to the current application, wherein the interface corresponding to the target screen resolution The proportion of the filled area is lower than the proportion of the filled area of the interface corresponding to the current screen resolution, and the proportion of the filled area of the interface refers to the proportion of the area of the filled area other than the interface elements in the user interface;显示模块,用于在经过伸缩的所述柔性显示屏中显示所述当前应用的用户界面。The display module is configured to display the user interface of the current application on the flexible display screen that has been expanded and contracted.
- 根据权利要求10所述的装置,其中,所述控制模块,包括:The device according to claim 10, wherein the control module comprises:尺寸确定单元,用于确定当前屏幕尺寸,以及所述目标屏幕分辨率对应的目标屏幕尺寸;The size determining unit is used to determine the current screen size and the target screen size corresponding to the target screen resolution;指令生成单元,用于根据所述当前屏幕尺寸和所述目标屏幕尺寸生成伸缩指令;An instruction generating unit, configured to generate a telescopic instruction according to the current screen size and the target screen size;指令发送单元,用于向屏幕机械组件发送所述伸缩指令,所述屏幕机械组件用于根据所述伸缩指令控制所述柔性显示屏伸缩,其中,伸缩后所述柔性显示屏的外露显示区域的尺寸为所述目标屏幕尺寸。The instruction sending unit is configured to send the telescopic instruction to the screen mechanical component, and the screen mechanical component is used to control the expansion and contraction of the flexible display screen according to the expansion and contraction instruction. The size is the target screen size.
- 根据权利要求11所述的装置,其中,所述指令生成单元,用于:The device according to claim 11, wherein the instruction generating unit is configured to:根据所述当前屏幕尺寸中的第一尺寸以及所述目标屏幕尺寸中的第二尺寸,确定伸缩距离和伸缩方式,所述第一尺寸和所述第二尺寸为壳体相对运动方向上的屏幕尺寸;According to the first size in the current screen size and the second size in the target screen size, the expansion distance and the expansion mode are determined, and the first size and the second size are the screens in the relative movement direction of the housing size;根据所述伸缩距离和所述伸缩方式生成所述伸缩指令。The telescopic instruction is generated according to the telescopic distance and the telescopic manner.
- 根据权利要求11所述的装置,其中,所述指令发送单元,用于:The device according to claim 11, wherein the instruction sending unit is configured to:响应于接收到对所述用户界面中尺寸调整控件的触发操作,向所述屏幕机械组件发送所述伸缩指令;In response to receiving a trigger operation on the size adjustment control in the user interface, sending the telescopic instruction to the screen mechanical component;或者,or,响应于接收到对所述柔性显示屏的伸缩操作,且所述伸缩操作指示的伸缩方式与所述伸缩指令指示的伸缩方式一致,向所述屏幕机械组件发送所述伸缩指令。In response to receiving a telescopic operation on the flexible display screen, and the telescopic manner indicated by the telescopic operation is consistent with the telescopic manner indicated by the telescopic instruction, the telescopic instruction is sent to the screen mechanical assembly.
- 根据权利要求10至13任一所述的装置,其中,所述显示模块,包括:The device according to any one of claims 10 to 13, wherein the display module comprises:调整单元,用于根据所述目标屏幕分辨率调整显示缓存和应用窗口属性,所述应用窗口属性至少包括窗口尺寸;An adjustment unit, configured to adjust display buffer and application window attributes according to the target screen resolution, where the application window attributes include at least a window size;重绘单元,用于根据所述显示缓存和所述应用窗口属性,调整所述用户界面中界面元素的界面元素布局,并重绘所述用户界面;The redrawing unit is configured to adjust the interface element layout of the interface elements in the user interface according to the display buffer and the application window attributes, and redraw the user interface;显示单元,用于在经过伸缩的所述柔性显示屏中显示重绘后的所述用户界面。The display unit is configured to display the redrawn user interface on the flexible display screen after expansion.
- 根据权利要求10至13任一所述的装置,其中,所述装置还包括:The device according to any one of claims 10 to 13, wherein the device further comprises:第一确定模块,用于确定所述用户界面中界面元素的界面元素布局,以及各个界面元素对应的界面元素分辨率;The first determining module is used to determine the interface element layout of the interface elements in the user interface and the interface element resolution corresponding to each interface element;第二确定模块,用于根据所述界面元素布局和所述界面元素分辨率,确定所述当前应用对应的所述目标屏幕分辨率。The second determining module is configured to determine the target screen resolution corresponding to the current application according to the interface element layout and the interface element resolution.
- 根据权利要求15所述的装置,其中,所述界面元素布局包括横向布局和纵向布局,所述界面元素分辨率包括横向分辨率和纵向分辨率;The device according to claim 15, wherein the interface element layout includes a horizontal layout and a vertical layout, and the interface element resolution includes a horizontal resolution and a vertical resolution;所述第二确定模块,包括:The second determining module includes:第一确定单元,用于根据各个所述界面元素的所述横向布局以及所述横向分辨率,确定目标横向分辨率;A first determining unit, configured to determine a target horizontal resolution according to the horizontal layout and the horizontal resolution of each of the interface elements;第二确定单元,用于根据各个所述界面元素的所述纵向布局以及所述纵向分辨率,确定目标纵向分辨率;A second determining unit, configured to determine a target vertical resolution according to the vertical layout and the vertical resolution of each of the interface elements;第三确定单元,用于将所述目标横向分辨率和所述目标纵向分辨率确定为所述目标屏幕分辨率。The third determining unit is configured to determine the target horizontal resolution and the target vertical resolution as the target screen resolution.
- 根据权利要求10至13任一所述的装置,其中,所述控制模块,还用于:The device according to any one of claims 10 to 13, wherein the control module is further used for:响应于所述当前屏幕分辨率与所述目标屏幕分辨率不同,且所述目标屏幕分辨率高于所述当前屏幕分辨率,获取终端电量状态;In response to the current screen resolution being different from the target screen resolution, and the target screen resolution is higher than the current screen resolution, acquiring the terminal power state;响应于所述电量状态指示电量高于电量阈值,或处于充电状态,根据所述目标屏幕分辨率控制所述柔性显示屏伸缩;In response to the power status indicating that the power is higher than the power threshold or in a charging state, controlling the flexible display screen to expand and contract according to the target screen resolution;所述方法还包括:The method also includes:响应于所述电量状态指示电量低于电量阈值,且未处于充电状态,保持所述当前屏幕分辨率。In response to the power status indicating that the power is lower than the power threshold and not in the charging state, the current screen resolution is maintained.
- 根据权利要求10至13任一所述的装置,其中,所述装置还包括:The device according to any one of claims 10 to 13, wherein the device further comprises:应用获取模块,用于获取所述当前应用的应用类型;The application acquisition module is used to acquire the application type of the current application;所述获取模块,还用于响应于所述应用类型属于预设应用类型,执行所述获取当前屏幕分辨率的步骤;The acquiring module is further configured to execute the step of acquiring the current screen resolution in response to the application type being a preset application type;保持模块,用于响应于所述应用类型不属于所述预设应用类型,保持所述当前屏幕分辨率;A maintaining module, configured to maintain the current screen resolution in response to the application type not belonging to the preset application type;其中,所述预设应用类型包括拍摄应用、视频应用、短视频应用和相册应用中的至少一种。Wherein, the preset application type includes at least one of a shooting application, a video application, a short video application, and an album application.
- 一种终端,其特征在于,所述终端包括处理器和存储器;所述存储器存储有至少一条指令,所述至少一条指令用于被所述处理器执行以实现如权利要求1至9任一所述的用户界面的显示方法。A terminal, wherein the terminal includes a processor and a memory; the memory stores at least one instruction, and the at least one instruction is used to be executed by the processor to implement any one of claims 1 to 9 The display method of the user interface described.
- 一种计算机可读存储介质,其特征在于,所述存储介质存储有至少一条指令,所述至少一条指令用于被处理器执行以实现如权利要求1至9任一所述的用户界面的显示方法。A computer-readable storage medium, wherein the storage medium stores at least one instruction, and the at least one instruction is used to be executed by a processor to realize the display of the user interface according to any one of claims 1 to 9 method.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010431657.9 | 2020-05-20 | ||
CN202010431657.9A CN113703644A (en) | 2020-05-20 | 2020-05-20 | User interface display method, device, terminal and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021232960A1 true WO2021232960A1 (en) | 2021-11-25 |
Family
ID=78645665
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/085049 WO2021232960A1 (en) | 2020-05-20 | 2021-04-01 | Method and apparatus for displaying user interface, terminal and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113703644A (en) |
WO (1) | WO2021232960A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115174731A (en) * | 2022-06-30 | 2022-10-11 | 深圳传音控股股份有限公司 | Control method, intelligent terminal and storage medium |
US11768592B1 (en) * | 2022-04-12 | 2023-09-26 | Beijing Xiaomi Mobile Software Co., Ltd. | Method and apparatus for resizing window, electronic device, and readable storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107659837A (en) * | 2017-08-31 | 2018-02-02 | 维沃移动通信有限公司 | A kind of multi-medium data control method for playing back and mobile terminal |
CN109639866A (en) * | 2019-01-28 | 2019-04-16 | 维沃移动通信有限公司 | A kind of display methods and terminal |
US20190261519A1 (en) * | 2018-02-22 | 2019-08-22 | Samsung Electronics Co., Ltd. | Electronic device including flexible display and method for controlling same |
CN111145648A (en) * | 2019-12-31 | 2020-05-12 | 武汉天马微电子有限公司 | Flexible screen display module, display device and control method |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109766053B (en) * | 2019-01-15 | 2020-12-22 | Oppo广东移动通信有限公司 | User interface display method, device, terminal and storage medium |
CN110368689B (en) * | 2019-07-19 | 2021-08-06 | 腾讯科技(深圳)有限公司 | Game interface display method, system, electronic equipment and storage medium |
-
2020
- 2020-05-20 CN CN202010431657.9A patent/CN113703644A/en active Pending
-
2021
- 2021-04-01 WO PCT/CN2021/085049 patent/WO2021232960A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107659837A (en) * | 2017-08-31 | 2018-02-02 | 维沃移动通信有限公司 | A kind of multi-medium data control method for playing back and mobile terminal |
US20190261519A1 (en) * | 2018-02-22 | 2019-08-22 | Samsung Electronics Co., Ltd. | Electronic device including flexible display and method for controlling same |
CN109639866A (en) * | 2019-01-28 | 2019-04-16 | 维沃移动通信有限公司 | A kind of display methods and terminal |
CN111145648A (en) * | 2019-12-31 | 2020-05-12 | 武汉天马微电子有限公司 | Flexible screen display module, display device and control method |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11768592B1 (en) * | 2022-04-12 | 2023-09-26 | Beijing Xiaomi Mobile Software Co., Ltd. | Method and apparatus for resizing window, electronic device, and readable storage medium |
US20230325061A1 (en) * | 2022-04-12 | 2023-10-12 | Beijing Xiaomi Mobile Software Co., Ltd. | Method and apparatus for resizing window, electronic device, and readable storage medium |
CN115174731A (en) * | 2022-06-30 | 2022-10-11 | 深圳传音控股股份有限公司 | Control method, intelligent terminal and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN113703644A (en) | 2021-11-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11330194B2 (en) | Photographing using night shot mode processing and user interface | |
WO2022105484A1 (en) | Display screen frequency conversion method, ddic chip, display screen module, and terminal | |
US11012639B2 (en) | Apparatus and method for processing an image in device | |
US20230298245A1 (en) | Display control method, non-transitory computer-readable storage medium, and electronic device | |
WO2021232960A1 (en) | Method and apparatus for displaying user interface, terminal and storage medium | |
KR101889624B1 (en) | Method and device for mode switching | |
EP3173923A1 (en) | Method and device for image display | |
US8786629B2 (en) | Display apparatus and control method of the same | |
WO2015165013A1 (en) | Method for displaying data on screen and display control apparatus | |
JP6985408B2 (en) | Screen display method, device, program and recording medium | |
KR20150139159A (en) | Photographing apparatus and method for making a video | |
US20230017899A1 (en) | Method for obtaining exposure data and electronic device | |
US20100079442A1 (en) | Method for displaying video, mobile electronic device thereof, storage medium thereof | |
WO2021249041A1 (en) | Display screen control method, device, terminal, and storage medium | |
JP2024504159A (en) | Photography methods, equipment, electronic equipment and readable storage media | |
CN112804381A (en) | Control method and device of electronic equipment, electronic equipment and readable storage medium | |
US20240129621A1 (en) | Video recording method and electronic device | |
WO2022268079A1 (en) | Photographing method and device | |
TWI493443B (en) | Electronic apparatus and method of displaying application thereof | |
KR102241840B1 (en) | Apparatus and method for processing a image in device | |
EP4057124A1 (en) | Method and apparatus for interaction between devices and medium | |
CN118093069A (en) | View drawing method, view drawing device and storage medium | |
KR101503851B1 (en) | Image display apparatus and display method of the same |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21809475 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 21809475 Country of ref document: EP Kind code of ref document: A1 |