WO2021232961A1 - Display control method and apparatus, storage medium, and electronic device - Google Patents

Display control method and apparatus, storage medium, and electronic device Download PDF

Info

Publication number
WO2021232961A1
WO2021232961A1 PCT/CN2021/085084 CN2021085084W WO2021232961A1 WO 2021232961 A1 WO2021232961 A1 WO 2021232961A1 CN 2021085084 W CN2021085084 W CN 2021085084W WO 2021232961 A1 WO2021232961 A1 WO 2021232961A1
Authority
WO
WIPO (PCT)
Prior art keywords
display
window
size
screen
application program
Prior art date
Application number
PCT/CN2021/085084
Other languages
French (fr)
Chinese (zh)
Inventor
陈彪
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2021232961A1 publication Critical patent/WO2021232961A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/16Constructional details or arrangements
    • G06F1/1613Constructional details or arrangements for portable computers
    • G06F1/1615Constructional details or arrangements for portable computers with several enclosures having relative motions, each enclosure supporting at least one I/O or computing function
    • G06F1/1624Constructional details or arrangements for portable computers with several enclosures having relative motions, each enclosure supporting at least one I/O or computing function with sliding enclosures, e.g. sliding keyboard or display
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/16Constructional details or arrangements
    • G06F1/1613Constructional details or arrangements for portable computers
    • G06F1/1633Constructional details or arrangements of portable computers not specific to the type of enclosures covered by groups G06F1/1615 - G06F1/1626
    • G06F1/1637Details related to the display arrangement, including those related to the mounting of the display in the housing
    • G06F1/1652Details 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/16Constructional details or arrangements
    • G06F1/1613Constructional details or arrangements for portable computers
    • G06F1/1633Constructional details or arrangements of portable computers not specific to the type of enclosures covered by groups G06F1/1615 - G06F1/1626
    • G06F1/1675Miscellaneous details related to the relative movement between the different enclosures or enclosure parts
    • G06F1/1677Miscellaneous details related to the relative movement between the different enclosures or enclosure parts for detecting open or closed state or particular intermediate positions assumed by movable parts of the enclosure, e.g. detection of display lid position with respect to main body in a laptop, detection of opening of the cover of battery compartment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04886Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures by partitioning the display area of the touch-screen or the surface of the digitising tablet into independently controllable areas, e.g. virtual keyboards or menus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/147Digital output to display device ; Cooperation and interconnection of the display device with other functional units using display panels
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2203/00Indexing scheme relating to G06F3/00 - G06F3/048
    • G06F2203/048Indexing scheme relating to G06F3/048
    • G06F2203/04803Split screen, i.e. subdividing the display area or the window area into separate subareas

Definitions

  • This application relates to the technical field of electronic equipment, and in particular to a display control method, device, storage medium and electronic equipment.
  • the embodiments of the present application provide a display control method, device, storage medium, and electronic equipment, which can adaptively adjust the application layout along with the expansion and contraction of the display screen.
  • an embodiment of the present application provides a display control method, which is applied to an electronic device including a retractable flexible display screen, and the method includes:
  • the display interface of the application program is redrawn and displayed on the screen.
  • an embodiment of the present application also provides a display control device, which is applied to an electronic device including a retractable flexible display screen, and the device includes:
  • the telescopic detection module is configured to detect the telescopic length during the telescopic process of the flexible display screen and determine the effective display size of the screen according to the telescopic length;
  • the parameter adjustment module is used to determine the application program running in the foreground, and adjust the window size parameter of the application program in the window management service according to the effective display size;
  • a window layout module configured to rearrange the windows of the application program according to the adjusted window size parameters
  • the interface drawing module is used to redraw and display the display interface of the application program on the screen according to the re-layout window.
  • an embodiment of the present application also provides a storage medium on which a computer program is stored, and when the computer program runs on a computer, the computer is caused to execute:
  • the display interface of the application program is redrawn and displayed on the screen.
  • an embodiment of the present application also provides an electronic device, including a processor and a memory, the memory has a computer program, and the processor is configured to execute:
  • the display interface of the application program is redrawn and displayed on the screen.
  • FIG. 1 is a schematic diagram of the structure of an electronic device according to an embodiment of the present application.
  • FIG. 2 is another schematic diagram of the structure of the electronic device according to the embodiment of the present application.
  • FIG. 3 is a three-dimensional exploded schematic diagram of an electronic device according to an embodiment of the present application.
  • Figure 4 is a cross-sectional view of the electronic device in Figure 1 along V1-V1;
  • Figure 5 is a cross-sectional view of the electronic device in Figure 2 along V2-V2;
  • FIG. 6 is a schematic diagram of an application scenario of a display control method provided by an embodiment of the application.
  • FIG. 7 is a schematic diagram of a window of an application program in the display control method provided by an embodiment of the application.
  • FIG. 8 is a schematic diagram of the window layout in the display control method provided by the embodiment of the application.
  • FIG. 9 is another schematic diagram of the window layout in the display control method provided by the embodiment of the application.
  • FIG. 10 is another schematic diagram of the window layout in the display control method provided by the embodiment of the application.
  • FIG. 11 is another schematic diagram of the window layout in the display control method provided by the embodiment of the application.
  • FIG. 12 is another schematic diagram of the window layout in the display control method provided by the embodiment of the application.
  • FIG. 13 is a schematic structural diagram of a display control device provided by an embodiment of the application.
  • FIG. 14 is a schematic diagram of another structure of an electronic device provided by an embodiment of the application.
  • FIG. 15 is a schematic diagram of another structure of an electronic device provided by an embodiment of the application.
  • the embodiment of the present application provides a display control method.
  • the execution subject of the display control method may be the display control device provided in the embodiment of the present application, or an electronic device integrated with the display control device, wherein the display control device may use hardware or Realized by software.
  • the embodiment of the present application provides a display control method, the method is applied to an electronic device including a retractable flexible display screen, and the method includes:
  • the display interface of the application program is redrawn and displayed on the screen.
  • the determining the application program running in the foreground and adjusting the window size parameter of the application program in the window management service according to the effective display size includes:
  • the re-layout of the windows of the application program according to the adjusted window size parameters includes:
  • the display elements in the window of the application are re-layout.
  • the method further includes:
  • the display content corresponding to the content display area is acquired, and the display content is loaded in the corresponding display element.
  • the electronic device includes a position detection sensor; the detecting the telescopic length and determining the effective display size of the screen according to the telescopic length includes:
  • the flexible display screen includes a reel
  • the position detection sensor is an angular velocity sensor connected with the reel
  • the detection of the telescopic direction and the telescopic length of the flexible display screen according to the position sensor includes :
  • the expansion and contraction length of the flexible display screen is calculated according to the rotation angle, and the expansion and contraction direction of the flexible display screen is determined according to the rotation direction.
  • the method further includes:
  • FIG. 1 is a schematic diagram of a first structure of an electronic device provided by an embodiment of this application.
  • the electronic device can be a smart phone, a tablet computer, a palmtop computer, a notebook computer, or a desktop computer and other devices.
  • the electronic device has a flexible display screen, one end of the flexible display screen is set on a reel, so that part of the flexible display screen can be wound on the reel, and the reel can be used to wind the flexible display screen and release the flexible display screen , Thereby expanding the display part of the flexible display assembly.
  • the flexible display screen can be stretched or retracted in a direction perpendicular to the reel.
  • FIG. 2 is a schematic diagram of a second structure of an electronic device provided by an embodiment of this application.
  • the electronic device shown in Fig. 2 has a flexible display screen in a stretched state.
  • the display part of the flexible display screen can be expanded to improve the user's operating experience.
  • the display part may not be expanded, thereby making the whole machine smaller in size and convenient to carry.
  • the expansion and contraction direction of the flexible display screen shown in Figure 1 is only an example.
  • the flexible display screen may also be set to expand and contract along the vertical direction when the user holds the device vertically.
  • the display interface is re-layouted and drawn according to the display control method provided in the embodiment of the present application, so that the display interface can be Adapt to the expanded screen.
  • the expansion length is detected and the effective display size of the screen is determined according to the expansion length; the application running in the foreground is determined, and the window size parameters of the application in the window management service are adjusted according to the effective display size;
  • the adjusted window size parameters re-layout the windows of the application program; according to the re-layout window, the display interface of the application program is redrawn and displayed on the screen.
  • the window size parameters are continuously adjusted, so that applications running in the foreground can adaptively and dynamically adjust the layout of the display interface to adapt to the expanded display area.
  • the electronic device 100 of this embodiment includes a housing assembly 10, a flexible display 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 electronic device 100 in the embodiment of the present application includes but is not limited to mobile terminals such as mobile phones and tablet computers or other portable electronic devices. In this document, the electronic device 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 accommodating space 16. In this way, part of the flexible display screen 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 driving member 50 can be used to drive the flexible display screen 30 to unfold, so that more flexible display screens 30 are exposed outside the accommodating space 16.
  • the portion of 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 electronic device 100 becomes larger.
  • the driving member 50 may specifically be a rotating shaft structure with teeth 52 on the outside.
  • the flexible display screen 30 is linked with the driving member 50 by means of engagement or the like. When the first housing 12 and the second housing 14 are relatively far away, the driving member 50 is driven The part of the flexible display screen 30 engaged on the driving member 50 moves and unfolds.
  • the driving member 50 can also be a round shaft without teeth 52.
  • the driving member 50 is wound (wound) on the part of the driving member 50.
  • the flexible display screen 30 is stretched 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 flexible display screen can be retracted by the driving member 50.
  • the electronic device 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 display screen 30 is reset, so that part of the flexible display screen is retracted into the accommodating space 16.
  • the driving mechanism 70 can be arranged in the accommodating space 16, the driving mechanism 70 can be linked with the second housing 14, and the driving mechanism 70 is used to drive the second housing 14 to be relative to the first housing 12.
  • the separation movement drives 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.
  • FIG. 6 is a schematic flowchart of the first display control method provided by an embodiment of the application.
  • the specific process of the display control method provided by the embodiment of the present application may be as follows:
  • the expansion length is detected and the effective display size of the screen is determined according to the expansion length.
  • the operating system of the electronic device may be an Android operating system or an ios operating system, etc.
  • This application does not impose specific restrictions on the operating system of the electronic device. Regardless of which operation, it has a corresponding window management service. It is displayed in the management window.
  • the Android operating system is taken as an example for description.
  • the Android system is divided into four layers, from top to bottom, they are the application layer, the application framework layer, the system runtime layer, and the kernel layer.
  • the kernel layer provides low-level drivers for various hardware of electronic devices, such as display, audio, camera, Bluetooth, WI-FI, power management, and so on.
  • the system runtime library layer includes the system library and runtime, and mainly provides feature support for the Android system through some c/c++ libraries.
  • the application framework layer mainly provides various APIs (Application Programming Interface) that may be used when building applications.
  • the activity management service (ActivityManagerService) and window management service (WindowManagerService) involved in the following are all provided by the application
  • the framework layer is provided. All applications installed on electronic devices are in the application layer, including the applications that come with the mobile phone and the user's own Android applications, such as WeChat, games, etc.
  • Window is an abstract concept, which is used to draw user interfaces and respond to user input events. From the perspective of the application framework layer, the interface of the Android system is composed of one or more windows, and these windows are managed by the window management service.
  • windows involved in the following include both application windows, such as WeChat dialogs, browser search interfaces, etc., as well as some system-level windows, such as recently run dialogs, shutdown dialogs, and status bar drop-downs. Bar, lock screen interface, etc.
  • Activity is an application component that provides an interface that users can interact with.
  • An Activity corresponds to an application window, which can display some interface elements, such as controls, etc., and can listen to user processing events.
  • An application can have multiple activities.
  • the activity corresponding to the interface of the application program below can be understood as the Activity corresponding to the interface.
  • the activity corresponding to the dialogue interface of WeChat can be understood as the activity corresponding to the dialogue interface in the application of WeChat.
  • the life cycle of Activity is managed by the activity management service (ActivityManagerService) in the Android system.
  • an Activity In the life cycle of an Activity, it can have the following states: running: the activity currently displayed on the screen (located at the top of the task stack), visible to the user ; Poused: It is still visible to the user, but the interface focus has been lost. This Activity cannot interact with the user; Stopped: The user cannot see the current interface and cannot interact with the user. It is completely covered; Killed: The interface is destroyed.
  • This application does not need to adapt and develop the application itself, but optimizes the display of the window from the system framework layer based on the window management service, so that the application can adapt the display interface as the flexible display screen expands and contracts.
  • the layout of the application program can be adapted to the flexible display screen after expansion.
  • the size of the screen will change, that is, the size of the display area of the display screen will change accordingly. Therefore, once it is detected that the flexible display screen starts to perform a telescopic operation, the telescopic operation is monitored in real time, the telescopic length is obtained, and the effective display size of the screen is determined according to the telescopic length.
  • the stretch operation performed by the flexible display screen as an example, if the flexible display screen performs the stretch operation, the screen becomes larger, and the window of the application currently displayed in the foreground and the display elements in the adaptive adjustment window need to be enlarged accordingly.
  • the telescopic length is an effective telescopic length
  • the determination of the effective display size of the screen according to the telescopic length in 101 is executed.
  • the effective stretch length is a threshold value at which human eyes can perceive the change in the length or width of the screen
  • the threshold value may be an empirical value.
  • the human eye can feel the change in the length or width of the screen.
  • the display content of the screen can be adapted to change with the screen in real time, and the displayed window needs to be adjusted adaptively.
  • the method further includes: determining whether the difference between the effective display size and the historical display size is within a preset range; if not, execute 102 .
  • the current effective display size is recorded as the historical display size.
  • the layout is adjusted next time, according to whether the difference between the effective display size and the historical display size is greater than the preset range, if it is, it is considered that the human eye can perceive the change in the length or width of the screen, in order to achieve the expansion and contraction of the display screen.
  • the display content of the screen can be adapted to change with the screen in real time, and the displayed window needs to be adjusted adaptively.
  • the layout and drawing are performed once, so that during the entire stretch operation .
  • the window layout of the foreground application also changes dynamically, corresponding to the user, you can intuitively see that the length of the screen is getting longer as the display screen stretches.
  • the effective display size is the length of the display screen in the telescopic direction.
  • the effective display size is the width of the screen
  • the stretch length can be a positive value or a negative value.
  • the detection of the expansion length and the calculation of the effective display size can be implemented in multiple ways.
  • the electronic device is provided with a position sensor, which detects the expansion and contraction direction and length of the flexible display screen according to the position sensor; obtains the recorded historical display size, and calculates it according to the expansion length, the expansion direction, and the historical display size.
  • the effective display size after expansion and contraction; the historical display size of the record is updated according to the effective display size.
  • the position sensor is an angular velocity sensor
  • the flexible display screen reel is connected with the angular velocity sensor, and the flexible display screen is scrolled and stretched by external force.
  • the angular velocity sensor detects the rotation angle and rotation direction of the reel; calculates the telescopic length of the flexible display screen according to the rotation angle, and determines the telescopic direction of the flexible display screen according to the rotation direction.
  • the current effective display size is recorded as the historical display size.
  • the effective display size is calculated according to the historical display size, expansion length, and expansion direction.
  • the angular velocity sensor can identify the direction of rotation of the reel, for example, whether it is rotating clockwise or counterclockwise, so that the direction of expansion and contraction of the flexible display screen can be known.
  • the effective display size after expansion and contraction is calculated according to the historical display size and the expansion length before the expansion and contraction of the flexible display screen.
  • the unit of telescopic length can be expressed in inches or pixels.
  • the electronic device is provided with a light-sensitive detector, and marks are arranged on the scrollable part of the flexible display screen, and the light-sensitive detector determines the telescopic length of the flexible display screen by identifying these marks.
  • the application program running in the foreground is determined, and the window size parameter of the application program in the window management service is adjusted according to the effective display size.
  • the window state data (windowstate) of the application is available in the window management service.
  • the window state data represents all the properties of a window, including window size parameters, such as the length and width of the window. Wait.
  • determining the application program running in the foreground and adjusting the window size parameters of the application program in the window management service according to the effective display size includes: determining the application program running in the foreground; determining the corresponding application program according to the window management service Window status data; the variables related to the screen display size in the window status data are modified to be consistent with the effective display size.
  • the window adopts a relative layout (RelativeLayout) rule, that is, a fixed length is not used to represent the height or length of the layout, but attributes such as match_parent and wrap_content are used to represent the height or length of a specific display element.
  • match_parent represents the same size as its parent node
  • wrap_content represents the same length as its own content. For example, if the height of the root node of an application's layout file is defined as match_parent, the height of the root view of the application is the height of the system's screen.
  • the system framework layer adjusts the window size parameters of the application in the window management service according to the effective display size, and does not need to be adjusted by the application itself.
  • the window size parameter parent [0,0],[720,1320] of the application in the window management service.
  • 70 is the width of the screen
  • the windows of the application program are re-layout.
  • the display interface of the application program is redrawn and displayed on the screen according to the re-layout of the window.
  • the re-layout of the windows of the application program according to the adjusted window size parameters includes: adjusting the display size of the root view of the application program according to the adjusted window size parameters; The display size of the view and the layout attributes of the display elements in the window re-layout the display elements in the application window.
  • the system framework layer After adjusting the window size parameters of the application in the management service, the system framework layer sends a notification message to the activity of the application running in the foreground. After the activity of the application receives the notification information, the activity management service re-lays out and draws the window. Because window management services and activity management services work at the system framework layer, this solution can optimize the display of windows from the system framework layer, without requiring software engineers to spend a lot of time and energy on application layout adaptation. superior.
  • Figure 7 is a schematic diagram of a window of a certain application.
  • the window is laid out in a tree structure.
  • the window includes a root view.
  • the root view corresponds to the root container.
  • the function bar 1, function bar 2, content data, buttons 1, and button 2 in the interface shown in Figure 7 are brother components, and the root container is the parent container of these components, and each component has a corresponding display element.
  • These components also use relative layout rules, that is, the position and attributes of each component are not written as fixed values, but the position is set according to the relative layout rules. For example, set the layout attribute of function bar 1 to align with the top of the parent container; set the layout attribute of function bar 2 to align with the bottom of the parent container.
  • the size of button 1 is set to 150dp ⁇ 60dp, and its position is set to be 200dp from the bottom of the parent container and 180dp from the left edge of the parent container.
  • the position of the button 1 on the interface will also change adaptively based on the above-mentioned relative position constraint.
  • button 2 is laid out according to the position of its sibling component button 1, the size of button 2 is set to 50dp ⁇ 30dp, its position is set to be 180dp from the right edge of button 1 and 200dp from the bottom of the parent container. Then when the layout of button 1 and the parent container changes, the layout of button 2 will also change as the layout of button 1 and the parent container changes.
  • dp density independent pixels, device-independent pixels
  • 1dp represents the length of 1px (pixel, pixel) when the screen pixel density is 160ppi.
  • FIG. 8 is a schematic diagram of the window layout in the display control method provided by an embodiment of the application.
  • the flexible display screen in the figure can be expanded and contracted in the vertical direction, a floating window is displayed on the window, and the layout attribute of the floating window is centered display, that is, displayed in the middle of the window.
  • the flexible display screen stretches and the length becomes longer, the position of the floating window on the entire screen will also be adjusted accordingly, and it will always stay in the middle of the window.
  • the window under the floating window has been out of focus and is in the Poused state, the window is still visible to the user in the foreground, so the size of the window will also be adjusted corresponding to the length of the screen. .
  • FIG. 9 is another schematic diagram of the window layout in the display control method provided by an embodiment of the application.
  • the flexible display screen in the figure can be expanded and contracted in the vertical direction, an image is displayed in the window, and the layout of the components corresponding to the image is set to fill the components according to the displayed content. Therefore, before the flexible display is stretched, since the aspect ratio of the image itself is much larger than the aspect ratio of the screen, the image does not cover the screen in the width direction, and as the flexible display stretches, the length and width of the screen The ratio increases, in order to fill the entire screen, the image will also be enlarged proportionally, gradually filling the screen in the width direction.
  • each display element in the window of the application program after re-layouting each display element in the window of the application program, it further includes: when the content display area in the re-layout display element changes, obtaining the display content corresponding to the content display area, and adding The display content is loaded in the corresponding display element.
  • FIG. 10 is another schematic diagram of the window layout in the display control method provided by the embodiment of the application.
  • This window is the browser search interface.
  • the function bar 1 is the search bar
  • the function bar 2 is the function space bar of the browser
  • the content data is the search result page
  • the search result page can be displayed on the page in the form of waterfall or information list. show.
  • the layout attribute of function bar 1 is aligned with the top of the parent container
  • the layout attribute of function bar 2 is aligned with the bottom of the parent container. Therefore, with the expansion of the flexible display screen, the position of the function bar 1 does not change, and the position of the function bar 2 moves down accordingly, and is always aligned with the bottom of the root view.
  • the displayable length in the length direction of the screen becomes longer, and the content that can be displayed in it also becomes larger. In this area, more content that is not displayed on the current page is displayed. In other words, as the screen stretches, the content data will be pulled out like a drawer to display more content on the interface.
  • the solution shown in FIG. 10 can be applied to a scene in which a variety of windows contain function bars and content data, and the content data is displayed in the form of a waterfall or an information list.
  • FIG. 11 is another schematic diagram of the window layout in the display control method provided by an embodiment of the application.
  • the flexible display shown in the figure can be extended and retracted in the horizontal direction. Similar to the principle of the window shown in FIG. 8, as the flexible display screen expands horizontally and the width becomes wider, the position of the floating window on the entire screen will also be adjusted accordingly, and it will always be in the middle of the window.
  • FIG. 12 is another schematic diagram of the window layout in the display control method provided by the embodiment of the application.
  • the flexible display shown in the figure can be extended and retracted in the horizontal direction.
  • the principle is similar to the window shown in FIG. 10.
  • the difference is that the layout attribute of the function bar 1 is aligned with the top, left and right borders of the parent container, and the size of the function bar 1 has a fixed dp value in the vertical direction.
  • the layout attribute of the function bar 2 is aligned with the bottom, left and right borders of the parent container, and the size of the function bar 2 has a fixed dp value in the vertical direction.
  • the widths of the function bar 1 and the function bar 2 will be adaptively adjusted to be consistent with the width of the screen.
  • the displayable width of the content display area where the content data displayed in the form of waterfall or information list is located in the screen width direction becomes wider, and the display mode of each piece of information or data in the area on the screen is adjusted accordingly.
  • the content data is text data, more text can be displayed in each line.
  • the layout attributes and illustrations listed in the foregoing embodiments are only examples. In other embodiments, as long as the relative layout rules are complied with, the layout scheme can be included in the scope of the embodiments of the present application.
  • the above-mentioned embodiment is illustrated by taking the screen stretch as an example. When the flexible display screen is retracted and the screen becomes smaller, it is based on the same principle, except that the value of the relevant parameter is reduced, which will not be repeated here.
  • the display interface of the application program is redrawn and displayed on the screen according to the re-layout window to adapt to the scaled screen. If the scaling operation still continues, return to execution 101 to 104, and so on to achieve dynamic adjustment of the window layout until the scaling operation is terminated.
  • the present application is not limited by the execution order of the described processes, and certain processes may also be performed in other order or at the same time if there is no conflict.
  • the display control method provided by the embodiments of the present application is applied to an electronic device that includes a retractable flexible display screen.
  • the electronic device detects the stretched length and detects The expansion length determines the effective display size of the screen after expansion, that is, the new size of the display area after the display expansion, based on the window management service, according to the effective display size to adjust the window size parameters of the foreground application, based on the adjusted Window size parameter, re-layout the application window, and redraw and display the display interface of the application program on the screen.
  • the window size parameters are continuously adjusted to make
  • the application program running in the foreground can adaptively and dynamically adjust the layout of the display interface to adapt to the expanded display area.
  • a display control device is also provided.
  • FIG. 13 is a schematic structural diagram of a display control device 300 according to an embodiment of the application.
  • the display control device 300 is applied to electronic equipment.
  • the display control device 300 includes a telescopic detection module 301, a parameter adjustment module 302, a window layout module 303, and an interface drawing module 304, as follows:
  • the telescopic detection module 301 is configured to detect the telescopic length during the telescopic process of the flexible display screen and determine the effective display size of the screen according to the telescopic length;
  • the parameter adjustment module 302 is configured to determine the application program running in the foreground, and adjust the window size parameter of the application program in the window management service according to the effective display size;
  • the window layout module 303 is configured to rearrange the windows of the application program according to the adjusted window size parameters
  • the interface drawing module 304 is configured to redraw and display the display interface of the application program on the screen according to the re-layout window.
  • the parameter adjustment module 302 is further used to: determine the application program running in the foreground; determine the window state data corresponding to the application program according to the window management service; Modified to be consistent with the effective display size.
  • the window layout module 303 is further configured to: adjust the display size of the root view of the application according to the adjusted window size parameter; according to the adjusted display size of the root view, and the window
  • the layout attribute of each display element in the application program re-layouts each display element in the window of the application program.
  • the interface drawing module 304 is further configured to: when the content display area in the re-layout display element changes, obtain the display content corresponding to the content display area, and load the display content in the corresponding display element. In the display element.
  • the electronic device includes a position detection sensor; the expansion detection module 301 is further used to: detect the expansion direction and expansion length of the flexible display screen according to the position sensor; The expansion and contraction length, the expansion and contraction direction, and the historical display size are calculated to obtain an effective display size after expansion and contraction; and the recorded historical display size is updated according to the effective display size.
  • the flexible display screen includes a reel
  • the position detection sensor is an angular velocity sensor connected to the reel
  • the telescopic detection module 301 is further configured to: detect the rotation angle of the reel according to the angular velocity sensor and Rotation direction; calculate the expansion and contraction length of the flexible display screen according to the rotation angle, and determine the expansion and contraction direction of the flexible display screen according to the rotation direction.
  • the parameter adjustment module 302 is further used to determine whether the difference between the effective display size and the historical display size is within a preset range; The effective display size adjusts the window size parameter of the application program in the window management service.
  • the display control device provided in this embodiment of the application belongs to the same concept as the display control method in the above embodiment, and any method provided in the display control method embodiment can be implemented by the display control device, and its specific implementation For details of the process, refer to the embodiment of the display control method, which will not be repeated here.
  • the display control device proposed in the embodiment of the present application includes a telescopic detection module 301, a parameter adjustment module 302, a window layout module 303, and an interface drawing module 304.
  • the expansion detection module 301 detects the expansion length, and determines the effective display size of the screen after expansion and contraction according to the detected expansion and contraction length, that is, the new size of the display area after the display screen has been expanded and contracted.
  • the parameter adjustment module 302 is based on the window management service, according to the effective display size. Adjust the window size parameters of the foreground application.
  • the window layout module 303 re-lays out the windows of the application based on the adjusted window size parameters.
  • the interface drawing module 304 redraws and displays the display interface of the application on the screen.
  • the window size parameters are continuously adjusted, so that the application program running in the foreground can adaptively and dynamically adjust the layout of the display interface to adapt to the expanded display area.
  • the embodiment of the present application also provides an electronic device.
  • the electronic device may be a smart phone, a tablet computer, or other devices.
  • FIG. 14 is a schematic diagram of the first structure of an electronic device provided by an embodiment of this application.
  • the electronic device 400 includes a processor 401 and a memory 402. Wherein, the processor 401 and the memory 402 are electrically connected.
  • the processor 401 is the control center of the electronic device 400. It uses various interfaces and lines to connect various parts of the entire electronic device. Various functions and processing data of the equipment, so as to monitor the electronic equipment as a whole.
  • the memory 402 can be used to store computer programs and data.
  • the computer program stored in the memory 402 contains instructions that can be executed in the processor.
  • Computer programs can be composed of various functional modules.
  • the processor 401 executes various functional applications and data processing by calling a computer program stored in the memory 402.
  • the processor 401 in the electronic device 400 loads the instructions corresponding to the process of one or more computer programs into the memory 402 according to the following process, and the processor 401 runs the instructions and stores them in the memory 402.
  • the processor 401 runs the instructions and stores them in the memory 402.
  • the display interface of the application program is redrawn and displayed on the screen.
  • FIG. 15 is a schematic diagram of a second structure of an electronic device provided by an embodiment of this application.
  • the electronic device 400 further includes: a radio frequency circuit 403, a display screen 404, a control circuit 405, an input unit 406, an audio circuit 407, a sensor 408, and a power supply 409.
  • the processor 401 is electrically connected to the radio frequency circuit 403, the display screen 404, the control circuit 405, the input unit 406, the audio circuit 407, the sensor 408, and the power supply 409, respectively.
  • the radio frequency circuit 403 is used to transmit and receive radio frequency signals to communicate with network equipment or other electronic equipment through wireless communication.
  • the flexible display screen 404 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device. These graphical user interfaces can be composed of images, text, icons, videos, and any combination thereof.
  • the control circuit 405 is electrically connected to the display screen 404 for controlling the display screen 404 to display information.
  • the input unit 406 can be used to receive inputted numbers, character information, or user characteristic information (such as fingerprints), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
  • the input unit 406 may include a fingerprint recognition module.
  • the audio circuit 407 can provide an audio interface between the user and the electronic device through a speaker and a microphone.
  • the audio circuit 407 includes a microphone.
  • the microphone is electrically connected to the processor 401.
  • the microphone is used to receive voice information input by the user.
  • the sensor 408 is used to collect external environmental information.
  • the sensor 408 may include one or more of sensors such as an environmental brightness sensor, an acceleration sensor, and a gyroscope.
  • the power supply 409 is used to supply power to various components of the electronic device 400.
  • the power supply 409 may be logically connected to the processor 401 through a power management system, so that functions such as charging, discharging, and power consumption management can be managed through the power management system.
  • the electronic device 400 may also include a camera, a Bluetooth module, etc., which will not be repeated here.
  • the processor 401 in the electronic device 400 loads the instructions corresponding to the process of one or more computer programs into the memory 402 according to the following process, and the processor 401 runs the instructions and stores them in the memory 402.
  • the processor 401 runs the instructions and stores them in the memory 402.
  • the display interface of the application program is redrawn and displayed on the screen.
  • an embodiment of the present application provides an electronic device that detects the telescopic length during the expansion and contraction of the flexible display screen, and determines the effective display of the screen after the expansion and contraction according to the detected expansion and contraction length. Size, that is, the new size of the display area after the display screen is stretched. Based on the window management service, the window size parameters of the foreground application are adjusted according to the effective display size. Based on the adjusted window size parameters, the application window is renewed. Layout, and redraw and display the display interface of the application on the screen.
  • the window size parameters are constantly adjusted, so that the application running in the foreground can adapt, Dynamically adjust the layout of the display interface to adapt to the expanded display area.
  • An embodiment of the present application also provides a storage medium in which a computer program is stored, and when the computer program is run on a computer, the computer executes the display control method described in any of the foregoing embodiments.
  • the storage medium may include, but is not limited to: read only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Mathematical Physics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

Disclosed in embodiments of the present application is a display control method, comprising: during extension and contraction of a flexible display screen, measuring the extension and contraction length and determining an effective display size of the screen; determining an application program running in the foreground, and adjusting window size parameters of the application program in a window management service according to the effective display size; reconfiguring a window of the application program according to the adjusted window size parameters; and redrawing and displaying a display interface of the application program on the screen.

Description

显示控制方法、装置、存储介质及电子设备Display control method, device, storage medium and electronic equipment
本申请要求于2020年05月18日提交中国专利局、申请号为202010421710.7、申请名称为“显示控制方法、装置、存储介质及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on May 18, 2020, the application number is 202010421710.7, and the application name is "display control method, device, storage medium and electronic equipment", the entire content of which is incorporated by reference In this application.
技术领域Technical field
本申请涉及电子设备技术领域,具体涉及一种显示控制方法、装置、存储介质及电子设备。This application relates to the technical field of electronic equipment, and in particular to a display control method, device, storage medium and electronic equipment.
背景技术Background technique
随着电子设备技术的发展,智能手机、平板电脑等智能终端的显示屏都呈趋大化发展,因为更大的显示屏能够呈现更丰富的内容,使得人机交互更加逼真、更有效率,带来更棒的用户体验;同时,为了使能更容易的携带智能终端,因此诞生了可折叠终端、柔性屏终端,在极大程度上满足了大显示屏的智能终端的便携性需求。With the development of electronic device technology, the display screens of smart terminals such as smartphones and tablet computers are becoming larger, because larger display screens can present richer content, making human-computer interaction more realistic and efficient. Bringing a better user experience; at the same time, in order to make it easier to carry smart terminals, foldable terminals and flexible screen terminals were born, which greatly met the portability requirements of smart terminals with large displays.
发明内容Summary of the invention
本申请实施例提供一种显示控制方法、装置、存储介质及电子设备,能够实现随着显示屏的伸缩自适应地调整应用布局。The embodiments of the present application provide a display control method, device, storage medium, and electronic equipment, which can adaptively adjust the application layout along with the expansion and contraction of the display screen.
第一方面,本申请实施例提供一种显示控制方法,所述方法应用于包含有可伸缩的柔性显示屏的电子设备,所述方法包括:In a first aspect, an embodiment of the present application provides a display control method, which is applied to an electronic device including a retractable flexible display screen, and the method includes:
在所述柔性显示屏进行伸缩的过程中,检测伸缩长度并根据所述伸缩长度确定屏幕有效显示尺寸;During the expansion and contraction of the flexible display screen, detecting the expansion length and determining the effective display size of the screen according to the expansion length;
确定前台运行的应用程序,并按照所述有效显示尺寸调整窗口管理服务中所述应用程序的窗口尺寸参数;Determine the application program running in the foreground, and adjust the window size parameters of the application program in the window management service according to the effective display size;
按照调整后的所述窗口尺寸参数,对所述应用程序的窗口进行重新布局;Re-layout the windows of the application program according to the adjusted window size parameters;
根据重新布局后的窗口,在屏幕上重新绘制和显示所述应用程序的显示界面。According to the re-layout window, the display interface of the application program is redrawn and displayed on the screen.
第二方面,本申请实施例还提供一种显示控制装置,所述装置应用于包含有可伸缩的柔性显示屏的电子设备,所述装置包括:In a second aspect, an embodiment of the present application also provides a display control device, which is applied to an electronic device including a retractable flexible display screen, and the device includes:
伸缩检测模块,用于在所述柔性显示屏进行伸缩的过程中,检测伸缩长度并根据所述伸缩长度确定屏幕有效显示尺寸;The telescopic detection module is configured to detect the telescopic length during the telescopic process of the flexible display screen and determine the effective display size of the screen according to the telescopic length;
参数调整模块,用于确定前台运行的应用程序,并按照所述有效显示尺寸调整窗口管理服务中所述应用程序的窗口尺寸参数;The parameter adjustment module is used to determine the application program running in the foreground, and adjust the window size parameter of the application program in the window management service according to the effective display size;
窗口布局模块,用于按照调整后的所述窗口尺寸参数,对所述应用程序的窗口进行重新布局;A window layout module, configured to rearrange the windows of the application program according to the adjusted window size parameters;
界面绘制模块,用于根据重新布局后的窗口,在屏幕上重新绘制和显示所述应用程序的显示界面。The interface drawing module is used to redraw and display the display interface of the application program on the screen according to the re-layout window.
第三方面,本申请实施例还提供一种存储介质,其上存储有计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行:In a third aspect, an embodiment of the present application also provides a storage medium on which a computer program is stored, and when the computer program runs on a computer, the computer is caused to execute:
在柔性显示屏进行伸缩的过程中,检测伸缩长度并根据所述伸缩长度确定屏幕有效显示尺寸;During the expansion and contraction of the flexible display screen, detecting the expansion length and determining the effective display size of the screen according to the expansion length;
确定前台运行的应用程序,并按照所述有效显示尺寸调整窗口管理服务中所述应用程序的窗口尺寸参数;Determine the application program running in the foreground, and adjust the window size parameters of the application program in the window management service according to the effective display size;
按照调整后的所述窗口尺寸参数,对所述应用程序的窗口进行重新布局;Re-layout the windows of the application program according to the adjusted window size parameters;
根据重新布局后的窗口,在屏幕上重新绘制和显示所述应用程序的显示界面。。According to the re-layout window, the display interface of the application program is redrawn and displayed on the screen. .
第四方面,本申请实施例还提供一种电子设备,包括处理器和存储器,所述存储器有计算机程序,所述处理器通过调用所述计算机程序,用于执行:In a fourth aspect, an embodiment of the present application also provides an electronic device, including a processor and a memory, the memory has a computer program, and the processor is configured to execute:
在柔性显示屏进行伸缩的过程中,检测伸缩长度并根据所述伸缩长度确定屏幕有效显示尺寸;During the expansion and contraction of the flexible display screen, detecting the expansion length and determining the effective display size of the screen according to the expansion length;
确定前台运行的应用程序,并按照所述有效显示尺寸调整窗口管理服务中所述应用程序的窗口尺寸参数;Determine the application program running in the foreground, and adjust the window size parameters of the application program in the window management service according to the effective display size;
按照调整后的所述窗口尺寸参数,对所述应用程序的窗口进行重新布局;Re-layout the windows of the application program according to the adjusted window size parameters;
根据重新布局后的窗口,在屏幕上重新绘制和显示所述应用程序的显示界面。According to the re-layout window, the display interface of the application program is redrawn and displayed on the screen.
附图说明Description of the drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly describe the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings that need to be used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
图1是本申请实施方式的电子设备的结构示意图;FIG. 1 is a schematic diagram of the structure of an electronic device according to an embodiment of the present application;
图2是本申请实施方式的电子设备的另一结构示意图;FIG. 2 is another schematic diagram of the structure of the electronic device according to the embodiment of the present application;
图3是本申请实施方式的电子设备的立体分解示意图;FIG. 3 is a three-dimensional exploded schematic diagram of an electronic device according to an embodiment of the present application;
图4是图1中的电子设备沿V1-V1的剖视图;Figure 4 is a cross-sectional view of the electronic device in Figure 1 along V1-V1;
图5是图2中的电子设备沿V2-V2的剖视图;Figure 5 is a cross-sectional view of the electronic device in Figure 2 along V2-V2;
图6为本申请实施例提供的显示控制方法的应用场景示意图;FIG. 6 is a schematic diagram of an application scenario of a display control method provided by an embodiment of the application;
图7为本申请实施例提供的显示控制方法中某应用程序的一个窗口示意图;FIG. 7 is a schematic diagram of a window of an application program in the display control method provided by an embodiment of the application; FIG.
图8为本申请实施例提供的显示控制方法中窗口布局的一示意图;FIG. 8 is a schematic diagram of the window layout in the display control method provided by the embodiment of the application; FIG.
图9为本申请实施例提供的显示控制方法中窗口布局的另一示意图;FIG. 9 is another schematic diagram of the window layout in the display control method provided by the embodiment of the application; FIG.
图10为本申请实施例提供的显示控制方法中窗口布局的又一示意图;FIG. 10 is another schematic diagram of the window layout in the display control method provided by the embodiment of the application; FIG.
图11为本申请实施例提供的显示控制方法中窗口布局的又一示意图;FIG. 11 is another schematic diagram of the window layout in the display control method provided by the embodiment of the application; FIG.
图12为本申请实施例提供的显示控制方法中窗口布局的又一示意图;FIG. 12 is another schematic diagram of the window layout in the display control method provided by the embodiment of the application; FIG.
图13为本申请实施例提供的显示控制装置的结构示意图;FIG. 13 is a schematic structural diagram of a display control device provided by an embodiment of the application;
图14为本申请实施例提供的电子设备的又一结构示意图;FIG. 14 is a schematic diagram of another structure of an electronic device provided by an embodiment of the application;
图15为本申请实施例提供的电子设备的又一结构示意图。FIG. 15 is a schematic diagram of another structure of an electronic device provided by an embodiment of the application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有付出创造性劳动前提下所获得的所有其他实施例,都属于本申请的保护范围。The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative work shall fall within the protection scope of this application.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。The reference to "embodiments" herein means that a specific feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art clearly and implicitly understand that the embodiments described herein can be combined with other embodiments.
本申请实施例提供一种显示控制方法,该显示控制方法的执行主体可以是本申请实施例提供的显示控制装置,或者集成了该显示控制装置的电子设备,其中该显示控制装置可以采用硬件或者软件的方式实现。The embodiment of the present application provides a display control method. The execution subject of the display control method may be the display control device provided in the embodiment of the present application, or an electronic device integrated with the display control device, wherein the display control device may use hardware or Realized by software.
本申请实施例提供一种显示控制方法,所述方法应用于包含有可伸缩的柔性显示屏的电子设备,所述方法包括:The embodiment of the present application provides a display control method, the method is applied to an electronic device including a retractable flexible display screen, and the method includes:
在所述柔性显示屏进行伸缩的过程中,检测伸缩长度并根据所述伸缩长度确定屏幕有效显示尺寸;During the expansion and contraction of the flexible display screen, detecting the expansion length and determining the effective display size of the screen according to the expansion length;
确定前台运行的应用程序,并按照所述有效显示尺寸调整窗口管理服务中所述应用程序的窗口尺寸参数;Determine the application program running in the foreground, and adjust the window size parameters of the application program in the window management service according to the effective display size;
按照调整后的所述窗口尺寸参数,对所述应用程序的窗口进行重新布局;Re-layout the windows of the application program according to the adjusted window size parameters;
根据重新布局后的窗口,在屏幕上重新绘制和显示所述应用程序的显示界面。According to the re-layout window, the display interface of the application program is redrawn and displayed on the screen.
在一些实施例中,所述确定前台运行的应用程序,并按照所述有效显示尺寸调整窗口管理服务中所述应用程序的窗口尺寸参数,包括:In some embodiments, the determining the application program running in the foreground and adjusting the window size parameter of the application program in the window management service according to the effective display size includes:
确定前台运行的应用程序;Determine the applications running in the foreground;
根据窗口管理服务确定所述应用程序对应的窗口状态数据;Determining the window state data corresponding to the application program according to the window management service;
将所述窗口状态数据中与屏幕显示尺寸的相关变量修改为与所述有效显示尺寸一致。Modify the variables related to the screen display size in the window state data to be consistent with the effective display size.
在一些实施例中,所述按照调整后的所述窗口尺寸参数,对所述应用程序的窗口进行重新布局,包括:In some embodiments, the re-layout of the windows of the application program according to the adjusted window size parameters includes:
按照调整后的所述窗口尺寸参数,调整所述应用程序的根视图的显示尺寸;Adjust the display size of the root view of the application according to the adjusted window size parameter;
根据调整后的根视图的显示尺寸,以及所述窗口中各显示元素的布局属性,对所述应用程序的窗口中各显示元素进行重新布局。According to the adjusted display size of the root view and the layout attributes of the display elements in the window, the display elements in the window of the application are re-layout.
在一些实施例中,所述对所述应用程序的窗口中各显示元素进行重新布局之后,还包括:In some embodiments, after the re-layout of the display elements in the window of the application program, the method further includes:
当重新布局后的显示元素中的内容显示区域发生变化时,获取所述内容显示区域对应的显示内容,并将所述显示内容加载在对应的显示元素中。When the content display area of the re-layout display element changes, the display content corresponding to the content display area is acquired, and the display content is loaded in the corresponding display element.
在一些实施例中,所述电子设备包括位置检测传感器;所述检测伸缩长度并根据所述伸缩长度确定屏幕有效显示尺寸,包括:In some embodiments, the electronic device includes a position detection sensor; the detecting the telescopic length and determining the effective display size of the screen according to the telescopic length includes:
根据所述位置传感器检测所述柔性显示屏的伸缩方向和伸缩长度;Detecting the telescopic direction and the telescopic length of the flexible display screen according to the position sensor;
获取记录的历史显示尺寸,根据所述伸缩长度、所述伸缩方向,以及所述历史显示尺寸,计算得到伸缩后的有效显示尺寸;Acquiring the recorded historical display size, and calculating the effective display size after expansion and contraction according to the telescopic length, the telescopic direction, and the historical display size;
根据所述有效显示尺寸更新记录的历史显示寸尺。Update the recorded historical display size according to the effective display size.
在一些实施例中,所述柔性显示屏包括卷轴,所述位置检测传感器为与所述卷轴连接的角速度传感器;所述根据所述位置传感器检测所述柔性显示屏的伸缩方向和伸缩长度,包括:In some embodiments, the flexible display screen includes a reel, and the position detection sensor is an angular velocity sensor connected with the reel; the detection of the telescopic direction and the telescopic length of the flexible display screen according to the position sensor includes :
根据所述角速度传感器检测所述卷轴的旋转角度和旋转方向;Detecting the rotation angle and the rotation direction of the reel according to the angular velocity sensor;
根据所述旋转角度计算所述柔性显示屏的伸缩长度,并根据所述旋转方向确定所述柔性显示屏的伸缩方向。The expansion and contraction length of the flexible display screen is calculated according to the rotation angle, and the expansion and contraction direction of the flexible display screen is determined according to the rotation direction.
在一些实施例中,所述检测伸缩长度并根据所述伸缩长度确定屏幕有效显示尺寸之后,还包括:In some embodiments, after detecting the telescopic length and determining the effective display size of the screen according to the telescopic length, the method further includes:
判断所述有效显示尺寸与所述历史显示尺寸的差值是否位于预设范围内;Determine whether the difference between the effective display size and the historical display size is within a preset range;
若否,则执行确定前台运行的应用程序,并按照所述有效显示尺寸调整窗口管理服务中所述应用程序的窗口尺寸参数。If not, execute to determine the application program running in the foreground, and adjust the window size parameter of the application program in the window management service according to the effective display size.
本申请实施例提供一种显示控制方法,该方法应用于包含有可伸缩的柔性显示屏的电子设备。请参阅图1,图1为本申请实施例提供的电子设备的第一种结构示意图。其中,电子设备可以是智能手机、平板电脑、掌上电脑、笔记本电脑、或者台式电脑等设备。在图1的示例中,该电子设备具有柔性显示屏,该柔性显示屏的一端设置在卷轴上,使得部分柔性显示屏可以卷绕在卷轴,卷轴可用于卷收柔性显示屏和释放柔性显示屏,从而扩展柔性显示屏组件的显示部分。柔性显示屏可以沿着垂直于卷轴的方向进行伸展或者缩回。例如,请参阅图2,图2为本申请实施例提供的电子设备的第二种结构示意图。图2中所示的电子设备,其柔性显示屏处于伸展状态。用户在需要使用大屏幕时可以扩展柔性显示屏的显示部分以提高用户的操作体验,同时,在不需要使用大屏幕时,可以不对显示部分进行扩展,从而使得整机尺寸较小,方便携带。The embodiment of the present application provides a display control method, which is applied to an electronic device including a retractable flexible display screen. Please refer to FIG. 1. FIG. 1 is a schematic diagram of a first structure of an electronic device provided by an embodiment of this application. Among them, the electronic device can be a smart phone, a tablet computer, a palmtop computer, a notebook computer, or a desktop computer and other devices. In the example of FIG. 1, the electronic device has a flexible display screen, one end of the flexible display screen is set on a reel, so that part of the flexible display screen can be wound on the reel, and the reel can be used to wind the flexible display screen and release the flexible display screen , Thereby expanding the display part of the flexible display assembly. The flexible display screen can be stretched or retracted in a direction perpendicular to the reel. For example, please refer to FIG. 2, which is a schematic diagram of a second structure of an electronic device provided by an embodiment of this application. The electronic device shown in Fig. 2 has a flexible display screen in a stretched state. When a user needs a large screen, the display part of the flexible display screen can be expanded to improve the user's operating experience. At the same time, when the large screen is not needed, the display part may not be expanded, thereby making the whole machine smaller in size and convenient to carry.
需要说明的是,上述图示1的柔性显示屏的伸缩方向仅为举例说明,在其他实施例中,柔性显示屏也可以设置为沿着用户竖直握持设备时的竖直方向伸缩。It should be noted that the expansion and contraction direction of the flexible display screen shown in Figure 1 is only an example. In other embodiments, the flexible display screen may also be set to expand and contract along the vertical direction when the user holds the device vertically.
当电子设备的显示屏处于显示状态时,如果对柔性显示屏进行了拉伸或者缩回操作,则按照本申请实施例提供的显示控制方法对显示界面进行重新布局和绘制,以使显示界面能够适应伸缩后的屏幕。例如,在柔性显示屏进行伸缩的过程中,检测伸缩长度并根据伸缩长度确定屏幕有效显示尺寸;确定前台运行的应用程序,并按照有效显示尺寸调整窗口管理服务中应用程序的窗口尺寸参数;按照调整后的窗口尺寸参数,对应用程序的窗口进 行重新布局;根据重新布局后的窗口,在屏幕上重新绘制和显示应用程序的显示界面。通过这种方式,随着柔性显示屏的伸缩,不断地对窗口尺寸参数进行调整,以使运行在前台的应用程序能够适应性地、动态地调整显示界面的布局,以适应伸缩后的显示区域。When the display screen of the electronic device is in the display state, if the flexible display screen is stretched or retracted, the display interface is re-layouted and drawn according to the display control method provided in the embodiment of the present application, so that the display interface can be Adapt to the expanded screen. For example, during the expansion and contraction process of the flexible display screen, the expansion length is detected and the effective display size of the screen is determined according to the expansion length; the application running in the foreground is determined, and the window size parameters of the application in the window management service are adjusted according to the effective display size; The adjusted window size parameters re-layout the windows of the application program; according to the re-layout window, the display interface of the application program is redrawn and displayed on the screen. In this way, with the expansion and contraction of the flexible display screen, the window size parameters are continuously adjusted, so that applications running in the foreground can adaptively and dynamically adjust the layout of the display interface to adapt to the expanded display area. .
请结合图1至图3,本实施方式的电子设备100包括壳体组件10、柔性显示屏30、带动件50及驱动机构70。Referring to FIGS. 1 to 3, the electronic device 100 of this embodiment includes a housing assembly 10, a flexible display 30, a driving member 50 and a driving mechanism 70.
壳体组件10为中空结构;带动件50、驱动机构70以及摄像头60等组件均可设置在壳体组件10。可以理解的是,本申请实施方式的电子设备100包括但不限于手机、平板电脑等移动终端或者其它便携式电子设备,在本文中,以电子设备100为手机为例进行说明。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 electronic device 100 in the embodiment of the present application includes but is not limited to mobile terminals such as mobile phones and tablet computers or other portable electronic devices. In this document, the electronic device 100 is a mobile phone as an example for description.
在本实施方式中,壳体组件10包括第一壳体12和第二壳体14,第一壳体12和第二壳体14能够相对运动。具体的,在本实施方式中,第一壳体12和第二壳体14滑动连接,也即是说,第二壳体14能够相对第一壳体12滑动。In this embodiment, 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. Specifically, in this embodiment, 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。Specifically, 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内,以使部分柔性显示屏隐藏于容置空间16内,隐藏于容置空间16内的部分柔性显示屏30可不点亮。第一壳体12和第二壳体14相对远离时,可通过带动件50带动柔性显示屏30展开,以使得更多的柔性显示屏30暴露于容置空间16外。点亮柔性显示屏30暴露于容置空间16外部的部分,以使得电子设备100所呈现的显示区域变大。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 accommodating space 16. In this way, part of the flexible display screen 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. When the first housing 12 and the second housing 14 are relatively far apart, the driving member 50 can be used to drive the flexible display screen 30 to unfold, so that more flexible display screens 30 are exposed outside the accommodating space 16. The portion of 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 electronic device 100 becomes larger.
带动件50具体可为外部带有齿52的转轴结构,柔性显示屏30通过啮合等方式与带动件50相联动,第一壳体12和第二壳体14相对远离时,通过带动件50带动啮合于带动件50上的部分柔性显示屏30移动并展开。The driving member 50 may specifically be a rotating shaft structure with teeth 52 on the outside. The flexible display screen 30 is linked with the driving member 50 by means of engagement or the like. When the first housing 12 and the second housing 14 are relatively far away, the driving member 50 is driven The part of the flexible display screen 30 engaged on the driving member 50 moves and unfolds.
可以理解,带动件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 is wound (wound) on the part of the driving member 50. The flexible display screen 30 is stretched so that more flexible display screens are exposed outside the accommodating space 16 and are in a flat state. Specifically, 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 electronic device 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 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 this embodiment, the driving mechanism 70 can be arranged in the accommodating space 16, the driving mechanism 70 can be linked with the second housing 14, and the driving mechanism 70 is used to drive the second housing 14 to be relative to the first housing 12. The separation movement drives 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,图6为本申请实施例提供的显示控制方法的第一种流程示意图。本申请实施例提供的显示控制方法的具体流程可以如下:Please refer to FIG. 6, which is a schematic flowchart of the first display control method provided by an embodiment of the application. The specific process of the display control method provided by the embodiment of the present application may be as follows:
在101中,在柔性显示屏进行伸缩的过程中,检测伸缩长度并根据伸缩长度确定屏幕有效显示尺寸。In 101, during the expansion and contraction of the flexible display screen, the expansion length is detected and the effective display size of the screen is determined according to the expansion length.
本申请实施例中,电子设备的操作系统可以是安卓操作系统或者ios操作系统等,本申请对于电子设备的操作系统不作具体限制,无论对于哪一种操作,其都有对应的窗口管理服务用于管理窗口显示。接下来为了便于读者理解本申请方案的实施方式,以安卓操作系统为例进行说明。In the embodiments of this application, the operating system of the electronic device may be an Android operating system or an ios operating system, etc. This application does not impose specific restrictions on the operating system of the electronic device. Regardless of which operation, it has a corresponding window management service. It is displayed in the management window. In the following, in order to facilitate readers to understand the implementation of the solution of the present application, the Android operating system is taken as an example for description.
将安卓系统分为四层,从上至下分别为应用程序层、应用程序框架层、系统运行库层和内核层。其中,内核层为电子设备的各种硬件提供底层驱动,比如如显示,音频,照相机,蓝牙,WI-FI,电源管理等等。系统运行库层包括系统库和运行时,主要通过一些c/c++库来为安卓系统提供特性支持。应用程序框架层主要提供了构建应用程序时可能用到的各种API(Application Programming Interface,应用程序接口),下文中涉及到的活动管理服务(ActivityManagerService)和窗口管理服务(WindowManagerService)均由应用程序框架层提供。所有安装在电子设备上的应用程序都在应用程序层,包括手机自带的应用程序以及用户自行安卓的应用程序,例如微信、游戏等。The Android system is divided into four layers, from top to bottom, they are the application layer, the application framework layer, the system runtime layer, and the kernel layer. Among them, the kernel layer provides low-level drivers for various hardware of electronic devices, such as display, audio, camera, Bluetooth, WI-FI, power management, and so on. The system runtime library layer includes the system library and runtime, and mainly provides feature support for the Android system through some c/c++ libraries. The application framework layer mainly provides various APIs (Application Programming Interface) that may be used when building applications. The activity management service (ActivityManagerService) and window management service (WindowManagerService) involved in the following are all provided by the application The framework layer is provided. All applications installed on electronic devices are in the application layer, including the applications that come with the mobile phone and the user's own Android applications, such as WeChat, games, etc.
对于安卓系统来说,窗口(Window)是一个抽象概念,它用于绘制用户界面,以及响应用户的输入事件。从应用程序框架层的角度来看,安卓系统的界面是一个或者多个窗口构成的,这些窗口均由窗口管理服务来管理。For the Android system, Window is an abstract concept, which is used to draw user interfaces and respond to user input events. From the perspective of the application framework layer, the interface of the Android system is composed of one or more windows, and these windows are managed by the window management service.
需要说明的是,下文中涉及到的窗口既包括应用窗口,比如微信的对话框、浏览器搜索界面等等,也包括一些系统级别的窗口,比如最近运行对话框、关机对话框、状态栏下拉栏、锁屏界面等。It should be noted that the windows involved in the following include both application windows, such as WeChat dialogs, browser search interfaces, etc., as well as some system-level windows, such as recently run dialogs, shutdown dialogs, and status bar drop-downs. Bar, lock screen interface, etc.
此外,在安卓系统中,Activity(活动)是一个应用程序组件,该组件提供一个用户可以用来交互的界面。一个Activity对应一个应用程序窗口,它上面可以显示一些界面元素,如控件等,并且可以监听用户的处理事件。一个应用程序可以有多个Activity。下文中的应用程序的界面对应的活动可以理解为该界面对应的Activity。比如,微信的对话界面对应的活动可以理解为微信这一应用程序中的对话界面对应的Activity。Activity的生命周期由安卓系统中的活动管理服务(ActivityManagerService)来管理,在一个Activity的生命周期中,可以有以下状态:running:当前显示在屏幕上的activity(位于任务栈的顶部),用户可见;Poused:依旧是用户可见,但是已经失去界面焦点,此Activity无法与用户进行交互;Stopped:用户看不到当前界面,也无法与用户进行交互完全被覆盖;Killed:该界面被销毁。In addition, in the Android system, Activity is an application component that provides an interface that users can interact with. An Activity corresponds to an application window, which can display some interface elements, such as controls, etc., and can listen to user processing events. An application can have multiple activities. The activity corresponding to the interface of the application program below can be understood as the Activity corresponding to the interface. For example, the activity corresponding to the dialogue interface of WeChat can be understood as the activity corresponding to the dialogue interface in the application of WeChat. The life cycle of Activity is managed by the activity management service (ActivityManagerService) in the Android system. In the life cycle of an Activity, it can have the following states: running: the activity currently displayed on the screen (located at the top of the task stack), visible to the user ; Poused: It is still visible to the user, but the interface focus has been lost. This Activity cannot interact with the user; Stopped: The user cannot see the current interface and cannot interact with the user. It is completely covered; Killed: The interface is destroyed.
基于上述安卓架构以及安卓系统提供给的窗口管理服务,接下来对本申请实施例的方案进行说明。相关技术方案中,在显示屏高度或者宽度等参数发生变化时,显示屏的物理尺寸和分辨率都发生了变化,主流技术一般通过从应用程序本身去适配这种变化,这就需要软件工程师花费大量的时间和精力在应用布局适配上。终端产品中的每个应用都需要适配,工作量非常大。Based on the above-mentioned Android architecture and the window management service provided by the Android system, the solution of the embodiment of the present application will be described next. In related technical solutions, when parameters such as the height or width of the display screen change, the physical size and resolution of the display screen change. The mainstream technology generally adapts to this change from the application itself, which requires software engineers. Spend a lot of time and effort on application layout adaptation. Each application in the terminal product needs to be adapted, and the workload is very large.
本申请无需对应用程序本身去适配开发,而是从系统框架层,基于窗口管理服务去对窗口的显示进行优化,以随着柔性显示屏的伸缩,使得应用程序能够适应性地调整显示界面的布局,实现应用程序的显示界面能够适配伸缩后的柔性显示屏。This application does not need to adapt and develop the application itself, but optimizes the display of the window from the system framework layer based on the window management service, so that the application can adapt the display interface as the flexible display screen expands and contracts. The layout of the application program can be adapted to the flexible display screen after expansion.
当柔性显示屏发生伸缩时,屏幕的大小会发生改变,即显示屏的显示区域的大小会发生相应的变化。因此,一旦检测到柔性显示屏开始执行伸缩操作,则对该伸缩操作进行实时监测,并获取伸缩长度,根据伸缩长度来确定屏幕的有效显示尺寸。以柔性显示屏执行伸展操作为例,若柔性显示屏执行伸展操作,则屏幕变大,需要对应增大当前显示在前台的应用程序的窗口以及适应性的调整窗口中的各显示元素。When the flexible display screen is stretched, the size of the screen will change, that is, the size of the display area of the display screen will change accordingly. Therefore, once it is detected that the flexible display screen starts to perform a telescopic operation, the telescopic operation is monitored in real time, the telescopic length is obtained, and the effective display size of the screen is determined according to the telescopic length. Taking the stretch operation performed by the flexible display screen as an example, if the flexible display screen performs the stretch operation, the screen becomes larger, and the window of the application currently displayed in the foreground and the display elements in the adaptive adjustment window need to be enlarged accordingly.
为了实现在显示屏的伸缩过程中,屏幕的显示内容能够实时地跟着屏幕进行适应性变化,需要随着柔性屏的伸展或者缩回,不断地去布局和绘制界面。因此,可以在检测到伸缩长度为一个有效伸缩长度时,才执行101中的根据伸缩长度确定屏幕有效显示尺寸。其中,有效伸缩长度为人眼可以感知屏幕长度或宽度的变化的一个阈值,该阈值可以为一个经验值。当伸缩长度小于该阈值时,人眼可能感觉不到屏幕长度或宽度的变化,而当伸缩长度大于或等于该阈值时,人眼能够感觉到屏幕长度或宽度的变化,为了实现在显示屏的伸缩过程中,屏幕的显示内容能够实时地跟着屏幕进行适应性变化,则需要适应性的调整显示的窗口。In order to realize that the display content of the screen can adapt to the screen in real time during the expansion and contraction process of the display screen, it is necessary to continuously lay out and draw the interface as the flexible screen is extended or retracted. Therefore, when it is detected that the telescopic length is an effective telescopic length, the determination of the effective display size of the screen according to the telescopic length in 101 is executed. Wherein, the effective stretch length is a threshold value at which human eyes can perceive the change in the length or width of the screen, and the threshold value may be an empirical value. When the telescopic length is less than the threshold, the human eye may not feel the change in the length or width of the screen. When the telescopic length is greater than or equal to the threshold, the human eye can feel the change in the length or width of the screen. During the expansion and contraction process, the display content of the screen can be adapted to change with the screen in real time, and the displayed window needs to be adjusted adaptively.
或者,在另一实施例中,检测伸缩长度并根据伸缩长度确定屏幕有效显示尺寸之后,还包括:判断有效显示尺寸与历史显示尺寸的差值是否位于预设范围内;若否,则执行102。Or, in another embodiment, after detecting the telescopic length and determining the effective display size of the screen according to the telescopic length, the method further includes: determining whether the difference between the effective display size and the historical display size is within a preset range; if not, execute 102 .
该实施例中,每调整一次窗口布局,则将本次的有效显示尺寸记录为历史显示尺寸。当下次再调整布局时,根据有效显示尺寸与历史显示尺寸之间的差值是否大于预设范围,如果是,则认为人眼能够感觉到屏幕长度或宽度的变化,为了实现在显示屏的伸缩过程中,屏幕的显示内容能够实时地跟着屏幕进行适应性变化,则需要适应性的调整显示的窗口。In this embodiment, every time the window layout is adjusted, the current effective display size is recorded as the historical display size. When the layout is adjusted next time, according to whether the difference between the effective display size and the historical display size is greater than the preset range, if it is, it is considered that the human eye can perceive the change in the length or width of the screen, in order to achieve the expansion and contraction of the display screen. In the process, the display content of the screen can be adapted to change with the screen in real time, and the displayed window needs to be adjusted adaptively.
例如,用户在控制屏幕沿长度方向由1080个像素点伸展为1280个像素点的过程中,每检测到伸展4个像素点,则进行一次重新布局和绘制,以使在整个伸缩操作的过程中,前台的应用程序的窗口布局也是随之动态变化的,对应用户来说,能够直观的看到屏幕的长度在随着显示屏的伸展而变长。For example, when the user controls the screen to stretch from 1080 pixels to 1280 pixels along the length direction, every time 4 pixels are detected to stretch, the layout and drawing are performed once, so that during the entire stretch operation , The window layout of the foreground application also changes dynamically, corresponding to the user, you can intuitively see that the length of the screen is getting longer as the display screen stretches.
其中,有效显示尺寸为显示屏在伸缩方向的长度。例如,如果柔性显示屏的伸缩方向为如图2所示的横向伸缩,则有效显示尺寸为屏幕的宽度,如果柔性显示屏沿竖直方向伸缩,则有效显示尺寸为屏幕的长度。并且,伸缩长度可以为正值,也可以为负值。当柔性显示屏向内缩回时,伸缩长度为负值,当柔性显示屏向外伸展时,伸缩长度为正值。Among them, the effective display size is the length of the display screen in the telescopic direction. For example, if the expansion and contraction direction of the flexible display screen is horizontal expansion and contraction as shown in FIG. 2, the effective display size is the width of the screen, and if the flexible display screen is expansion and contraction in the vertical direction, the effective display size is the length of the screen. In addition, the stretch length can be a positive value or a negative value. When the flexible display screen is retracted inward, the expansion length is a negative value, and when the flexible display screen is extended outward, the expansion length is a positive value.
其中,关于伸缩长度的检测以及有效显示尺寸的计算,可以有多种实现方式。例如,在一实施例中,电子设备设置有位置传感器,根据位置传感器检测柔性显示屏的伸缩方向和伸缩长度;获取记录的历史显示尺寸,根据伸缩长度、伸缩方向,以及历史显示尺寸,计算得到伸缩后的有效显示尺寸;根据有效显示尺寸更新记录的历史显示寸尺。Among them, the detection of the expansion length and the calculation of the effective display size can be implemented in multiple ways. For example, in one embodiment, the electronic device is provided with a position sensor, which detects the expansion and contraction direction and length of the flexible display screen according to the position sensor; obtains the recorded historical display size, and calculates it according to the expansion length, the expansion direction, and the historical display size. The effective display size after expansion and contraction; the historical display size of the record is updated according to the effective display size.
比如,位置传感器为角速度传感器,柔性显示屏卷轴和角速度传感器相连,通过外力使柔性显示屏进行卷动,进行伸缩。根据角速度传感器检测卷轴的旋转角度和旋转方向;根据旋转角度计算柔性显示屏的伸缩长度,并根据旋转方向确定柔性显示屏的伸缩方向。For example, the position sensor is an angular velocity sensor, and the flexible display screen reel is connected with the angular velocity sensor, and the flexible display screen is scrolled and stretched by external force. The angular velocity sensor detects the rotation angle and rotation direction of the reel; calculates the telescopic length of the flexible display screen according to the rotation angle, and determines the telescopic direction of the flexible display screen according to the rotation direction.
该实施例中,每调整一次窗口布局,则将本次的有效显示尺寸记录为历史显示尺寸。当下次再调整布局时,根据历史显示尺寸、伸缩长度、伸缩方向,来计算有效显示尺寸。其中,在柔性显示屏的卷动过程中,角速度传感器会记录柔性显示屏卷动的圈数及其旋转的度数,根据柔性显示屏卷轴已知的直径。基于公式S=N*π*D/360,可以计算出伸缩长度。N为柔性显示屏的旋转的角度,如旋转度数为390°,则表示卷轴旋转了1圈后,又旋转了30°。D为卷轴的直径,S为伸缩长度。角速度传感器可以识别出卷轴的旋转方向,例如是顺时针转动,还是逆时针转动,因此,可以得知柔性显示屏的伸缩方向。在确定出伸缩长度后,根据柔性显示屏伸缩前的历史显示尺寸和伸缩长度计算得到伸缩后的有效显示尺寸。其中,伸缩长度的单位可以用英寸或者像素来表示。In this embodiment, every time the window layout is adjusted, the current effective display size is recorded as the historical display size. When the layout is adjusted next time, the effective display size is calculated according to the historical display size, expansion length, and expansion direction. Among them, during the scrolling process of the flexible display screen, the angular velocity sensor will record the number of turns of the flexible display screen and the degree of rotation, according to the known diameter of the flexible display screen reel. Based on the formula S=N*π*D/360, the expansion and contraction length can be calculated. N is the angle of rotation of the flexible display. If the degree of rotation is 390°, it means that the reel has rotated 30° after one revolution. D is the diameter of the reel, and S is the telescopic length. The angular velocity sensor can identify the direction of rotation of the reel, for example, whether it is rotating clockwise or counterclockwise, so that the direction of expansion and contraction of the flexible display screen can be known. After determining the expansion and contraction length, the effective display size after expansion and contraction is calculated according to the historical display size and the expansion length before the expansion and contraction of the flexible display screen. Among them, the unit of telescopic length can be expressed in inches or pixels.
或者,在另一实施例中,电子设备设置有光感检测器,并且在柔性显示屏的可卷动部分设置标识,光感检测器通过识别这些标识,确定柔性显示屏的伸缩长度。Or, in another embodiment, the electronic device is provided with a light-sensitive detector, and marks are arranged on the scrollable part of the flexible display screen, and the light-sensitive detector determines the telescopic length of the flexible display screen by identifying these marks.
在102中,确定前台运行的应用程序,并按照有效显示尺寸调整窗口管理服务中应用程序的窗口尺寸参数。In 102, the application program running in the foreground is determined, and the window size parameter of the application program in the window management service is adjusted according to the effective display size.
对于运行中的应用程序来说,在窗口管理服务中都有该应用程序的窗口状态数据(windowstate),该窗口状态数据表示一个窗口的所有属性,包括窗口尺寸参数,例如,窗口的长和宽等。For a running application, the window state data (windowstate) of the application is available in the window management service. The window state data represents all the properties of a window, including window size parameters, such as the length and width of the window. Wait.
例如,在一实施例中,确定前台运行的应用程序,并按照有效显示尺寸调整窗口管理服务中应用程序的窗口尺寸参数,包括:确定前台运行的应用程序;根据窗口管理服务确定应用程序对应的窗口状态数据;将窗口状态数据中与屏幕显示尺寸的相关变量修改为与有效显示尺寸一致。For example, in one embodiment, determining the application program running in the foreground and adjusting the window size parameters of the application program in the window management service according to the effective display size includes: determining the application program running in the foreground; determining the corresponding application program according to the window management service Window status data; the variables related to the screen display size in the window status data are modified to be consistent with the effective display size.
本申请实施例中,窗口采用相对布局(RelativeLayout)规则,即不使用固定的长度来表示布局的高度或长度,而是采用如match_parent、wrap_content等属性来表示具体显示元素的高度或长度。match_parent表示与其父节点大小一致,wrap_content表示和自身内容一样的长度。比如,将一个应用程序的布局文件的根节点的高度定义为match_parent,则该应用的根视图的高度为系统的屏幕的高度。In the embodiments of the present application, the window adopts a relative layout (RelativeLayout) rule, that is, a fixed length is not used to represent the height or length of the layout, but attributes such as match_parent and wrap_content are used to represent the height or length of a specific display element. match_parent represents the same size as its parent node, and wrap_content represents the same length as its own content. For example, if the height of the root node of an application's layout file is defined as match_parent, the height of the root view of the application is the height of the system's screen.
系统框架层根据有效显示尺寸调整窗口管理服务中该应用程序的窗口尺寸参数,不需要应用自身去调整。比如,在柔性显示屏进行伸缩操作前,窗口管理服务中该应用程序的 窗口尺寸参数parent=[0,0],[720,1320]。其中,70为屏幕的宽度,1320为屏幕的长度。如果柔性显示屏沿长度方向上伸长了10个像素点的长度。则将窗口状态数据中与屏幕显示尺寸的相关变量修改为与有效显示尺寸一致,例如,将parent参数修改为parent=[0,0],[720,1330]。The system framework layer adjusts the window size parameters of the application in the window management service according to the effective display size, and does not need to be adjusted by the application itself. For example, before the flexible display screen performs the telescopic operation, the window size parameter parent=[0,0],[720,1320] of the application in the window management service. Among them, 70 is the width of the screen, and 1320 is the length of the screen. If the flexible display is extended by 10 pixels in the length direction. Modify the variables related to the screen display size in the window state data to be consistent with the effective display size, for example, modify the parent parameter to parent=[0,0],[720,1330].
在103中,按照调整后的窗口尺寸参数,对应用程序的窗口进行重新布局。In 103, according to the adjusted window size parameter, the windows of the application program are re-layout.
在104中,根据重新布局后的窗口,在屏幕上重新绘制和显示应用程序的显示界面。In 104, the display interface of the application program is redrawn and displayed on the screen according to the re-layout of the window.
其中,在一实施例中,按照调整后的窗口尺寸参数,对应用程序的窗口进行重新布局,包括:按照调整后的窗口尺寸参数,调整应用程序的根视图的显示尺寸;根据调整后的根视图的显示尺寸,以及窗口中各显示元素的布局属性,对应用程序的窗口中各显示元素进行重新布局。Wherein, in one embodiment, the re-layout of the windows of the application program according to the adjusted window size parameters includes: adjusting the display size of the root view of the application program according to the adjusted window size parameters; The display size of the view and the layout attributes of the display elements in the window re-layout the display elements in the application window.
系统框架层在调整管理服务中该应用程序的窗口尺寸参数之后,会向运行在前台的应用程序的activity发送一个通知信息。该应用程序的activity收到该通知信息后,由活动管理服务对窗口进行重新布局和绘制。由于窗口管理服务和活动管理服务都是在系统框架层工作的,因此,本方案可以实现从系统框架层对窗口的显示进优化管理,不需要软件工程师花费大量的时间和精力在应用布局适配上。After adjusting the window size parameters of the application in the management service, the system framework layer sends a notification message to the activity of the application running in the foreground. After the activity of the application receives the notification information, the activity management service re-lays out and draws the window. Because window management services and activity management services work at the system framework layer, this solution can optimize the display of windows from the system framework layer, without requiring software engineers to spend a lot of time and energy on application layout adaptation. superior.
请参阅图7所示,图7为某应用程序的一个窗口示意图。该窗口按照树形结构布局。该窗口包括根视图,根视图对应于根容器,根容器的布局属性可以为match_parent,即根容器在确定显示尺寸时,会根据窗口管理服务的windowstate数据中的parent参数确定根视图的大小,例如,parent=[0,0],[720,1330],则根视图大小为720×1330。Please refer to Figure 7, which is a schematic diagram of a window of a certain application. The window is laid out in a tree structure. The window includes a root view. The root view corresponds to the root container. The layout attribute of the root container can be match_parent, that is, when the root container determines the display size, it will determine the size of the root view according to the parent parameter in the windowstate data of the window management service, for example , Parent=[0,0],[720,1330], the root view size is 720×1330.
其中,图7中所示的界面中的功能栏1、功能栏2、内容数据、按钮1、按钮2户为兄弟组件,根容器为这些组件的父容器,每个组件有对应的显示元素,如图片、按钮、文本等等。这些组件也采用相对布局规则,也就是说,并不把每个组件的位置和属性写为固定的值,而是按照相对布局规则设置位置。比如,将功能栏1的布局属性设置为与父容器顶部对齐;将功能栏2的布局属性设置为与父容器底部对齐。又比如,按钮1的尺寸设置为150dp×60dp,其位置设置为距离父容器底部200dp,距离父容器左边界180dp。则如果父容器的尺寸发生变化,则按钮1在界面上的位置也会基于上述相对位置的约束关系适应性的发生变化。又比如,按钮2根据其兄弟组件按钮1的位置来布局,按钮2的尺寸设置为50dp×30dp,其位置设置为距离按钮1的右边界180dp,距离父容器底部200dp。则在按钮1和父容器的布局发生改变时,按钮2的布局也会随着按钮1和父容器的布局的改变而改变。Among them, the function bar 1, function bar 2, content data, buttons 1, and button 2 in the interface shown in Figure 7 are brother components, and the root container is the parent container of these components, and each component has a corresponding display element. Such as pictures, buttons, text, etc. These components also use relative layout rules, that is, the position and attributes of each component are not written as fixed values, but the position is set according to the relative layout rules. For example, set the layout attribute of function bar 1 to align with the top of the parent container; set the layout attribute of function bar 2 to align with the bottom of the parent container. For another example, the size of button 1 is set to 150dp×60dp, and its position is set to be 200dp from the bottom of the parent container and 180dp from the left edge of the parent container. If the size of the parent container changes, the position of the button 1 on the interface will also change adaptively based on the above-mentioned relative position constraint. For another example, button 2 is laid out according to the position of its sibling component button 1, the size of button 2 is set to 50dp×30dp, its position is set to be 180dp from the right edge of button 1 and 200dp from the bottom of the parent container. Then when the layout of button 1 and the parent container changes, the layout of button 2 will also change as the layout of button 1 and the parent container changes.
其中,dp(density independent pixels,设备无关像素)是开发用的长度单位,1dp表示在屏幕像素点密度为160ppi时1px(pixel,像素)长度。具体而言,当屏幕每英寸有160个像素时,1dp和1px等价。因此,可以用dp来确定一个组件在不同尺寸的屏幕(屏幕的dpi不同)中对应的像素数量。例如,若任意一个组件的长度为1dp,那么,在dpi为160的屏幕上,该组件的长度为1px;若在240dpi的屏幕上,该组件的长度则为1×240/160=1.5个像素点。也就是说,dp的长度不是一个固定值,而是会随着屏幕分辨率的改变而改变。Among them, dp (density independent pixels, device-independent pixels) is the length unit for development, and 1dp represents the length of 1px (pixel, pixel) when the screen pixel density is 160ppi. Specifically, when the screen has 160 pixels per inch, 1dp and 1px are equivalent. Therefore, dp can be used to determine the number of pixels corresponding to a component in screens of different sizes (different screen dpi). For example, if the length of any component is 1dp, then on a screen with a dpi of 160, the length of the component is 1px; if on a screen with a 240dpi, the length of the component is 1×240/160=1.5 pixels point. In other words, the length of dp is not a fixed value, but will change as the screen resolution changes.
请参阅图8,图8为本申请实施例提供的显示控制方法中窗口布局的一示意图。该图示中的柔性显示屏可沿竖直方向伸缩,该窗口上显示一浮动窗,该浮动窗的布局属性为居中显示,即显示在窗口的中间位置。当柔性显示屏进行伸展,长度变长时,该浮动窗在整个屏幕上的位置也会随之调整,并始终居于窗口的中间位置。Please refer to FIG. 8. FIG. 8 is a schematic diagram of the window layout in the display control method provided by an embodiment of the application. The flexible display screen in the figure can be expanded and contracted in the vertical direction, a floating window is displayed on the window, and the layout attribute of the floating window is centered display, that is, displayed in the middle of the window. When the flexible display screen stretches and the length becomes longer, the position of the floating window on the entire screen will also be adjusted accordingly, and it will always stay in the middle of the window.
此外,需要说明的是,在浮动窗之下的另一窗口虽然已经失焦,处于Poused状态,但是该窗口仍然在前台为用户可见,所以该窗口的大小也会随着屏幕的长度对应的调整。In addition, it should be noted that although the other window under the floating window has been out of focus and is in the Poused state, the window is still visible to the user in the foreground, so the size of the window will also be adjusted corresponding to the length of the screen. .
请参阅图9,图9为本申请实施例提供的显示控制方法中窗口布局的另一示意图。该图示中的柔性显示屏可沿竖直方向伸缩,该窗口中显示的为一图像,该图像对应的组件的布局设置为根据显示内容填充组件。因此,在柔性显示屏伸展之前,由于该图像本身的长宽比远大于屏幕的长宽比,该图像在宽度方向上并未铺满屏幕,而随着柔性显示屏的伸展,屏幕的长宽比增大,该图像为了能够填充整个屏幕,也会等比放大,逐渐在宽度方向上铺 满屏幕。Please refer to FIG. 9, which is another schematic diagram of the window layout in the display control method provided by an embodiment of the application. The flexible display screen in the figure can be expanded and contracted in the vertical direction, an image is displayed in the window, and the layout of the components corresponding to the image is set to fill the components according to the displayed content. Therefore, before the flexible display is stretched, since the aspect ratio of the image itself is much larger than the aspect ratio of the screen, the image does not cover the screen in the width direction, and as the flexible display stretches, the length and width of the screen The ratio increases, in order to fill the entire screen, the image will also be enlarged proportionally, gradually filling the screen in the width direction.
在一些实施例中,对应用程序的窗口中各显示元素进行重新布局之后,还包括:当重新布局后的显示元素中的内容显示区域发生变化时,获取内容显示区域对应的显示内容,并将显示内容加载在对应的显示元素中。In some embodiments, after re-layouting each display element in the window of the application program, it further includes: when the content display area in the re-layout display element changes, obtaining the display content corresponding to the content display area, and adding The display content is loaded in the corresponding display element.
请参阅图10,图10为本申请实施例提供的显示控制方法中窗口布局的又一示意图。该窗口为浏览器搜索界面,其中,功能栏1为搜索栏,功能栏2为浏览器的功能空间栏,内容数据为搜索结果页面,并且搜索结果页面可以瀑布流或者信息列表的方式在页面上显示。功能栏1的布局属性为与父容器顶部对齐,功能栏2的布局属性为与父容器底部对齐。因此,随着柔性显示屏的伸展,功能栏1的位置不变,而功能栏2的位置随之下移,并始终与根视图的底部对齐。Please refer to FIG. 10, which is another schematic diagram of the window layout in the display control method provided by the embodiment of the application. This window is the browser search interface. Among them, the function bar 1 is the search bar, the function bar 2 is the function space bar of the browser, the content data is the search result page, and the search result page can be displayed on the page in the form of waterfall or information list. show. The layout attribute of function bar 1 is aligned with the top of the parent container, and the layout attribute of function bar 2 is aligned with the bottom of the parent container. Therefore, with the expansion of the flexible display screen, the position of the function bar 1 does not change, and the position of the function bar 2 moves down accordingly, and is always aligned with the bottom of the root view.
其中,由于屏幕的拉伸,以瀑布流或者信息列表的方式显示的内容数据所在的内容显示区域,在屏幕的长度方向的可显示长度变长,可以在其中显示的内容也变多,故可以在该区域显示当前页面中本来未显示出来的更多内容。也就是说,内容数据会随着屏幕拉伸的同时,像抽屉式的拉出更多的内容显示在界面上。Among them, due to the stretching of the screen, the content display area where the content data displayed in the form of waterfall or information list is located, the displayable length in the length direction of the screen becomes longer, and the content that can be displayed in it also becomes larger. In this area, more content that is not displayed on the current page is displayed. In other words, as the screen stretches, the content data will be pulled out like a drawer to display more content on the interface.
图10所示的方案可以应用于多种窗口中包含有功能栏和内容数据、且内容数据以的瀑布流或者信息列表的方式显示的场景中。The solution shown in FIG. 10 can be applied to a scene in which a variety of windows contain function bars and content data, and the content data is displayed in the form of a waterfall or an information list.
请参阅图11,图11为本申请实施例提供的显示控制方法中窗口布局的又一示意图。该图示中的柔性显示屏沿可沿横向伸缩。与图8所示的窗口的原理类似,随着柔性显示屏进行横向伸展,宽度变宽时,该浮动窗在整个屏幕上的位置也会随之调整,并始终居于窗口的中间位置。Please refer to FIG. 11. FIG. 11 is another schematic diagram of the window layout in the display control method provided by an embodiment of the application. The flexible display shown in the figure can be extended and retracted in the horizontal direction. Similar to the principle of the window shown in FIG. 8, as the flexible display screen expands horizontally and the width becomes wider, the position of the floating window on the entire screen will also be adjusted accordingly, and it will always be in the middle of the window.
请参阅图12,图12为本申请实施例提供的显示控制方法中窗口布局的又一示意图。该图示中的柔性显示屏沿可沿横向伸缩。与图10所示的窗口的原理类似。区别在于,功能栏1的布局属性为与父容器顶部、左边界和右边界对齐,并且功能栏1的尺寸在竖直方向有固定的dp值。功能栏2的布局属性为与父容器底部、左边界和右边界对齐,并且功能栏2的尺寸在竖直方向有固定的dp值。随着柔性显示屏进行横向伸展,屏幕的宽度变宽时,功能栏1和功能栏2的宽度都会适应性的调整为与屏幕的宽度一致。而以瀑布流或者信息列表的方式显示的内容数据所在的内容显示区域在屏幕宽度方向上的可显示宽度变宽,则对应调整该区域每一条信息或数据在屏幕上的显示方式。如图12所示,如果,内容数据为文本数据,则每一行可以显示更多的文字。Please refer to FIG. 12, which is another schematic diagram of the window layout in the display control method provided by the embodiment of the application. The flexible display shown in the figure can be extended and retracted in the horizontal direction. The principle is similar to the window shown in FIG. 10. The difference is that the layout attribute of the function bar 1 is aligned with the top, left and right borders of the parent container, and the size of the function bar 1 has a fixed dp value in the vertical direction. The layout attribute of the function bar 2 is aligned with the bottom, left and right borders of the parent container, and the size of the function bar 2 has a fixed dp value in the vertical direction. As the flexible display screen expands horizontally, when the width of the screen becomes wider, the widths of the function bar 1 and the function bar 2 will be adaptively adjusted to be consistent with the width of the screen. However, the displayable width of the content display area where the content data displayed in the form of waterfall or information list is located in the screen width direction becomes wider, and the display mode of each piece of information or data in the area on the screen is adjusted accordingly. As shown in Figure 12, if the content data is text data, more text can be displayed in each line.
需要说明的是,上述各个实施例中列举的布局属性和图示仅为举例说明,在其他实施例中,只要遵守相对布局规则进行布局的方案都可以包括在本申请实施例的范围之内。此外,上述实施例是以屏幕伸展为例说明的,当柔性显示屏进行收拢缩回,屏幕变小时,是基于同样的原理,只是减小了相关参数的值,在此不再赘述。It should be noted that the layout attributes and illustrations listed in the foregoing embodiments are only examples. In other embodiments, as long as the relative layout rules are complied with, the layout scheme can be included in the scope of the embodiments of the present application. In addition, the above-mentioned embodiment is illustrated by taking the screen stretch as an example. When the flexible display screen is retracted and the screen becomes smaller, it is based on the same principle, except that the value of the relevant parameter is reduced, which will not be repeated here.
在按照调整后的窗口尺寸参数,基于上述方式对应用程序的窗口进行重新布局之后,按照重新布局后的窗口,在屏幕上重新绘制和显示应用程序的显示界面,以适应伸缩后的屏幕。如果伸缩操作仍然继续,则返回执行101至104,如此循环往复,以实现窗口布局的动态调整,直至伸缩操作终止。After re-arranging the windows of the application program based on the above-mentioned method according to the adjusted window size parameters, the display interface of the application program is redrawn and displayed on the screen according to the re-layout window to adapt to the scaled screen. If the scaling operation still continues, return to execution 101 to 104, and so on to achieve dynamic adjustment of the window layout until the scaling operation is terminated.
此外,本申请中为了快速实现对显示界面布局的动态调整,只对前台的应用程序的窗口布局做了调整,对于在后台的应用程序,当它们被切换到前台时,活动管理服务会检测到它们的状态发生了变化,会对其重新布局和绘制。In addition, in order to quickly realize the dynamic adjustment of the display interface layout in this application, only the window layout of the foreground application is adjusted. For the applications in the background, when they are switched to the foreground, the activity management service will detect Their status has changed, and they will be re-layed out and drawn.
具体实施时,本申请不受所描述的各个流程的执行顺序的限制,在不产生冲突的情况下,某些流程还可以采用其它顺序进行或者同时进行。During specific implementation, the present application is not limited by the execution order of the described processes, and certain processes may also be performed in other order or at the same time if there is no conflict.
由上可知,本申请实施例提供的显示控制方法,应用于包含有可伸缩的柔性显示屏的电子设备,在柔性显示屏进行伸缩的过程中,电子设备对伸缩长度进行检测,并根据检测到的伸缩长度确定发生伸缩后屏幕的有效显示尺寸,即显示屏发生伸缩后显示区域的新尺寸,基于窗口管理服务,根据该有效显示尺寸对前台应用程序的窗口尺寸参数进行调整, 基于调整后的窗口尺寸参数,对应用程序的窗口进行重新布局,并在屏幕上重新绘制和显示应用程序的显示界面,通过该方案,随着柔性显示屏的伸缩,不断地对窗口尺寸参数进行调整,以使运行在前台的应用程序能够适应性地、动态地调整显示界面的布局,以适应伸缩后的显示区域。It can be seen from the above that the display control method provided by the embodiments of the present application is applied to an electronic device that includes a retractable flexible display screen. During the process of the flexible display screen being stretched, the electronic device detects the stretched length and detects The expansion length determines the effective display size of the screen after expansion, that is, the new size of the display area after the display expansion, based on the window management service, according to the effective display size to adjust the window size parameters of the foreground application, based on the adjusted Window size parameter, re-layout the application window, and redraw and display the display interface of the application program on the screen. Through this solution, with the expansion and contraction of the flexible display screen, the window size parameters are continuously adjusted to make The application program running in the foreground can adaptively and dynamically adjust the layout of the display interface to adapt to the expanded display area.
在一实施例中还提供一种显示控制装置。请参阅图13,图13为本申请实施例提供的显示控制装置300的结构示意图。其中该显示控制装置300应用于电子设备,该显示控制装置300包括伸缩检测模块301、参数调整模块302、窗口布局模块303以及界面绘制模块304,如下:In one embodiment, a display control device is also provided. Please refer to FIG. 13, which is a schematic structural diagram of a display control device 300 according to an embodiment of the application. The display control device 300 is applied to electronic equipment. The display control device 300 includes a telescopic detection module 301, a parameter adjustment module 302, a window layout module 303, and an interface drawing module 304, as follows:
伸缩检测模块301,用于在所述柔性显示屏进行伸缩的过程中,检测伸缩长度并根据所述伸缩长度确定屏幕有效显示尺寸;The telescopic detection module 301 is configured to detect the telescopic length during the telescopic process of the flexible display screen and determine the effective display size of the screen according to the telescopic length;
参数调整模块302,用于确定前台运行的应用程序,并按照所述有效显示尺寸调整窗口管理服务中所述应用程序的窗口尺寸参数;The parameter adjustment module 302 is configured to determine the application program running in the foreground, and adjust the window size parameter of the application program in the window management service according to the effective display size;
窗口布局模块303,用于按照调整后的所述窗口尺寸参数,对所述应用程序的窗口进行重新布局;The window layout module 303 is configured to rearrange the windows of the application program according to the adjusted window size parameters;
界面绘制模块304,用于根据重新布局后的窗口,在屏幕上重新绘制和显示所述应用程序的显示界面。The interface drawing module 304 is configured to redraw and display the display interface of the application program on the screen according to the re-layout window.
在一些实施例中,参数调整模块302还用于:确定前台运行的应用程序;根据窗口管理服务确定所述应用程序对应的窗口状态数据;将所述窗口状态数据中与屏幕显示尺寸的相关变量修改为与所述有效显示尺寸一致。In some embodiments, the parameter adjustment module 302 is further used to: determine the application program running in the foreground; determine the window state data corresponding to the application program according to the window management service; Modified to be consistent with the effective display size.
在一些实施例中,窗口布局模块303还用于:按照调整后的所述窗口尺寸参数,调整所述应用程序的根视图的显示尺寸;根据调整后的根视图的显示尺寸,以及所述窗口中各显示元素的布局属性,对所述应用程序的窗口中各显示元素进行重新布局。In some embodiments, the window layout module 303 is further configured to: adjust the display size of the root view of the application according to the adjusted window size parameter; according to the adjusted display size of the root view, and the window The layout attribute of each display element in the application program re-layouts each display element in the window of the application program.
在一些实施例中,界面绘制模块304还用于:当重新布局后的显示元素中的内容显示区域发生变化时,获取所述内容显示区域对应的显示内容,并将所述显示内容加载在对应的显示元素中。In some embodiments, the interface drawing module 304 is further configured to: when the content display area in the re-layout display element changes, obtain the display content corresponding to the content display area, and load the display content in the corresponding display element. In the display element.
在一些实施例中,所述电子设备包括位置检测传感器;伸缩检测模块301还用于:根据所述位置传感器检测所述柔性显示屏的伸缩方向和伸缩长度;获取记录的历史显示尺寸,根据所述伸缩长度、所述伸缩方向,以及所述历史显示尺寸,计算得到伸缩后的有效显示尺寸;根据所述有效显示尺寸更新记录的历史显示寸尺。In some embodiments, the electronic device includes a position detection sensor; the expansion detection module 301 is further used to: detect the expansion direction and expansion length of the flexible display screen according to the position sensor; The expansion and contraction length, the expansion and contraction direction, and the historical display size are calculated to obtain an effective display size after expansion and contraction; and the recorded historical display size is updated according to the effective display size.
在一些实施例中,所述柔性显示屏包括卷轴,所述位置检测传感器为与所述卷轴连接的角速度传感器;伸缩检测模块301还用于:根据所述角速度传感器检测所述卷轴的旋转角度和旋转方向;根据所述旋转角度计算所述柔性显示屏的伸缩长度,并根据所述旋转方向确定所述柔性显示屏的伸缩方向。In some embodiments, the flexible display screen includes a reel, and the position detection sensor is an angular velocity sensor connected to the reel; the telescopic detection module 301 is further configured to: detect the rotation angle of the reel according to the angular velocity sensor and Rotation direction; calculate the expansion and contraction length of the flexible display screen according to the rotation angle, and determine the expansion and contraction direction of the flexible display screen according to the rotation direction.
在一些实施例中,参数调整模块302还用于:判断所述有效显示尺寸与所述历史显示尺寸的差值是否位于预设范围内;若否,则执行确定前台运行的应用程序,并按照所述有效显示尺寸调整窗口管理服务中所述应用程序的窗口尺寸参数。In some embodiments, the parameter adjustment module 302 is further used to determine whether the difference between the effective display size and the historical display size is within a preset range; The effective display size adjusts the window size parameter of the application program in the window management service.
应当说明的是,本申请实施例提供的显示控制装置与上文实施例中的显示控制方法属于同一构思,通过该显示控制装置可以实现显示控制方法实施例中提供的任一方法,其具体实现过程详见显示控制方法实施例,此处不再赘述。It should be noted that the display control device provided in this embodiment of the application belongs to the same concept as the display control method in the above embodiment, and any method provided in the display control method embodiment can be implemented by the display control device, and its specific implementation For details of the process, refer to the embodiment of the display control method, which will not be repeated here.
由上可知,本申请实施例提出的显示控制装置,该装置包括伸缩检测模块301、参数调整模块302、窗口布局模块303以及界面绘制模块304,在柔性显示屏进行伸缩的过程中,伸缩检测模块301对伸缩长度进行检测,并根据检测到的伸缩长度确定发生伸缩后屏幕的有效显示尺寸,即显示屏发生伸缩后显示区域的新尺寸,参数调整模块302基于窗口管理服务,根据该有效显示尺寸对前台应用程序的窗口尺寸参数进行调整,窗口布局模块303基于调整后的窗口尺寸参数,对应用程序的窗口进行重新布局,界面绘制模块304在屏幕 上重新绘制和显示应用程序的显示界面,通过该方案,随着柔性显示屏的伸缩,不断地对窗口尺寸参数进行调整,以使运行在前台的应用程序能够适应性地、动态地调整显示界面的布局,以适应伸缩后的显示区域。It can be seen from the above that the display control device proposed in the embodiment of the present application includes a telescopic detection module 301, a parameter adjustment module 302, a window layout module 303, and an interface drawing module 304. During the expansion and contraction of the flexible display screen, the expansion detection module 301 detects the expansion length, and determines the effective display size of the screen after expansion and contraction according to the detected expansion and contraction length, that is, the new size of the display area after the display screen has been expanded and contracted. The parameter adjustment module 302 is based on the window management service, according to the effective display size. Adjust the window size parameters of the foreground application. The window layout module 303 re-lays out the windows of the application based on the adjusted window size parameters. The interface drawing module 304 redraws and displays the display interface of the application on the screen. In this solution, with the expansion and contraction of the flexible display screen, the window size parameters are continuously adjusted, so that the application program running in the foreground can adaptively and dynamically adjust the layout of the display interface to adapt to the expanded display area.
本申请实施例还提供一种电子设备。所述电子设备可以是智能手机、平板电脑等设备。请参阅图14,图14为本申请实施例提供的电子设备的第一种结构示意图。电子设备400包括处理器401和存储器402。其中,处理器401与存储器402电性连接。The embodiment of the present application also provides an electronic device. The electronic device may be a smart phone, a tablet computer, or other devices. Please refer to FIG. 14, which is a schematic diagram of the first structure of an electronic device provided by an embodiment of this application. The electronic device 400 includes a processor 401 and a memory 402. Wherein, the processor 401 and the memory 402 are electrically connected.
处理器401是电子设备400的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或调用存储在存储器402内的计算机程序,以及调用存储在存储器402内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。The processor 401 is the control center of the electronic device 400. It uses various interfaces and lines to connect various parts of the entire electronic device. Various functions and processing data of the equipment, so as to monitor the electronic equipment as a whole.
存储器402可用于存储计算机程序和数据。存储器402存储的计算机程序中包含有可在处理器中执行的指令。计算机程序可以组成各种功能模块。处理器401通过调用存储在存储器402的计算机程序,从而执行各种功能应用以及数据处理。The memory 402 can be used to store computer programs and data. The computer program stored in the memory 402 contains instructions that can be executed in the processor. Computer programs can be composed of various functional modules. The processor 401 executes various functional applications and data processing by calling a computer program stored in the memory 402.
在本实施例中,电子设备400中的处理器401会按照如下的流程,将一个或一个以上的计算机程序的进程对应的指令加载到存储器402中,并由处理器401来运行存储在存储器402中的计算机程序,从而实现各种功能:In this embodiment, the processor 401 in the electronic device 400 loads the instructions corresponding to the process of one or more computer programs into the memory 402 according to the following process, and the processor 401 runs the instructions and stores them in the memory 402. In order to realize various functions:
在所述柔性显示屏进行伸缩的过程中,检测伸缩长度并根据所述伸缩长度确定屏幕有效显示尺寸;During the expansion and contraction of the flexible display screen, detecting the expansion length and determining the effective display size of the screen according to the expansion length;
确定前台运行的应用程序,并按照所述有效显示尺寸调整窗口管理服务中所述应用程序的窗口尺寸参数;Determine the application program running in the foreground, and adjust the window size parameters of the application program in the window management service according to the effective display size;
按照调整后的所述窗口尺寸参数,对所述应用程序的窗口进行重新布局;Re-layout the windows of the application program according to the adjusted window size parameters;
根据重新布局后的窗口,在屏幕上重新绘制和显示所述应用程序的显示界面。According to the re-layout window, the display interface of the application program is redrawn and displayed on the screen.
在一些实施例中,请参阅图15,图15为本申请实施例提供的电子设备的第二种结构示意图。电子设备400还包括:射频电路403、显示屏404、控制电路405、输入单元406、音频电路407、传感器408以及电源409。其中,处理器401分别与射频电路403、显示屏404、控制电路405、输入单元406、音频电路407、传感器408以及电源409电性连接。In some embodiments, please refer to FIG. 15, which is a schematic diagram of a second structure of an electronic device provided by an embodiment of this application. The electronic device 400 further includes: a radio frequency circuit 403, a display screen 404, a control circuit 405, an input unit 406, an audio circuit 407, a sensor 408, and a power supply 409. The processor 401 is electrically connected to the radio frequency circuit 403, the display screen 404, the control circuit 405, the input unit 406, the audio circuit 407, the sensor 408, and the power supply 409, respectively.
射频电路403用于收发射频信号,以通过无线通信与网络设备或其他电子设备进行通信。The radio frequency circuit 403 is used to transmit and receive radio frequency signals to communicate with network equipment or other electronic equipment through wireless communication.
柔性显示屏404可用于显示由用户输入的信息或提供给用户的信息以及电子设备的各种图形用户接口,这些图形用户接口可以由图像、文本、图标、视频和其任意组合来构成。The flexible display screen 404 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device. These graphical user interfaces can be composed of images, text, icons, videos, and any combination thereof.
控制电路405与显示屏404电性连接,用于控制显示屏404显示信息。The control circuit 405 is electrically connected to the display screen 404 for controlling the display screen 404 to display information.
输入单元406可用于接收输入的数字、字符信息或用户特征信息(例如指纹),以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。其中,输入单元406可以包括指纹识别模组。The input unit 406 can be used to receive inputted numbers, character information, or user characteristic information (such as fingerprints), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Wherein, the input unit 406 may include a fingerprint recognition module.
音频电路407可通过扬声器、传声器提供用户与电子设备之间的音频接口。其中,音频电路407包括麦克风。所述麦克风与所述处理器401电性连接。所述麦克风用于接收用户输入的语音信息。The audio circuit 407 can provide an audio interface between the user and the electronic device through a speaker and a microphone. Among them, the audio circuit 407 includes a microphone. The microphone is electrically connected to the processor 401. The microphone is used to receive voice information input by the user.
传感器408用于采集外部环境信息。传感器408可以包括环境亮度传感器、加速度传感器、陀螺仪等传感器中的一种或多种。The sensor 408 is used to collect external environmental information. The sensor 408 may include one or more of sensors such as an environmental brightness sensor, an acceleration sensor, and a gyroscope.
电源409用于给电子设备400的各个部件供电。在一些实施例中,电源409可以通过电源管理系统与处理器401逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The power supply 409 is used to supply power to various components of the electronic device 400. In some embodiments, the power supply 409 may be logically connected to the processor 401 through a power management system, so that functions such as charging, discharging, and power consumption management can be managed through the power management system.
虽然图中未示出,电子设备400还可以包括摄像头、蓝牙模块等,在此不再赘述。Although not shown in the figure, the electronic device 400 may also include a camera, a Bluetooth module, etc., which will not be repeated here.
在本实施例中,电子设备400中的处理器401会按照如下的流程,将一个或一个以上的计算机程序的进程对应的指令加载到存储器402中,并由处理器401来运行存储在存储器402中的计算机程序,从而实现各种功能:In this embodiment, the processor 401 in the electronic device 400 loads the instructions corresponding to the process of one or more computer programs into the memory 402 according to the following process, and the processor 401 runs the instructions and stores them in the memory 402. In order to realize various functions:
在所述柔性显示屏进行伸缩的过程中,检测伸缩长度并根据所述伸缩长度确定屏幕有 效显示尺寸;During the expansion and contraction of the flexible display screen, detecting the expansion length and determining the effective display size of the screen according to the expansion length;
确定前台运行的应用程序,并按照所述有效显示尺寸调整窗口管理服务中所述应用程序的窗口尺寸参数;Determine the application program running in the foreground, and adjust the window size parameters of the application program in the window management service according to the effective display size;
按照调整后的所述窗口尺寸参数,对所述应用程序的窗口进行重新布局;Re-layout the windows of the application program according to the adjusted window size parameters;
根据重新布局后的窗口,在屏幕上重新绘制和显示所述应用程序的显示界面。According to the re-layout window, the display interface of the application program is redrawn and displayed on the screen.
由上可知,本申请实施例提供了一种电子设备,所述电子设备在柔性显示屏进行伸缩的过程中,对伸缩长度进行检测,并根据检测到的伸缩长度确定发生伸缩后屏幕的有效显示尺寸,即显示屏发生伸缩后显示区域的新尺寸,基于窗口管理服务,根据该有效显示尺寸对前台应用程序的窗口尺寸参数进行调整,基于调整后的窗口尺寸参数,对应用程序的窗口进行重新布局,并在屏幕上重新绘制和显示应用程序的显示界面,通过该方案,随着柔性显示屏的伸缩,不断地对窗口尺寸参数进行调整,以使运行在前台的应用程序能够适应性地、动态地调整显示界面的布局,以适应伸缩后的显示区域。It can be seen from the above that an embodiment of the present application provides an electronic device that detects the telescopic length during the expansion and contraction of the flexible display screen, and determines the effective display of the screen after the expansion and contraction according to the detected expansion and contraction length. Size, that is, the new size of the display area after the display screen is stretched. Based on the window management service, the window size parameters of the foreground application are adjusted according to the effective display size. Based on the adjusted window size parameters, the application window is renewed. Layout, and redraw and display the display interface of the application on the screen. Through this solution, with the expansion and contraction of the flexible display screen, the window size parameters are constantly adjusted, so that the application running in the foreground can adapt, Dynamically adjust the layout of the display interface to adapt to the expanded display area.
本申请实施例还提供一种存储介质,所述存储介质中存储有计算机程序,当所述计算机程序在计算机上运行时,所述计算机执行上述任一实施例所述的显示控制方法。An embodiment of the present application also provides a storage medium in which a computer program is stored, and when the computer program is run on a computer, the computer executes the display control method described in any of the foregoing embodiments.
需要说明的是,本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分流程是可以通过计算机程序来指令相关的硬件来完成,所述计算机程序可以存储于计算机可读存储介质中,所述存储介质可以包括但不限于:只读存储器(ROM,Read Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁盘或光盘等。It should be noted that those of ordinary skill in the art can understand that all or part of the processes in the various methods of the foregoing embodiments can be completed by instructing relevant hardware through a computer program, which can be stored in a computer-readable storage medium. Here, the storage medium may include, but is not limited to: read only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, etc.
此外,本申请中的术语“第一”、“第二”和“第三”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列流程或模块的过程、方法、系统、产品或设备没有限定于已列出的流程或模块,而是某些实施例还包括没有列出的流程或模块,或某些实施例还包括对于这些过程、方法、产品或设备固有的其它流程或模块。In addition, the terms "first", "second" and "third" in this application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations of them are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device that includes a series of processes or modules is not limited to the listed processes or modules, but some embodiments also include unlisted processes or modules, or some embodiments It also includes other processes or modules inherent to these processes, methods, products, or equipment.
以上对本申请实施例所提供的显示控制方法、装置、存储介质及电子设备进行了详细介绍。本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The above describes in detail the display control method, device, storage medium, and electronic equipment provided by the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation of the application. The descriptions of the above examples are only used to help understand the methods and core ideas of the application; at the same time, for those skilled in the art, according to the principles of the application There will be changes in the thinking, specific implementation and application scope. In summary, the content of this specification should not be construed as a limitation to this application.

Claims (20)

  1. 一种显示控制方法,其中,所述方法应用于包含有可伸缩的柔性显示屏的电子设备,所述方法包括:A display control method, wherein the method is applied to an electronic device including a retractable flexible display screen, and the method includes:
    在所述柔性显示屏进行伸缩的过程中,检测伸缩长度并根据所述伸缩长度确定屏幕有效显示尺寸;During the expansion and contraction of the flexible display screen, detecting the expansion length and determining the effective display size of the screen according to the expansion length;
    确定前台运行的应用程序,并按照所述有效显示尺寸调整窗口管理服务中所述应用程序的窗口尺寸参数;Determine the application program running in the foreground, and adjust the window size parameters of the application program in the window management service according to the effective display size;
    按照调整后的所述窗口尺寸参数,对所述应用程序的窗口进行重新布局;Re-layout the windows of the application program according to the adjusted window size parameters;
    根据重新布局后的窗口,在屏幕上重新绘制和显示所述应用程序的显示界面。According to the re-layout window, the display interface of the application program is redrawn and displayed on the screen.
  2. 如权利要求1所述的显示控制方法,其中,所述确定前台运行的应用程序,并按照所述有效显示尺寸调整窗口管理服务中所述应用程序的窗口尺寸参数,包括:The display control method according to claim 1, wherein the determining the application program running in the foreground and adjusting the window size parameter of the application program in the window management service according to the effective display size comprises:
    确定前台运行的应用程序;Determine the applications running in the foreground;
    根据窗口管理服务确定所述应用程序对应的窗口状态数据;Determining the window state data corresponding to the application program according to the window management service;
    将所述窗口状态数据中与屏幕显示尺寸的相关变量修改为与所述有效显示尺寸一致。Modify the variables related to the screen display size in the window state data to be consistent with the effective display size.
  3. 如权利要求2所述的显示控制方法,其中,所述按照调整后的所述窗口尺寸参数,对所述应用程序的窗口进行重新布局,包括:3. The display control method according to claim 2, wherein the re-layout of the windows of the application program according to the adjusted window size parameters comprises:
    按照调整后的所述窗口尺寸参数,调整所述应用程序的根视图的显示尺寸;Adjust the display size of the root view of the application according to the adjusted window size parameter;
    根据调整后的根视图的显示尺寸,以及所述窗口中各显示元素的布局属性,对所述应用程序的窗口中各显示元素进行重新布局。According to the adjusted display size of the root view and the layout attributes of the display elements in the window, the display elements in the window of the application are re-layout.
  4. 如权利要求3所述的显示控制方法,其中,所述对所述应用程序的窗口中各显示元素进行重新布局之后,还包括:5. The display control method according to claim 3, wherein, after the re-layout of the display elements in the window of the application program, the method further comprises:
    当重新布局后的显示元素中的内容显示区域发生变化时,获取所述内容显示区域对应的显示内容,并将所述显示内容加载在对应的显示元素中。When the content display area of the re-layout display element changes, the display content corresponding to the content display area is acquired, and the display content is loaded in the corresponding display element.
  5. 如权利要求1至4任一项所述的显示控制方法,其中,所述电子设备包括位置检测传感器;所述检测伸缩长度并根据所述伸缩长度确定屏幕有效显示尺寸,包括:The display control method according to any one of claims 1 to 4, wherein the electronic device includes a position detection sensor; the detecting the telescopic length and determining the effective display size of the screen according to the telescopic length includes:
    根据所述位置传感器检测所述柔性显示屏的伸缩方向和伸缩长度;Detecting the telescopic direction and the telescopic length of the flexible display screen according to the position sensor;
    获取记录的历史显示尺寸,根据所述伸缩长度、所述伸缩方向,以及所述历史显示尺寸,计算得到伸缩后的有效显示尺寸;Acquiring the recorded historical display size, and calculating the effective display size after expansion and contraction according to the telescopic length, the telescopic direction, and the historical display size;
    根据所述有效显示尺寸更新记录的历史显示寸尺。Update the recorded historical display size according to the effective display size.
  6. 如权利要求5所述的显示控制方法,其中,所述柔性显示屏包括卷轴,所述位置检测传感器为与所述卷轴连接的角速度传感器;所述根据所述位置传感器检测所述柔性显示屏的伸缩方向和伸缩长度,包括:The display control method according to claim 5, wherein the flexible display screen comprises a reel, and the position detection sensor is an angular velocity sensor connected to the reel; and the position sensor detects the position of the flexible display Extension direction and extension length, including:
    根据所述角速度传感器检测所述卷轴的旋转角度和旋转方向;Detecting the rotation angle and the rotation direction of the reel according to the angular velocity sensor;
    根据所述旋转角度计算所述柔性显示屏的伸缩长度,并根据所述旋转方向确定所述柔性显示屏的伸缩方向。The expansion and contraction length of the flexible display screen is calculated according to the rotation angle, and the expansion and contraction direction of the flexible display screen is determined according to the rotation direction.
  7. 如权利要求5所述的显示控制方法,其中,所述检测伸缩长度并根据所述伸缩长度确定屏幕有效显示尺寸之后,还包括:5. The display control method according to claim 5, wherein after detecting the telescopic length and determining the effective display size of the screen according to the telescopic length, the method further comprises:
    判断所述有效显示尺寸与所述历史显示尺寸的差值是否位于预设范围内;Determine whether the difference between the effective display size and the historical display size is within a preset range;
    若否,则执行确定前台运行的应用程序,并按照所述有效显示尺寸调整窗口管理服务中所述应用程序的窗口尺寸参数。If not, execute to determine the application program running in the foreground, and adjust the window size parameter of the application program in the window management service according to the effective display size.
  8. 一种显示控制装置,其中,所述装置应用于包含有可伸缩的柔性显示屏的电子设备,所述装置包括:A display control device, wherein the device is applied to an electronic device including a retractable flexible display screen, and the device includes:
    伸缩检测模块,用于在所述柔性显示屏进行伸缩的过程中,检测伸缩长度并根据所述伸缩长度确定屏幕有效显示尺寸;The telescopic detection module is configured to detect the telescopic length during the telescopic process of the flexible display screen and determine the effective display size of the screen according to the telescopic length;
    参数调整模块,用于确定前台运行的应用程序,并按照所述有效显示尺寸调整窗口管理服务中所述应用程序的窗口尺寸参数;The parameter adjustment module is used to determine the application program running in the foreground, and adjust the window size parameter of the application program in the window management service according to the effective display size;
    窗口布局模块,用于按照调整后的所述窗口尺寸参数,对所述应用程序的窗口进行重新布局;A window layout module, configured to rearrange the windows of the application program according to the adjusted window size parameters;
    界面绘制模块,用于根据重新布局后的窗口,在屏幕上重新绘制和显示所述应用程序的显示界面。The interface drawing module is used to redraw and display the display interface of the application program on the screen according to the re-layout window.
  9. 如权利要求8所述的显示控制装置,其中,所述参数调整模块,还用于确定前台运行的应用程序;8. The display control device according to claim 8, wherein the parameter adjustment module is also used to determine the application program running in the foreground;
    根据窗口管理服务确定所述应用程序对应的窗口状态数据;以及Determine the window state data corresponding to the application program according to the window management service; and
    将所述窗口状态数据中与屏幕显示尺寸的相关变量修改为与所述有效显示尺寸一致。Modify the variables related to the screen display size in the window state data to be consistent with the effective display size.
  10. 如权利要求9所述的显示控制装置,其中,所述窗口布局模块,还用于按照调整后的所述窗口尺寸参数,调整所述应用程序的根视图的显示尺寸;以及9. The display control device according to claim 9, wherein the window layout module is further configured to adjust the display size of the root view of the application according to the adjusted window size parameter; and
    根据调整后的根视图的显示尺寸,以及所述窗口中各显示元素的布局属性,对所述应用程序的窗口中各显示元素进行重新布局。According to the adjusted display size of the root view and the layout attributes of the display elements in the window, the display elements in the window of the application are re-layout.
  11. 如权利要求10所述的显示控制装置,其中,所述界面绘制模块,还用于当重新布局后的显示元素中的内容显示区域发生变化时,获取所述内容显示区域对应的显示内容,并将所述显示内容加载在对应的显示元素中。The display control device according to claim 10, wherein the interface drawing module is further configured to obtain the display content corresponding to the content display area when the content display area in the display element after the rearrangement changes, and Load the display content in the corresponding display element.
  12. 如权利要求8至11所述的显示控制装置,其中,所述电子设备包括位置检测传感器;所述伸缩检测模块,还用于根据所述位置传感器检测所述柔性显示屏的伸缩方向和伸缩长度;The display control device according to claims 8 to 11, wherein the electronic device includes a position detection sensor; the expansion detection module is further configured to detect the expansion direction and expansion length of the flexible display screen according to the position sensor ;
    获取记录的历史显示尺寸,根据所述伸缩长度、所述伸缩方向,以及所述历史显示尺寸,计算得到伸缩后的有效显示尺寸;以及Obtain the recorded historical display size, and calculate the effective display size after expansion and contraction according to the telescopic length, the telescopic direction, and the historical display size; and
    根据所述有效显示尺寸更新记录的历史显示寸尺。Update the recorded historical display size according to the effective display size.
  13. 如权利要求12所述的显示控制装置,其中,所述柔性显示屏包括卷轴,所述位置检测传感器为与所述卷轴连接的角速度传感器;所述伸缩检测模块还用于:根据所述角速度传感器检测所述卷轴的旋转角度和旋转方向;以及The display control device according to claim 12, wherein the flexible display screen comprises a reel, and the position detection sensor is an angular velocity sensor connected to the reel; and the telescopic detection module is further used to: according to the angular velocity sensor Detecting the rotation angle and rotation direction of the reel; and
    根据所述旋转角度计算所述柔性显示屏的伸缩长度,并根据所述旋转方向确定所述柔性显示屏的伸缩方向。The expansion and contraction length of the flexible display screen is calculated according to the rotation angle, and the expansion and contraction direction of the flexible display screen is determined according to the rotation direction.
  14. 如权利要求12所述的显示控制装置,其中,所述参数调整模块,还用于:判断所述有效显示尺寸与所述历史显示尺寸的差值是否位于预设范围内;11. The display control device of claim 12, wherein the parameter adjustment module is further configured to: determine whether the difference between the effective display size and the historical display size is within a preset range;
    若否,则执行确定前台运行的应用程序,并按照所述有效显示尺寸调整窗口管理服务中所述应用程序的窗口尺寸参数。If not, execute to determine the application program running in the foreground, and adjust the window size parameter of the application program in the window management service according to the effective display size.
  15. 一种存储介质,其上存储有计算机程序,其中,当所述计算机程序在计算机上运行时,使得所述计算机执行:A storage medium on which a computer program is stored, wherein when the computer program runs on a computer, the computer is caused to execute:
    在柔性显示屏进行伸缩的过程中,检测伸缩长度并根据所述伸缩长度确定屏幕有效显示尺寸;During the expansion and contraction of the flexible display screen, detecting the expansion length and determining the effective display size of the screen according to the expansion length;
    确定前台运行的应用程序,并按照所述有效显示尺寸调整窗口管理服务中所述应用程序的窗口尺寸参数;Determine the application program running in the foreground, and adjust the window size parameters of the application program in the window management service according to the effective display size;
    按照调整后的所述窗口尺寸参数,对所述应用程序的窗口进行重新布局;Re-layout the windows of the application program according to the adjusted window size parameters;
    根据重新布局后的窗口,在屏幕上重新绘制和显示所述应用程序的显示界面。According to the re-layout window, the display interface of the application program is redrawn and displayed on the screen.
  16. 一种电子设备,包括处理器和存储器,所述存储器存储有计算机程序,其中,所述处理器通过调用所述计算机程序,用于执行:An electronic device includes a processor and a memory, the memory stores a computer program, wherein the processor is configured to execute:
    在柔性显示屏进行伸缩的过程中,检测伸缩长度并根据所述伸缩长度确定屏幕有效显示尺寸;During the expansion and contraction of the flexible display screen, detecting the expansion length and determining the effective display size of the screen according to the expansion length;
    确定前台运行的应用程序,并按照所述有效显示尺寸调整窗口管理服务中所述应用程序的窗口尺寸参数;Determine the application program running in the foreground, and adjust the window size parameters of the application program in the window management service according to the effective display size;
    按照调整后的所述窗口尺寸参数,对所述应用程序的窗口进行重新布局;Re-layout the windows of the application program according to the adjusted window size parameters;
    根据重新布局后的窗口,在屏幕上重新绘制和显示所述应用程序的显示界面。According to the re-layout window, the display interface of the application program is redrawn and displayed on the screen.
  17. 如权利要求16所述的电子设备,其中,所述处理器通过调用所述计算机程序,还用于执行:The electronic device according to claim 16, wherein the processor is further configured to execute:
    确定前台运行的应用程序;Determine the applications running in the foreground;
    根据窗口管理服务确定所述应用程序对应的窗口状态数据;Determining the window state data corresponding to the application program according to the window management service;
    将所述窗口状态数据中与屏幕显示尺寸的相关变量修改为与所述有效显示尺寸一致。Modify the variables related to the screen display size in the window state data to be consistent with the effective display size.
  18. 如权利要求16所述的电子设备,其中,所述处理器通过调用所述计算机程序,还用于执行:The electronic device according to claim 16, wherein the processor is further configured to execute:
    按照调整后的所述窗口尺寸参数,调整所述应用程序的根视图的显示尺寸;Adjust the display size of the root view of the application according to the adjusted window size parameter;
    根据调整后的根视图的显示尺寸,以及所述窗口中各显示元素的布局属性,对所述应用程序的窗口中各显示元素进行重新布局。According to the adjusted display size of the root view and the layout attributes of the display elements in the window, the display elements in the window of the application are re-layout.
  19. 如权利要求16所述的电子设备,其中,所述处理器通过调用所述计算机程序,还用于执行:The electronic device according to claim 16, wherein the processor is further configured to execute:
    当重新布局后的显示元素中的内容显示区域发生变化时,获取所述内容显示区域对应的显示内容,并将所述显示内容加载在对应的显示元素中。When the content display area of the re-layout display element changes, the display content corresponding to the content display area is acquired, and the display content is loaded in the corresponding display element.
  20. 如权利要求16所述的电子设备,其中,所述处理器通过调用所述计算机程序,还用于执行:The electronic device according to claim 16, wherein the processor is further configured to execute:
    根据所述位置传感器检测所述柔性显示屏的伸缩方向和伸缩长度;Detecting the telescopic direction and the telescopic length of the flexible display screen according to the position sensor;
    获取记录的历史显示尺寸,根据所述伸缩长度、所述伸缩方向,以及所述历史显示尺寸,计算得到伸缩后的有效显示尺寸;Acquiring the recorded historical display size, and calculating the effective display size after expansion and contraction according to the telescopic length, the telescopic direction, and the historical display size;
    根据所述有效显示尺寸更新记录的历史显示寸尺。Update the recorded historical display size according to the effective display size.
PCT/CN2021/085084 2020-05-18 2021-04-01 Display control method and apparatus, storage medium, and electronic device WO2021232961A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010421710.7 2020-05-18
CN202010421710.7A CN113687743A (en) 2020-05-18 2020-05-18 Display control method, display control device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
WO2021232961A1 true WO2021232961A1 (en) 2021-11-25

Family

ID=78575676

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/085084 WO2021232961A1 (en) 2020-05-18 2021-04-01 Display control method and apparatus, storage medium, and electronic device

Country Status (2)

Country Link
CN (1) CN113687743A (en)
WO (1) WO2021232961A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114398096A (en) * 2021-12-30 2022-04-26 宝宝巴士股份有限公司 Method for adapting layout of folding screen
CN115174731A (en) * 2022-06-30 2022-10-11 深圳传音控股股份有限公司 Control method, intelligent terminal and storage medium
WO2023207738A1 (en) * 2022-04-28 2023-11-02 华为技术有限公司 Display method of electronic device having flexible screen, and electronic device

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
USD1033422S1 (en) * 2020-05-15 2024-07-02 Compal Electronics, Inc. Notebook computer equipped with variable aspect ratio screen
CN116680023A (en) * 2022-03-25 2023-09-01 华为技术有限公司 Self-adaptive display method of interface and terminal equipment
WO2023191305A1 (en) * 2022-03-28 2023-10-05 삼성전자 주식회사 Electronic device having flexible display
CN116974658A (en) * 2022-04-21 2023-10-31 华为技术有限公司 Interface layout method and device
CN116382825B (en) * 2022-04-21 2024-03-01 华为技术有限公司 Interface layout method and device
CN114889532A (en) * 2022-06-27 2022-08-12 中国第一汽车股份有限公司 Accuse screen and car in on-vehicle
CN116466849A (en) * 2022-11-21 2023-07-21 荣耀终端有限公司 Application interface display method, electronic device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105452983A (en) * 2014-05-23 2016-03-30 三星电子株式会社 Foldable device and method of controlling the same
CN106340247A (en) * 2015-07-06 2017-01-18 Lg电子株式会社 Flexible Display Device And Operating Method Thereof
US20180275770A1 (en) * 2015-09-30 2018-09-27 Lg Electronics Inc. Mobile terminal and control method therefor
CN110764575A (en) * 2019-10-08 2020-02-07 Oppo广东移动通信有限公司 Display control method, display control device, and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105452983A (en) * 2014-05-23 2016-03-30 三星电子株式会社 Foldable device and method of controlling the same
CN106340247A (en) * 2015-07-06 2017-01-18 Lg电子株式会社 Flexible Display Device And Operating Method Thereof
US20180275770A1 (en) * 2015-09-30 2018-09-27 Lg Electronics Inc. Mobile terminal and control method therefor
CN110764575A (en) * 2019-10-08 2020-02-07 Oppo广东移动通信有限公司 Display control method, display control device, and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114398096A (en) * 2021-12-30 2022-04-26 宝宝巴士股份有限公司 Method for adapting layout of folding screen
WO2023207738A1 (en) * 2022-04-28 2023-11-02 华为技术有限公司 Display method of electronic device having flexible screen, and electronic device
CN115174731A (en) * 2022-06-30 2022-10-11 深圳传音控股股份有限公司 Control method, intelligent terminal and storage medium

Also Published As

Publication number Publication date
CN113687743A (en) 2021-11-23

Similar Documents

Publication Publication Date Title
WO2021232961A1 (en) Display control method and apparatus, storage medium, and electronic device
US10671282B2 (en) Display device including button configured according to displayed windows and control method therefor
WO2022100260A1 (en) Display control method and apparatus, storage medium, and electronic device
US20210329112A1 (en) Screen Control Method, Terminal, and Storage Medium
KR102487389B1 (en) Foldable electronic device and method for controlling screen using gesture
KR102222338B1 (en) Electronic device and Method for controlling the electronic device thereof
US20230021260A1 (en) Gesture instruction execution method and apparatus, system, and storage medium
KR20210060398A (en) Electronic device comprising a rollable display and method for operating thereof
US20180011818A1 (en) Webpage Update Method And Apparatus
US11054978B2 (en) Portable device and method for controlling brightness of the same
CN110865758B (en) Display method and electronic equipment
CN111596845A (en) Display control method and device and electronic equipment
JP2014078234A (en) Multi-display device and multi-display method
KR20140046329A (en) Multi display apparatus and method for controlling display operation
WO2021232968A1 (en) Desktop icon layout method and apparatus, storage medium, and electronic device
US11636824B2 (en) Display apparatus and control method thereof for variably displaying user interface
CN111026480A (en) Content display method and electronic equipment
WO2022262499A1 (en) Display method and apparatus, storage medium, and electronic device
US20220091736A1 (en) Method and apparatus for displaying page, graphical user interface, and mobile terminal
WO2020238496A1 (en) Icon management method and terminal device
WO2021082718A1 (en) Content scrolling display method and electronic device
CN107710147B (en) Portable terminal capable of controlling brightness thereof and brightness control method thereof
WO2021179802A1 (en) Extension control method and apparatus for extensible component, and storage medium, and electronic device
CN112947685A (en) Electronic device control method and device, storage medium and electronic device
KR20240040374A (en) Electronic apparatus and control method thereof

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: 21808507

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: 21808507

Country of ref document: EP

Kind code of ref document: A1