CN110347317B - A window switching method, device, storage medium and interactive smart tablet - Google Patents
A window switching method, device, storage medium and interactive smart tablet Download PDFInfo
- Publication number
- CN110347317B CN110347317B CN201910500160.5A CN201910500160A CN110347317B CN 110347317 B CN110347317 B CN 110347317B CN 201910500160 A CN201910500160 A CN 201910500160A CN 110347317 B CN110347317 B CN 110347317B
- Authority
- CN
- China
- Prior art keywords
- display
- height
- window
- width
- mode
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
- G06F3/04847—Interaction techniques to control parameter settings, e.g. interaction with sliders or dials
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
Description
技术领域technical field
本申请涉及终端技术领域,尤其涉及一种窗口切换方法、装置、存储介质及交互智能平板。The present application relates to the field of terminal technologies, and in particular, to a window switching method, device, storage medium and interactive smart tablet.
背景技术Background technique
随着移动设备的应用越来越广泛,人们对移动设备的显示要求越来越高,移动设备的屏幕越来越大,因此,大屏显示设备(如交互智能平板)在生活或者工作中的应用频率越来越高。大屏对于移动设备的显示提供了很好的条件的同时对显示要求也有所提高,横竖屏的切换也逐渐孕育而生。As the application of mobile devices becomes more and more extensive, people have higher and higher requirements for the display of mobile devices, and the screens of mobile devices are getting larger and larger. Therefore, large-screen display devices (such as interactive smart tablets) are used in life or work. The frequency of application is getting higher and higher. The large screen provides good conditions for the display of mobile devices, while the display requirements are also improved, and the switching of horizontal and vertical screens is gradually born.
所谓横竖屏切换,是指移动设备显示屏上所显示的应用窗口在横屏模式和竖屏模式之间转换,以符合用户的视觉需求。目前,横竖屏切换的实现主要针对全屏模式下应用窗口的切换,通过重力感应芯片计算出当前的放置形式,来确定是以横屏显示还是以竖屏显示,然后进行窗口切换,且只能切换到与显示屏高度和显示屏宽度相同的显示高度和显示宽度,切换的场景比较单一,从而降低了窗口切换的适用范围。The so-called horizontal and vertical screen switching refers to the switching of the application window displayed on the display screen of the mobile device between the horizontal screen mode and the vertical screen mode to meet the user's visual needs. At present, the realization of horizontal and vertical screen switching is mainly aimed at the switching of application windows in full-screen mode. The current placement form is calculated by the gravity sensor chip to determine whether to display in horizontal or vertical screen, and then switch windows, and only switch To the same display height and display width as the display height and display width, the switching scene is relatively simple, thus reducing the scope of application of window switching.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供了一种窗口切换方法、装置、存储介质及交互智能平板,可以解决切换的场景比较单一,从而降低了窗口切换的适用范围的问题。所述技术方案如下:Embodiments of the present application provide a window switching method, device, storage medium, and interactive smart tablet, which can solve the problem that switching scenarios are relatively simple, thereby reducing the scope of application of window switching. The technical solution is as follows:
第一方面,本申请实施例提供了一种窗口切换方法,所述方法包括:In a first aspect, an embodiment of the present application provides a window switching method, the method includes:
接收针对显示屏上的目标窗口输入的窗口切换操作,确定切换后所述目标窗口的显示模式,所述显示模式包括横屏模式或竖屏模式;Receive a window switching operation input for the target window on the display screen, and determine the display mode of the target window after switching, and the display mode includes a horizontal screen mode or a vertical screen mode;
获取所述显示屏的分辨率,基于所述分辨率计算所述目标窗口在所述显示模式下的显示高度和显示宽度;Acquire the resolution of the display screen, and calculate the display height and display width of the target window in the display mode based on the resolution;
将所述目标窗口按照所述显示高度和显示宽度进行显示。The target window is displayed according to the display height and display width.
可选的,所述基于所述分辨率计算所述目标窗口在所述显示模式下的显示高度和显示宽度,包括:Optionally, calculating the display height and display width of the target window in the display mode based on the resolution includes:
基于所述分辨率,计算所述目标窗口在所述显示模式下的窗口高度、工具栏高度以及窗口宽度;Based on the resolution, calculating the window height, toolbar height and window width of the target window in the display mode;
将所述窗口高度与工具栏高度的和值作为所述目标窗口在所述显示模式下的显示高度,将所述窗口宽度作为所述目标窗口在所述显示模式下的显示宽度。The sum of the height of the window and the height of the toolbar is used as the display height of the target window in the display mode, and the window width is used as the display width of the target window in the display mode.
可选的,所述分辨率包括显示屏高度和显示屏宽度,当所述显示模式为横屏模式时,所述基于所述分辨率,计算所述目标窗口在所述显示模式下的窗口高度、工具栏高度以及窗口宽度,包括:Optionally, the resolution includes the height of the display screen and the width of the display screen, and when the display mode is the landscape mode, the window height of the target window in the display mode is calculated based on the resolution. , toolbar height, and window width, including:
计算所述显示屏高度与第一预设比值的第一乘积,将所述第一乘积作为所述窗口高度;calculating a first product of the height of the display screen and a first preset ratio, and using the first product as the height of the window;
计算所述显示屏高度与第二预设比值的第二乘积,将所述第二乘积作为所述工具栏高度;calculating a second product of the height of the display screen and a second preset ratio, and using the second product as the height of the toolbar;
计算所述显示屏宽度与第三预设比值的第三乘积,将所述第三乘积作为所述窗口宽度。A third product of the display screen width and a third preset ratio is calculated, and the third product is used as the window width.
可选的,所述分辨率包括显示屏高度和显示屏宽度,所述当所述显示模式为竖屏模式时,所述基于所述窗口高度、所述工具栏高度以及所述窗口宽度确定所述目标窗口在所述显示模式下的显示高度和显示宽度,包括:Optionally, the resolution includes a display screen height and a display screen width, and when the display mode is a portrait screen mode, determining the resolution based on the window height, the toolbar height and the window width. The display height and display width of the target window in the display mode, including:
计算所述显示屏高度与第一预设比值的第一乘积,将所述第一乘积作为所述窗口高度;calculating a first product of the height of the display screen and a first preset ratio, and using the first product as the height of the window;
计算所述显示屏高度与第二预设比值的第二乘积,将所述第二乘积作为所述工具栏高度;calculating a second product of the height of the display screen and a second preset ratio, and using the second product as the height of the toolbar;
计算预设值与所述工具栏高度的差值,将所述差值与第三预设比值的乘积作为所述窗口宽度。Calculate the difference between the preset value and the height of the toolbar, and use the product of the difference and a third preset ratio as the window width.
可选的,所述将所述目标窗口按照所述显示高度和显示宽度进行显示,包括:Optionally, the displaying the target window according to the display height and display width includes:
获取所述目标窗口的预设顶点坐标;obtaining the preset vertex coordinates of the target window;
将所述目标窗口按照所述预设顶点坐标、所述显示高度和显示宽度进行显示。The target window is displayed according to the preset vertex coordinates, the display height and the display width.
可选的,所述将所述目标窗口按照所述预设顶点坐标、所述显示高度和显示宽度进行显示,包括:Optionally, the displaying the target window according to the preset vertex coordinates, the display height and the display width includes:
保持所述目标窗口的预设顶点坐标不变,将所述目标窗口的高度调整为所述显示高度,将所述目标窗口的宽度调整为所述显示宽度;Keeping the preset vertex coordinates of the target window unchanged, adjusting the height of the target window to the display height, and adjusting the width of the target window to the display width;
对调整后的所述目标窗口进行显示。The adjusted target window is displayed.
第二方面,本申请实施例提供了一种窗口切换装置,所述装置包括:In a second aspect, an embodiment of the present application provides a window switching device, and the device includes:
模式确定模块,用于接收针对显示屏上的目标窗口输入的窗口切换操作,确定切换后所述目标窗口的显示模式,所述显示模式包括横屏模式或竖屏模式;a mode determination module, configured to receive a window switching operation input for a target window on the display screen, and determine a display mode of the target window after switching, and the display mode includes a landscape mode or a portrait mode;
宽高获取模块,用于获取所述显示屏的分辨率,基于所述分辨率计算所述目标窗口在所述显示模式下的显示高度和显示宽度;a width and height obtaining module, configured to obtain the resolution of the display screen, and calculate the display height and display width of the target window in the display mode based on the resolution;
窗口显示模块,用于将所述目标窗口按照所述显示高度和显示宽度进行显示。A window display module, configured to display the target window according to the display height and display width.
可选的,所述宽高获取模块,包括:Optionally, the width and height obtaining module includes:
宽高获取单元,用于基于所述分辨率,计算所述目标窗口在所述显示模式下的窗口高度、工具栏高度以及窗口宽度;a width and height acquiring unit, configured to calculate, based on the resolution, the window height, the toolbar height and the window width of the target window in the display mode;
宽高设置单元,用于将所述窗口高度与工具栏高度的和值作为所述目标窗口在所述显示模式下的显示高度,将所述窗口宽度作为所述目标窗口在所述显示模式下的显示宽度。A width and height setting unit, used for taking the sum of the height of the window and the height of the toolbar as the display height of the target window in the display mode, and taking the window width as the target window in the display mode display width.
可选的,所述分辨率包括显示屏高度和显示屏宽度,当所述显示模式为横屏模式时,所述宽高获取单元,具体用于:Optionally, the resolution includes the height of the display screen and the width of the display screen. When the display mode is the landscape mode, the width and height obtaining unit is specifically used for:
计算所述显示屏高度与第一预设比值的第一乘积,将所述第一乘积作为所述窗口高度;calculating a first product of the height of the display screen and a first preset ratio, and using the first product as the height of the window;
计算所述显示屏高度与第二预设比值的第二乘积,将所述第二乘积作为所述工具栏高度;calculating a second product of the height of the display screen and a second preset ratio, and using the second product as the height of the toolbar;
计算所述显示屏宽度与第三预设比值的第三乘积,将所述第三乘积作为所述窗口宽度。A third product of the display screen width and a third preset ratio is calculated, and the third product is used as the window width.
可选的,所述分辨率包括显示屏高度和显示屏宽度,所述当所述显示模式为竖屏模式时,所述宽高获取单元,具体用于:Optionally, the resolution includes the height of the display screen and the width of the display screen, and when the display mode is the vertical screen mode, the width and height obtaining unit is specifically used for:
计算所述显示屏高度与第一预设比值的第一乘积,将所述第一乘积作为所述窗口高度;calculating a first product of the height of the display screen and a first preset ratio, and using the first product as the height of the window;
计算所述显示屏高度与第二预设比值的第二乘积,将所述第二乘积作为所述工具栏高度;calculating a second product of the height of the display screen and a second preset ratio, and using the second product as the height of the toolbar;
计算预设值与所述工具栏高度的差值,将所述差值与第三预设比值的乘积作为所述窗口宽度。Calculate the difference between the preset value and the height of the toolbar, and use the product of the difference and a third preset ratio as the window width.
可选的,所述窗口显示模块,包括:Optionally, the window display module includes:
坐标获取单元,用于获取所述目标窗口的预设顶点坐标;a coordinate obtaining unit, used for obtaining the preset vertex coordinates of the target window;
窗口显示单元,用于将所述目标窗口按照所述预设顶点坐标、所述显示高度和显示宽度进行显示。A window display unit, configured to display the target window according to the preset vertex coordinates, the display height and the display width.
可选的,所述窗口显示单元,具体用于:Optionally, the window display unit is specifically used for:
保持所述目标窗口的预设顶点坐标不变,将所述目标窗口的高度调整为所述显示高度,将所述目标窗口的宽度调整为所述显示宽度;Keeping the preset vertex coordinates of the target window unchanged, adjusting the height of the target window to the display height, and adjusting the width of the target window to the display width;
对调整后的所述目标窗口进行显示。The adjusted target window is displayed.
第三方面,本申请实施例提供一种计算机存储介质,所述计算机存储介质存储有多条指令,所述指令适于由处理器加载并执行上述的方法步骤。In a third aspect, an embodiment of the present application provides a computer storage medium, where the computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the above method steps.
第四方面,本申请实施例提供一种交互智能平板,可包括:处理器和存储器;其中,所述存储器存储有计算机程序,所述计算机程序适于由所述处理器加载并执行上述的方法步骤。In a fourth aspect, an embodiment of the present application provides an interactive smart tablet, which may include: a processor and a memory; wherein the memory stores a computer program, and the computer program is adapted to be loaded by the processor and execute the above method step.
本申请一些实施例提供的技术方案带来的有益效果至少包括:The beneficial effects brought by the technical solutions provided by some embodiments of the present application include at least:
本申请实施例的方案在执行时,通过接收针对显示屏上的目标窗口输入的窗口切换操作,确定切换后所述目标窗口的具体显示模式为横屏模式还是竖屏模式,然后获取所述显示屏的分辨率,并基于所述分辨率计算所述目标窗口在所述显示模式下的显示高度和显示宽度,将所述目标窗口按照所述显示高度和显示宽度进行显示。通过显示屏的分辨率以及窗口切换后的显示模式计算切换后窗口的显示尺寸并进行显示,且可以适用窗口模式、全屏模式、分屏模式等各种模式的应用窗口的切换,同时,还可以针对显示屏上所显示的多个应用窗口分别进行横竖屏的切换,切换场景丰富,适用范围广。When the solutions of the embodiments of the present application are executed, by receiving a window switching operation input for the target window on the display screen, it is determined whether the specific display mode of the target window after switching is a landscape mode or a portrait mode, and then the display mode is obtained. The resolution of the screen is calculated, and the display height and display width of the target window in the display mode are calculated based on the resolution, and the target window is displayed according to the display height and display width. According to the resolution of the display screen and the display mode after the window is switched, the display size of the window after switching is calculated and displayed, and the switching of application windows in various modes such as windowed mode, full-screen mode, and split-screen mode can be applied. Switch between horizontal and vertical screens for multiple application windows displayed on the display screen, with rich switching scenarios and wide application range.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.
图1a和图1b是本申请实施例提供的一种实施场景示意图;1a and 1b are schematic diagrams of an implementation scenario provided by an embodiment of the present application;
图2是本申请实施例提供的一种应用以窗口模式进行显示的界面示意图;2 is a schematic diagram of an interface that an application provided by an embodiment of the present application is displayed in a window mode;
图3是本申请实施例提供的一种应用以分屏模式进行显示的界面示意图;3 is a schematic interface diagram of an application provided in an embodiment of the present application being displayed in a split-screen mode;
图4是本申请实施例提供的一种应用以全屏模式进行显示的界面示意图;4 is a schematic diagram of an interface for displaying an application in a full-screen mode according to an embodiment of the present application;
图5是本申请实施例提供的一种应用以画中画模式进行显示的界面示意图;5 is a schematic diagram of an interface for displaying an application in a picture-in-picture mode according to an embodiment of the present application;
图6是本申请实施例提供的一种窗口切换方法的流程示意图;6 is a schematic flowchart of a window switching method provided by an embodiment of the present application;
图7是本申请实施例提供的一种目标窗口的显示界面示意图;7 is a schematic diagram of a display interface of a target window provided by an embodiment of the present application;
图8a-8c是本申请实施例提供的一种目标窗口的显示模式的举例示意图;8a-8c are exemplary schematic diagrams of a display mode of a target window provided by an embodiment of the present application;
图9是本申请实施例提供的一种切换后目标窗口的显示效果示意图;9 is a schematic diagram of a display effect of a switched target window provided by an embodiment of the present application;
图10是本申请实施例提供的一种切换后目标窗口的显示效果示意图;10 is a schematic diagram of a display effect of a switched target window provided by an embodiment of the present application;
图11是本申请实施例提供的一种窗口切换方法的流程示意图;11 is a schematic flowchart of a window switching method provided by an embodiment of the present application;
图12是本申请实施例提供的一种窗口拉伸切换的举例示意图;FIG. 12 is an exemplary schematic diagram of a window stretching switch provided by an embodiment of the present application;
图13是本申请实施例提供的一种多窗口切换的举例示意图;13 is an exemplary schematic diagram of a multi-window switching provided by an embodiment of the present application;
图14是本申请实施例提供的一种窗口切换装置的结构示意图;14 is a schematic structural diagram of a window switching device provided by an embodiment of the present application;
图15是本申请实施例提供的一种宽高获取模块的结构示意图;15 is a schematic structural diagram of a width and height acquisition module provided by an embodiment of the present application;
图16是本申请实施例提供的一种窗口显示模块的结构示意图;16 is a schematic structural diagram of a window display module provided by an embodiment of the present application;
图17是本申请实施例提供的一种交互智能平板的结构示意图。FIG. 17 is a schematic structural diagram of an interactive smart tablet provided by an embodiment of the present application.
具体实施方式Detailed ways
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施例方式作进一步地详细描述。In order to make the objectives, technical solutions and advantages of the present application clearer, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。Where the following description refers to the drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the illustrative examples below are not intended to represent all implementations consistent with this application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application, as recited in the appended claims.
在本申请的描述中,需要理解的是,术语“第一”、“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性。对于本领域的普通技术人员而言,可以具体情况理解上述术语在本申请中的具体含义。此外,在本申请的描述中,除非另有说明,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。In the description of the present application, it should be understood that the terms "first", "second" and the like are used for descriptive purposes only, and should not be construed as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood in specific situations. Also, in the description of the present application, unless otherwise specified, "a plurality" means two or more. "And/or", which describes the association relationship of the associated objects, means that there can be three kinds of relationships, for example, A and/or B, which can mean that A exists alone, A and B exist at the same time, and B exists alone. The character "/" generally indicates that the associated objects are an "or" relationship.
请参见图1,为本申请实施例提供的一种实施场景的示意图。如图1a所示,所述实施场景可以包括终端,在终端上设置有显示屏,并安装有目标应用,开启目标应用后,目标应用在终端的显示屏的当前显示界面以目标窗口进行显示,所述目标窗口可以窗口模式、分屏模式、全屏模式或画中画模式等模式进行显示。无论以何种模式进行显示,在目标窗口上包括工具栏(也叫标题栏),而在工具栏上可设置功能按钮,如横竖切换按钮、关闭按钮、最大化按钮、最小化按钮、返回按钮等。Please refer to FIG. 1 , which is a schematic diagram of an implementation scenario provided by an embodiment of the present application. As shown in FIG. 1a, the implementation scenario may include a terminal, a display screen is set on the terminal, and a target application is installed. After the target application is started, the target application is displayed on the current display interface of the display screen of the terminal as a target window, The target window can be displayed in a window mode, a split-screen mode, a full-screen mode, or a picture-in-picture mode. Regardless of the display mode, the target window includes a toolbar (also called the title bar), and function buttons can be set on the toolbar, such as horizontal and vertical switching buttons, close buttons, maximize buttons, minimize buttons, and return buttons. Wait.
其中,窗口模式,是指每个应用以单独的窗口进行显示的模式,如图2所示。The window mode refers to a mode in which each application is displayed in a separate window, as shown in FIG. 2 .
分屏模式,是指将显示屏以1:1或1:2或2:1等各比例分成两部分或多部分,每部分显示一个应用,且各应用之间互不重叠的模式。所述分屏模式包括横屏分屏和竖屏分屏。如图3所示为一种可行的分屏显示界面图。The split-screen mode refers to a mode in which the display screen is divided into two or more parts at various ratios such as 1:1, 1:2, or 2:1, each part displays an application, and the applications do not overlap each other. The split screen mode includes horizontal split screen and vertical screen split. As shown in Figure 3, a feasible split-screen display interface diagram is shown.
全屏模式,是指以全屏铺满的大小在显示屏上进行显示的模式,如图4所示。The full-screen mode refers to a mode that displays on the display screen in a full-screen size, as shown in FIG. 4 .
画中画模式,是指一个应用以全屏模式显示,另一个应用在该全屏窗口上以一个小窗口的模式进行显示。如图5所示。本申请实施例中的目标窗口可以为画中画模式中的任一窗口。The picture-in-picture mode means that one application is displayed in full-screen mode, and another application is displayed in a small-window mode on the full-screen window. As shown in Figure 5. The target window in this embodiment of the present application may be any window in the picture-in-picture mode.
其中,所述终端包括但不限于:个人电脑、交互智能平板、手持设备、车载设备、可穿戴设备、计算设备或连接到无线调制解调器的其它处理设备等。在不同的网络中用户终端可以叫做不同的名称,例如:用户设备、接入终端、用户单元、用户站、移动站、移动台、远方站、远程终端、移动设备、用户终端、终端、无线通信设备、用户代理或用户装置、蜂窝电话、无绳电话、个人数字处理(personal digital assistant,PDA)、5G网络或未来演进网络中的终端设备等。The terminals include but are not limited to: personal computers, interactive smart tablets, handheld devices, vehicle-mounted devices, wearable devices, computing devices, or other processing devices connected to wireless modems, and the like. User terminals may be called by different names in different networks, for example: user equipment, access terminal, subscriber unit, subscriber station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication Equipment, user agent or user equipment, cellular phone, cordless phone, personal digital assistant (PDA), terminal equipment in 5G network or future evolution network, etc.
为描述方便,本申请实施例以终端为交互智能平板,且目标窗口以窗口模式进行显示为例进行说明。For the convenience of description, the embodiment of the present application takes the terminal as an interactive smart tablet and the target window is displayed in a window mode as an example for description.
交互智能平板的硬件部分由显示模组、智能处理系统(包括控制器)等部分所构成,由整体结构件结合到一起,同时也由专用的软件系统作为支撑,其中显示模组包括显示屏和背光灯组件,其中显示屏包括透明电导层和液晶层等。The hardware part of the interactive smart panel is composed of a display module, an intelligent processing system (including a controller) and other parts, which are combined by the overall structural parts, and are also supported by a dedicated software system. The display module includes a display screen and a Backlight assembly, wherein the display screen includes a transparent conductive layer and a liquid crystal layer, etc.
显示屏,在本说明书的实施例中,是指触摸屏、触控屏、触控面板,是一种感应式液晶显示装置,当接触了屏幕上的图形按钮时,屏幕上的触觉反馈系统可根据预先编程的程式驱动各种连接装置,可用以取代机械式的按钮面板,并借由液晶显示画面制造出生动的影音效果。从技术原理来区别触摸屏,可以分为五个基本种类;矢量压力传感技术触摸屏、电阻技术触摸屏、电容技术触摸屏、红外线技术触摸屏、表面声波技术触摸屏。按照触摸屏的工作原理和传输信息的介质,可以把触摸屏分为四个种类:电阻式、电容感应式、红外线式以及表面声波式。The display screen, in the embodiments of this specification, refers to a touch screen, a touch screen, and a touch panel, which is an inductive liquid crystal display device. When a graphic button on the screen is touched, the haptic feedback system on the screen can Pre-programmed programs drive various connection devices, which can be used to replace mechanical button panels, and create vivid audio and video effects through the LCD screen. To distinguish the touch screen from the technical principle, it can be divided into five basic categories: vector pressure sensing technology touch screen, resistive technology touch screen, capacitive technology touch screen, infrared technology touch screen, surface acoustic wave technology touch screen. According to the working principle of the touch screen and the medium for transmitting information, the touch screen can be divided into four types: resistive type, capacitive induction type, infrared type and surface acoustic wave type.
当用户用手指或触控笔触摸屏幕时,将该点坐标定位,从而实现对智能处理系统的控制,然后随着智能处理系统内置的软件来实现不同的功能应用。When the user touches the screen with a finger or a stylus, the coordinates of the point are positioned, so as to realize the control of the intelligent processing system, and then different functional applications can be realized with the built-in software of the intelligent processing system.
本申请实施例中,交互智能平板的显示屏显示某个界面与交互智能平板的显示模组显示该界面的含义是相同的。In the embodiment of the present application, the display screen of the interactive smart tablet displays a certain interface and the display module of the interactive smart tablet has the same meaning as displaying the interface.
在本申请中所提到的“屏幕”、“大屏”均指智能交互平板的显示屏;智能交互平板显示某个界面是指智能交互平板的显示屏显示该界面。The "screen" and "large screen" mentioned in this application both refer to the display screen of the intelligent interactive tablet; the display of a certain interface by the intelligent interactive tablet means that the display screen of the intelligent interactive tablet displays the interface.
如图1a所示,交互智能平板接收针对显示屏上的目标窗口输入的窗口切换指令,确定切换后所述目标窗口的显示模式,所述显示模式为横屏模式或竖屏模式;As shown in Figure 1a, the interactive smart tablet receives a window switching instruction input for the target window on the display screen, and determines the display mode of the target window after switching, and the display mode is a horizontal screen mode or a vertical screen mode;
其中,所输入的窗口切换指令可以为点击窗口工具栏上的窗口切换按钮(如横竖切换按钮),从而可以改变目标窗口的显示模式。The inputted window switching instruction may be clicking a window switching button (such as a horizontal and vertical switching button) on the window tool bar, so that the display mode of the target window can be changed.
目标窗口在不同的显示模式下显示的窗口尺寸不同。所述显示模式包括横屏模式和竖屏模式。若当前为横屏模式,则切换后变为竖屏模式。The target window displays different window sizes in different display modes. The display modes include landscape mode and portrait mode. If it is currently in landscape mode, it will change to portrait mode after switching.
交互智能平板获取所述显示屏的分辨率,并基于所述分辨率计算所述目标窗口在所述显示模式下的显示高度和显示宽度;The interactive smart tablet obtains the resolution of the display screen, and calculates the display height and display width of the target window in the display mode based on the resolution;
其中,交互智能平板可基于显示屏的分辨率,计算所述目标窗口在所述显示模式下的窗口高度、工具栏高度以及窗口宽度,再将所述窗口高度与工具栏高度的和值作为所述目标窗口在所述显示模式下的显示高度,将所述窗口宽度作为所述目标窗口在所述显示模式下的显示宽度。Wherein, the interactive smart tablet can calculate the window height, toolbar height and window width of the target window in the display mode based on the resolution of the display screen, and then use the sum of the window height and the toolbar height as the The display height of the target window in the display mode, and the window width is used as the display width of the target window in the display mode.
具体的,分辨率是指屏幕显示的分辨率,以水平像素(显示屏宽度)和垂直像素(显示屏高度)来衡量。分辨率低时(例如640x480,单位为px),在屏幕上显示的像素少,但尺寸比较大。分辨率高时(例如1600x1200,单位为px),在屏幕上显示的像素多,但尺寸比较小。Specifically, the resolution refers to the resolution of the screen display, which is measured in horizontal pixels (display width) and vertical pixels (display height). When the resolution is low (such as 640x480, the unit is px), there are fewer pixels displayed on the screen, but the size is relatively large. When the resolution is high (such as 1600x1200, the unit is px), more pixels are displayed on the screen, but the size is relatively small.
当所述显示模式为横屏模式时,计算所述显示屏高度与第一预设比值的第一乘积,将所述第一乘积作为所述窗口高度;计算所述显示屏高度与第二预设比值的第二乘积,将所述第二乘积作为所述工具栏高度;计算所述显示屏宽度与第三预设比值的第三乘积,将所述第三乘积作为所述窗口宽度。When the display mode is the landscape mode, the first product of the height of the display screen and the first preset ratio is calculated, and the first product is used as the height of the window; the height of the display screen and the second preset ratio are calculated. A second product of ratios is set, and the second product is used as the height of the toolbar; a third product of the display screen width and a third preset ratio is calculated, and the third product is used as the window width.
当所述显示模式为竖屏模式时,计算所述显示屏高度与第一预设比值的第一乘积,将所述第一乘积作为所述窗口高度;计算所述显示屏高度与第二预设比值的第二乘积,将所述第二乘积作为所述工具栏高度;计算预设值与所述工具栏高度的差值,将所述差值与第三预设比值的乘积作为所述窗口宽度。When the display mode is the vertical screen mode, calculate the first product of the height of the display screen and the first preset ratio, and use the first product as the height of the window; calculate the height of the display screen and the second preset ratio Set the second product of the ratios, and use the second product as the height of the toolbar; calculate the difference between the preset value and the height of the toolbar, and use the product of the difference and the third preset ratio as the height of the toolbar. window width.
所述第一预设比值、所述第二预设比值以及所述第三预设比值可以相同,也可以不同。The first preset ratio, the second preset ratio and the third preset ratio may be the same or different.
最后,交互智能平板将所述目标窗口按照所述显示高度和显示宽度进行显示。Finally, the interactive smart tablet displays the target window according to the display height and display width.
也就是将所述目标窗口的高度调整为所述显示高度,将所述目标窗口的宽度调整为所述显示宽度,然后对调整后的所述目标窗口进行显示。That is, the height of the target window is adjusted to the display height, the width of the target window is adjusted to the display width, and then the adjusted target window is displayed.
调整后的目标窗口可显示在显示屏的任意位置。一种可行的方式为,获取所述目标窗口的预设顶点坐标,保持所述目标窗口的预设顶点坐标不变,再调整显示高度和显示宽度。所述预设顶点坐标可以为左上角顶点坐标、右上角顶点坐标、左下角顶点坐标或右下角顶点坐标。还可以为中心点坐标或预设的目标窗口上任一点坐标。The adjusted target window can be displayed anywhere on the display. A feasible way is to obtain the preset vertex coordinates of the target window, keep the preset vertex coordinates of the target window unchanged, and then adjust the display height and display width. The preset vertex coordinates may be the upper left vertex coordinates, the upper right vertex coordinates, the lower left vertex coordinates or the lower right vertex coordinates. It can also be the coordinates of the center point or the coordinates of any point on the preset target window.
当然,也可再切换到目标模式后,再点击工具栏上的横竖切换按钮再返回至切换前的显示模式,如图1b所示。具体切换过程与上述方式相同,此处不再具体描述。Of course, after switching to the target mode, click the horizontal and vertical switching buttons on the toolbar to return to the display mode before switching, as shown in Figure 1b. The specific handover process is the same as the above-mentioned manner, and will not be described in detail here.
本申请实施例的方案在执行时,通过接收针对显示屏上的目标窗口输入的窗口切换指令,确定切换后所述目标窗口的具体显示模式为横屏模式还是竖屏模式,然后获取所述显示屏的分辨率,并基于所述分辨率计算所述目标窗口在所述显示模式下的显示高度和显示宽度,将所述目标窗口按照所述显示高度和显示宽度进行显示。通过显示屏的分辨率以及窗口切换后的显示模式计算切换后窗口的显示尺寸并进行显示,且可以适用窗口模式、全屏模式、分屏模式等各种模式的应用窗口的切换,同时,还可以针对显示屏上所显示的多个应用窗口分别进行横竖屏的切换,切换场景丰富,适用范围广。When the solutions of the embodiments of the present application are executed, by receiving a window switching instruction input for the target window on the display screen, it is determined whether the specific display mode of the target window after switching is the horizontal screen mode or the vertical screen mode, and then the display mode is obtained. The resolution of the screen is calculated, and the display height and display width of the target window in the display mode are calculated based on the resolution, and the target window is displayed according to the display height and display width. According to the resolution of the display screen and the display mode after the window is switched, the display size of the window after switching is calculated and displayed, and the switching of application windows in various modes such as windowed mode, full-screen mode, and split-screen mode can be applied. Switch between horizontal and vertical screens for multiple application windows displayed on the display screen, with rich switching scenarios and wide application range.
下面将结合附图6-附图11,对本申请实施例提供的窗口切换方法进行详细介绍。该方法可依赖于计算机程序实现,可运行于基于冯诺依曼体系的元素展示装置上。该计算机程序可集成在应用中,也可作为独立的工具类应用运行。The window switching method provided by the embodiment of the present application will be described in detail below with reference to FIG. 6 to FIG. 11 . The method can be implemented by means of a computer program, and can be run on an element display device based on the von Neumann system. The computer program can be integrated into an application or run as a stand-alone utility application.
请参见图6,为本申请实施例提供的一种窗口切换方法的流程示意图。如图1所示,本申请实施例的所述方法可以包括以下步骤:Please refer to FIG. 6 , which is a schematic flowchart of a method for switching windows according to an embodiment of the present application. As shown in FIG. 1 , the method of the embodiment of the present application may include the following steps:
S101,接收针对显示屏上的目标窗口输入的窗口切换操作,确定切换后所述目标窗口的显示模式,所述显示模式包括横屏模式或竖屏模式;S101, receiving a window switching operation input for a target window on a display screen, and determining a display mode of the target window after switching, where the display mode includes a landscape mode or a portrait mode;
目标窗口是指在窗口切换装置的显示屏的当前显示界面所显示的应用窗口。若在当前显示界面上显示有多个应用窗口,目标窗口即为用户在这多个应用窗口中所选中的应用窗口。The target window refers to the application window displayed on the current display interface of the display screen of the window switching device. If there are multiple application windows displayed on the current display interface, the target window is the application window selected by the user among the multiple application windows.
例如,如图2所示,在显示屏上显示有3个应用窗口,分别对应应用1、应用2和应用3,若用户通过鼠标等外设或手指或触控笔选择应用1的窗口,则应用1的窗口即为目标窗口。For example, as shown in Figure 2, there are 3 application windows displayed on the display screen, corresponding to application 1, application 2 and application 3 respectively. The window of application 1 is the target window.
在目标窗口包括窗体以及工具栏,如图7所示,窗体用于显示多媒体信息,窗体包括窗口宽度以及窗口高度。工具栏包括工具栏高度以及工具栏宽度,通常,工具栏宽度与窗口宽度相同。同时,在工具栏上可设置有不同的功能按钮,如返回按钮、横竖切换按钮、最大化按钮、最小化按钮以及关闭按钮等。The target window includes a window and a toolbar. As shown in FIG. 7 , the window is used to display multimedia information, and the window includes a window width and a window height. The toolbar includes the height of the toolbar and the width of the toolbar. Usually, the width of the toolbar is the same as the width of the window. At the same time, different function buttons can be set on the toolbar, such as a back button, a horizontal and vertical switch button, a maximize button, a minimize button, and a close button.
该目标窗口可以不同的模式显示在当前显示界面,如全屏模式、分屏模式、桌面模式、画中画模式等。The target window can be displayed on the current display interface in different modes, such as full-screen mode, split-screen mode, desktop mode, picture-in-picture mode, and the like.
以目标窗口显示为窗口模式为例,一种可行的方式为,当在桌面模式(即开机启动后,默认显示桌面程序,有且仅有一个桌面程序)下,启动目标应用时,创建应用task,然后将该应用task加载到全屏模式栈(stack,如stackid=1)中,从而开启目标窗口,且目标窗口以全屏模式显示,再将该窗口设置为窗口模式。另一种可行的实现方式为,在桌面模式下,启动目标应用时,创建应用task,然后将该应用task加载到窗口模式栈(stack,如stackid=2)中,该目标应用直接以窗口模式显示。Taking the target window displayed as window mode as an example, a feasible way is to create an application task when the target application is started in desktop mode (that is, after booting, the desktop program is displayed by default, and there is only one desktop program). , and then load the application task into the full-screen mode stack (stack, for example, stackid=1), so as to open the target window, and the target window is displayed in full-screen mode, and then set the window to window mode. Another feasible implementation method is, in the desktop mode, when the target application is started, an application task is created, and then the application task is loaded into the window mode stack (stack, for example, stackid=2), and the target application is directly in the window mode. show.
其中,task用于容纳应用程序,每个应用程序显示所必需的容器,每一个task就是一个窗口。stack是用于容纳task的容器。目前Android系统只定义了6个stack,分别是:Among them, tasks are used to accommodate applications, each application displays the necessary containers, and each task is a window. A stack is a container for holding tasks. At present, the Android system only defines 6 stacks, which are:
桌面模式stack,stackid=0,该stack只有一个task,即只有一个应用程序。该应用程序就是系统桌面程序;In the desktop mode stack, stackid=0, the stack has only one task, that is, only one application. This application is the system desktop program;
全屏模式stack,stackid=1,该stack用于容纳所有全屏显示的task;Full-screen mode stack, stackid=1, the stack is used to accommodate all full-screen tasks;
窗口模式stack,stackid=2,该stack用于容纳所有以窗口显示的task;Window mode stack, stackid=2, this stack is used to accommodate all tasks displayed in windows;
分屏模式stack,stackid=3,该stack用于容纳所有分屏显示的task;Split-screen mode stack, stackid=3, this stack is used to accommodate all tasks displayed in split-screen;
画中画模式stack,stackid=4,该stack用于容纳画中画显示的task,仅有一个task;Picture-in-picture mode stack, stackid=4, the stack is used to accommodate the task displayed by the picture-in-picture, and there is only one task;
最近应用stack,stackid=5,该stack用于所用最近打开过的应用task。Recent application stack, stackid=5, this stack is used for the recently opened application task.
具体实现中,所输入的窗口切换指令可以为针对窗口工具栏上的切换按钮输入,也可以为通过语音方式输入。在窗口切换装置检测到窗口切换指令时,若显示只包括两种模式,如横屏模式和竖屏模式,则首先确定当前的显示模式,从而可确定切换后的显示模式。若显示模式多于两种,如横屏模式、竖屏模式、斜屏模式,则可通过用户在这多个显示模式中所选择的模式确定切换后的显示模式。In a specific implementation, the inputted window switching instruction may be input for the switching button on the window toolbar, or may be input by voice. When the window switching device detects a window switching instruction, if the display includes only two modes, such as a landscape mode and a portrait mode, the current display mode is first determined, so that the switched display mode can be determined. If there are more than two display modes, such as a horizontal screen mode, a vertical screen mode, and an oblique screen mode, the switched display mode may be determined by the mode selected by the user among the plurality of display modes.
所述横屏模式可理解为目标窗口的显示宽度大于显示高度,且窗口的宽和高分别与显示屏的宽和高平行,如图8a所示。The landscape mode can be understood as the display width of the target window is greater than the display height, and the width and height of the window are respectively parallel to the width and height of the display screen, as shown in FIG. 8 a .
竖屏模式可理解为目标窗口的显示宽度小于显示高度,且窗口的宽和高分别与显示屏的宽和高平行,如图8b所示。The vertical screen mode can be understood as the display width of the target window is smaller than the display height, and the width and height of the window are respectively parallel to the width and height of the display screen, as shown in Figure 8b.
斜屏模式可理解为目标窗口的宽与显示屏的宽平行且窗口的高与显示屏的高具有一定倾斜度,或者目标窗口的高与显示屏的高平行且窗口的宽与显示屏的宽具有一定倾斜度,如图8c所示。The slanted screen mode can be understood as the width of the target window is parallel to the width of the display screen and the height of the window is inclined to the height of the display screen, or the height of the target window is parallel to the height of the display screen and the width of the window is the same as the width of the display screen. with a certain slope, as shown in Figure 8c.
S102,获取所述显示屏的分辨率,基于所述分辨率计算所述目标窗口在所述显示模式下的显示高度和显示宽度;S102, obtaining the resolution of the display screen, and calculating the display height and display width of the target window in the display mode based on the resolution;
分辨率是指屏幕显示的分辨率,如3840px*2160px,以水平像素(显示屏宽度)和垂直像素(显示屏高度)来衡量。分辨率低时,在屏幕上显示的像素少,但尺寸比较大。分辨率高时,在屏幕上显示的像素多,但尺寸比较小。Resolution refers to the resolution of the screen display, such as 3840px*2160px, measured in horizontal pixels (display width) and vertical pixels (display height). When the resolution is low, fewer pixels are displayed on the screen, but the size is larger. When the resolution is high, more pixels are displayed on the screen, but the size is relatively small.
具体的,基于所述分辨率可以计算所述目标窗口在所述显示模式下的窗口高度h1、工具栏高度h2以及窗口宽度w1,然后将所述窗口高度h1与工具栏高度h2的和值(h1+h2)作为所述目标窗口在所述显示模式下的显示高度h,将所述窗口宽度w1作为所述目标窗口在所述显示模式下的显示宽度w。Specifically, based on the resolution, the window height h1, the toolbar height h2 and the window width w1 of the target window in the display mode can be calculated, and then the sum of the window height h1 and the toolbar height h2 ( h1+h2) is used as the display height h of the target window in the display mode, and the window width w1 is used as the display width w of the target window in the display mode.
其中,若目标窗口切换后为横屏模式,计算所述显示屏高度h0与第一预设比值x1的第一乘积(h0*x1),将所述第一乘积作为所述窗口高度h1=h0*x1;计算所述显示屏高度h0与第二预设比值x2的第二乘积(h0*x2),将所述第二乘积作为所述工具栏高度h2=h0*x2;计算所述显示屏宽度w0与第三预设比值x3的第三乘积(w0*x3),将所述第三乘积作为所述窗口宽度w1=w0*x3。Wherein, if the target window is switched to landscape mode, the first product (h0*x1) of the display screen height h0 and the first preset ratio x1 is calculated, and the first product is taken as the window height h1=h0 *x1; calculate the second product (h0*x2) of the display screen height h0 and the second preset ratio x2, and use the second product as the toolbar height h2=h0*x2; calculate the display screen The third product (w0*x3) of the width w0 and the third preset ratio x3, the third product is taken as the window width w1=w0*x3.
若目标窗口切换后为竖屏模式,计算所述显示屏高度h0与第一预设比值x1的第一乘积(h0*x1),将所述第一乘积作为所述窗口高度h1=h0*x1;计算所述显示屏高度h0与第二预设比值x2的第二乘积(h0*x2),将所述第二乘积作为所述工具栏高度h2=h0*x2;计算预设值x与所述工具栏高度h2的差值x-h2,将所述差值x-h2与第三预设比值x3的乘积作为所述窗口宽度w=(x-h2)*x3。If the target window is switched to portrait mode, calculate the first product (h0*x1) of the display screen height h0 and the first preset ratio x1, and use the first product as the window height h1=h0*x1 ; Calculate the second product (h0*x2) of the height h0 of the display screen and the second preset ratio x2, and use the second product as the height of the toolbar h2=h0*x2; Calculate the preset value x and the The difference value x-h2 of the toolbar height h2, and the product of the difference value x-h2 and the third preset ratio x3 is taken as the window width w=(x-h2)*x3.
第一预设比值x1、第二预设比值x2以及第三预设比值x3可以相同,可以不同,此处不作具体限定。需要说明的是,第一预设比值x1、第二预设比值x2以及第三预设比值x3为开发人员预先设定的。开发人员可对所设定的第一预设比值x1、第二预设比值x2以及第三预设比值x3进行修改。The first preset ratio x1, the second preset ratio x2, and the third preset ratio x3 may be the same or different, which are not specifically limited herein. It should be noted that the first preset ratio x1, the second preset ratio x2, and the third preset ratio x3 are preset by the developer. The developer can modify the set first preset ratio x1, second preset ratio x2, and third preset ratio x3.
S103,将所述目标窗口按照所述显示高度和显示宽度进行显示。S103: Display the target window according to the display height and display width.
具体实现中,在确定了目标窗口切换后的显示高度和显示宽度后,则将当前的显示高度和显示宽度进行调整并显示。需要说明的是,可理解为在调整前后,工具栏的显示高度不变。In a specific implementation, after the display height and display width of the target window after switching are determined, the current display height and display width are adjusted and displayed. It should be noted that, it can be understood that the display height of the toolbar remains unchanged before and after the adjustment.
其中,调整后的目标窗口可在显示屏上的任一显示区域显示。优选的,可设定目标窗口在切换前后保持某点的坐标不变,如左上角顶点不变或左下角顶点不变或右上角顶点不变或右下角顶点不变或中心点不变等。The adjusted target window can be displayed in any display area on the display screen. Preferably, the target window can be set to keep the coordinates of a certain point unchanged before and after switching, for example, the upper left vertex remains unchanged, the lower left vertex remains unchanged, the upper right vertex remains unchanged, the lower right vertex remains unchanged, or the center point remains unchanged.
例如,若切换前的目标窗口显示界面如图8a所示,若保持左上角顶点坐标不变,则切换后的目标窗口显示界面可如图8b所示,若保持右上角顶点坐标不变,则切换后的目标窗口显示界面可如图9所示,若保持中心点坐标不变,则切换后的目标窗口显示界面可如图10所示。For example, if the display interface of the target window before switching is shown in Figure 8a, if the coordinates of the upper left corner vertex are kept unchanged, the display interface of the target window after switching can be as shown in Figure 8b. If the coordinates of the upper right corner vertex are kept unchanged, then The display interface of the target window after switching may be as shown in FIG. 9 . If the coordinates of the center point are kept unchanged, the display interface of the target window after switching may be as shown in FIG. 10 .
本申请实施例的方案在执行时,通过接收针对显示屏上的目标窗口输入的窗口切换操作,确定切换后所述目标窗口的具体显示模式为横屏模式还是竖屏模式,然后获取所述显示屏的分辨率,并基于所述分辨率计算所述目标窗口在所述显示模式下的显示高度和显示宽度,将所述目标窗口按照所述显示高度和显示宽度进行显示。通过显示屏的分辨率以及窗口切换后的显示模式计算切换后窗口的显示尺寸并进行显示,且可以适用窗口模式、全屏模式、分屏模式等各种模式的应用窗口的切换,同时,还可以针对显示屏上所显示的多个应用窗口分别进行横竖屏的切换,切换场景丰富,适用范围广。When the solutions of the embodiments of the present application are executed, by receiving a window switching operation input for the target window on the display screen, it is determined whether the specific display mode of the target window after switching is a landscape mode or a portrait mode, and then the display mode is obtained. The resolution of the screen is calculated, and the display height and display width of the target window in the display mode are calculated based on the resolution, and the target window is displayed according to the display height and display width. According to the resolution of the display screen and the display mode after the window is switched, the display size of the window after switching is calculated and displayed, and the switching of application windows in various modes such as windowed mode, full-screen mode, and split-screen mode can be applied. Switch between horizontal and vertical screens for multiple application windows displayed on the display screen, with rich switching scenarios and wide application range.
请参见图11,为本申请实施例提供的一种窗口切换方法的流程示意图。本实施例以窗口切换方法应用于交互智能平板中来举例说明。该窗口切换方法可以包括以下步骤:Please refer to FIG. 11 , which is a schematic flowchart of a method for switching windows according to an embodiment of the present application. In this embodiment, the window switching method is applied to an interactive smart tablet for illustration. The window switching method may include the following steps:
S201,接收针对显示屏上的目标窗口输入的窗口切换操作,确定切换后所述目标窗口的显示模式,所述显示模式包括横屏模式或竖屏模式;S201, receiving a window switching operation input for a target window on a display screen, and determining a display mode of the target window after switching, where the display mode includes a landscape mode or a portrait mode;
具体可参见S101,此处不再赘述。For details, refer to S101, which will not be repeated here.
S202,获取所述显示屏的分辨率,基于所述分辨率,计算所述目标窗口在所述显示模式下的窗口高度、工具栏高度以及窗口宽度;S202, obtaining the resolution of the display screen, and calculating the window height, toolbar height and window width of the target window in the display mode based on the resolution;
分辨率是指屏幕显示的分辨率,如3840px*2160px,以水平像素(显示屏宽度)和垂直像素(显示屏高度)来衡量。分辨率低时,在屏幕上显示的像素少,但尺寸比较大。分辨率高时,在屏幕上显示的像素多,但尺寸比较小。Resolution refers to the resolution of the screen display, such as 3840px*2160px, measured in horizontal pixels (display width) and vertical pixels (display height). When the resolution is low, fewer pixels are displayed on the screen, but the size is larger. When the resolution is high, more pixels are displayed on the screen, but the size is relatively small.
具体的,基于所述分辨率可以计算所述目标窗口在所述显示模式下的窗口高度h1、工具栏高度h2以及窗口宽度w1。Specifically, based on the resolution, the window height h1 , the toolbar height h2 and the window width w1 of the target window in the display mode may be calculated.
其中,若目标窗口切换后为横屏模式,计算所述显示屏高度h0与第一预设比值x1的第一乘积(h0*x1),将所述第一乘积作为所述窗口高度h1=h0*x1;计算所述显示屏高度h0与第二预设比值x2的第二乘积(h0*x2),将所述第二乘积作为所述工具栏高度h2=h0*x2;计算所述显示屏宽度w0与第三预设比值x3的第三乘积(w0*x3),将所述第三乘积作为所述窗口宽度w1=w0*x3。Wherein, if the target window is switched to landscape mode, calculate the first product (h0*x1) of the display screen height h0 and the first preset ratio x1, and use the first product as the window height h1=h0 *x1; calculate the second product (h0*x2) of the display screen height h0 and the second preset ratio x2, and use the second product as the toolbar height h2=h0*x2; calculate the display screen The third product (w0*x3) of the width w0 and the third preset ratio x3, the third product is taken as the window width w1=w0*x3.
例如,若分辨率为w0*h0=3840px*2160px,x1=1/2,x2=1/18,x3=1/2,那么h1=2160*1/2=1080px,h2=2160*1/18=120px,w1=3840*1/2=1920px。For example, if the resolution is w0*h0=3840px*2160px, x1=1/2, x2=1/18, x3=1/2, then h1=2160*1/2=1080px, h2=2160*1/18 =120px, w1=3840*1/2=1920px.
若目标窗口切换后为竖屏模式,计算所述显示屏高度h0与第一预设比值x1的第一乘积(h0*x1),将所述第一乘积作为所述窗口高度h1=h0*x1;计算所述显示屏高度h0与第二预设比值x2的第二乘积(h0*x2),将所述第二乘积作为所述工具栏高度h2=h0*x2;计算预设值x与所述工具栏高度h2的差值x-h2,将所述差值x-h2与第三预设比值x3的乘积作为所述窗口宽度w1=(x-h2)*x3。If the target window is switched to portrait mode, calculate the first product (h0*x1) of the display screen height h0 and the first preset ratio x1, and use the first product as the window height h1=h0*x1 ; Calculate the second product (h0*x2) of the height h0 of the display screen and the second preset ratio x2, and use the second product as the height of the toolbar h2=h0*x2; Calculate the preset value x and the The difference value x-h2 of the toolbar height h2, and the product of the difference value x-h2 and the third preset ratio x3 is taken as the window width w1=(x-h2)*x3.
例如,若分辨率为w0*h0=3840px*2160px,x1=1/2,x2=1/18,x3=9/16,x=1200px,那么h1=2160*1/2=1080px,h2=2160*1/18=120px,w1=(1200-120)*9/16=608px。For example, if the resolution is w0*h0=3840px*2160px, x1=1/2, x2=1/18, x3=9/16, x=1200px, then h1=2160*1/2=1080px, h2=2160 *1/18=120px, w1=(1200-120)*9/16=608px.
需要说明的是,第一预设比值x1、第二预设比值x2以及第三预设比值x3为开发人员预先设定的。开发人员可对所设定的第一预设比值x1、第二预设比值x2以及第三预设比值x3进行修改。It should be noted that the first preset ratio x1, the second preset ratio x2, and the third preset ratio x3 are preset by the developer. The developer can modify the set first preset ratio x1, second preset ratio x2, and third preset ratio x3.
S203,将所述窗口高度与工具栏高度的和值作为所述目标窗口在所述显示模式下的显示高度,将所述窗口宽度作为所述目标窗口在所述显示模式下的显示宽度;S203, taking the sum of the height of the window and the height of the toolbar as the display height of the target window in the display mode, and taking the window width as the display width of the target window in the display mode;
具体的,将所述窗口高度h1与工具栏高度h2的和值(h1+h2)作为所述目标窗口在所述显示模式下的显示高度h,将所述窗口宽度w1作为所述目标窗口在所述显示模式下的显示宽度w。Specifically, the sum of the window height h1 and the toolbar height h2 (h1+h2) is used as the display height h of the target window in the display mode, and the window width w1 is used as the target window in The display width w in the display mode.
因此,若分辨率为w0*h0=3840px*2160px时,当目标窗口切换后为横屏模式时,h=h1+h2=1080px+120px=1200px,w=w1=1920px;当目标窗口切换后为竖屏模式时,h=h1+h2=1080px+120px=1200px,w=w1=608px。Therefore, if the resolution is w0*h0=3840px*2160px, when the target window is switched to landscape mode, h=h1+h2=1080px+120px=1200px, w=w1=1920px; when the target window is switched, it is In portrait mode, h=h1+h2=1080px+120px=1200px, w=w1=608px.
S204,获取所述目标窗口的预设顶点坐标;S204, obtaining preset vertex coordinates of the target window;
所述预设顶点坐标可以为目标窗口所包含的任一个或多个顶点坐标。例如,当目标窗口为矩形时,该预设顶点坐标可以为4个顶点中的任一顶点坐标。当目标窗口为六边形时,该预设顶点坐标可以为6个顶点中的任一顶点坐标。The preset vertex coordinates may be any one or more vertex coordinates contained in the target window. For example, when the target window is a rectangle, the preset vertex coordinate may be any vertex coordinate among the four vertices. When the target window is a hexagon, the preset vertex coordinate may be any vertex coordinate among the 6 vertices.
S205,保持所述目标窗口的预设顶点坐标不变,将所述目标窗口的高度调整为所述显示高度,将所述目标窗口的宽度调整为所述显示宽度;S205, keeping the preset vertex coordinates of the target window unchanged, adjusting the height of the target window to the display height, and adjusting the width of the target window to the display width;
保持所述目标窗口的预设顶点坐标不变,可以理解为,在切换前后,该顶点位置不变且在目标窗口的地位不变,即若在切换前,目标窗口的左上角顶点在显示屏上的A点,在切换后,目标窗口的左上角顶点仍然在显示屏上的A点。还可理解为,在切换前后,该顶点位置不变当在目标窗口的地位改变,即若在切换前,目标窗口的左上角顶点在显示屏上的A点,在切换后,目标窗口的右上角顶点在显示屏上的A点。Keeping the preset vertex coordinates of the target window unchanged, it can be understood that before and after the switch, the position of the vertex does not change and its position in the target window does not change, that is, if before the switch, the upper left corner vertex of the target window is on the display screen. After switching, the upper left corner of the target window is still at point A on the display. It can also be understood that before and after the switch, the position of the vertex does not change when the position of the target window changes, that is, if the vertex of the upper left corner of the target window is at point A on the display screen before the switch, after the switch, the upper right corner of the target window is at point A. The corner vertex is at point A on the display.
S206,对调整后的所述目标窗口进行显示。S206, display the adjusted target window.
可选的,在显示目标窗口后,还可采用鼠标等外设或者手指拖动目标窗口的边缘,从而可改变该窗口的窗口大小。Optionally, after the target window is displayed, peripheral devices such as a mouse or a finger may be used to drag the edge of the target window, so that the window size of the window can be changed.
例如,如图12所示,当用手指选中目标窗口的右边框后向右拉伸,从而可以将目标窗口切换后的显示宽度调宽。For example, as shown in FIG. 12 , when the right border of the target window is selected with a finger and then stretched to the right, the display width of the target window after switching can be widened.
可选的,当在显示屏上显示有多个应用窗口时,可分别针对每个应用窗口计算切换后的显示高度和显示宽度以对各应用窗口分别进行切换。Optionally, when multiple application windows are displayed on the display screen, the switched display height and display width may be calculated for each application window to switch each application window respectively.
这多个应用窗口可以同时从横屏模式切换为竖屏模式,或从竖屏模式切换为横屏模式,也可以分别从横屏模式切换为竖屏模式以及从竖屏模式切换为横屏模式。These multiple application windows can be switched from landscape mode to portrait mode at the same time, or from portrait mode to landscape mode, and can also be switched from landscape mode to portrait mode and from portrait mode to landscape mode respectively. .
例如,如图13所示,在显示屏上以窗口模式显示目标窗口1和目标窗口2,分别点击两窗口上的横竖切换按钮,从而可以将目标窗口1切换为竖屏模式,将目标窗口2切换为横屏模式。For example, as shown in Figure 13, display target window 1 and target window 2 in window mode on the display screen, and click the horizontal and vertical switching buttons on the two windows respectively, so that target window 1 can be switched to vertical screen mode, and target window 2 can be switched to vertical screen mode. Switch to landscape mode.
本申请实施例的方案在执行时,通过接收针对显示屏上的目标窗口输入的窗口切换操作,确定切换后所述目标窗口的具体显示模式为横屏模式还是竖屏模式,然后获取所述显示屏的分辨率,并基于所述分辨率计算所述目标窗口在所述显示模式下的显示高度和显示宽度,将所述目标窗口按照所述显示高度和显示宽度进行显示。通过显示屏的分辨率以及窗口切换后的显示模式计算切换后窗口的显示尺寸并进行显示,且可以适用窗口模式、全屏模式、分屏模式等各种模式的应用窗口的切换,同时,还可以针对显示屏上所显示的多个应用窗口分别进行横竖屏的切换,切换场景丰富,适用范围广。When the solutions of the embodiments of the present application are executed, by receiving a window switching operation input for the target window on the display screen, it is determined whether the specific display mode of the target window after switching is a landscape mode or a portrait mode, and then the display mode is obtained. The resolution of the screen is calculated, and the display height and display width of the target window in the display mode are calculated based on the resolution, and the target window is displayed according to the display height and display width. According to the resolution of the display screen and the display mode after the window is switched, the display size of the window after switching is calculated and displayed, and the switching of application windows in various modes such as windowed mode, full-screen mode, and split-screen mode can be applied. Switch between horizontal and vertical screens for multiple application windows displayed on the display screen, with rich switching scenarios and wide application range.
下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。The following are apparatus embodiments of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
请参见图14,其示出了本申请一个示例性实施例提供的窗口切换装置的结构示意图。该窗口切换装置可以通过软件、硬件或者两者的结合实现成为终端的全部或一部分。该装置1包括指令接收模块10、宽高获取模块20和窗口显示模块30。Please refer to FIG. 14 , which shows a schematic structural diagram of a window switching apparatus provided by an exemplary embodiment of the present application. The window switching device can be implemented as all or a part of the terminal through software, hardware or a combination of the two. The device 1 includes an
模式确定模块10,用于接收针对显示屏上的目标窗口输入的窗口切换操作,确定切换后所述目标窗口的显示模式,所述显示模式包括横屏模式或竖屏模式;A
宽高获取模块20,用于获取所述显示屏的分辨率,基于所述分辨率计算所述目标窗口在所述显示模式下的显示高度和显示宽度;A width and
窗口显示模块30,用于将所述目标窗口按照所述显示高度和显示宽度进行显示。The
可选的,如图15所示,所述宽高获取模块20,包括:Optionally, as shown in FIG. 15 , the width and
宽高获取单元201,用于基于所述分辨率,计算所述目标窗口在所述显示模式下的窗口高度、工具栏高度以及窗口宽度;A width and
宽高设置单元202,用于将所述窗口高度与工具栏高度的和值作为所述目标窗口在所述显示模式下的显示高度,将所述窗口宽度作为所述目标窗口在所述显示模式下的显示宽度。The width and
可选的,所述分辨率包括显示屏高度和显示屏宽度,当所述显示模式为横屏模式时,所述宽高获取单元201,具体用于:Optionally, the resolution includes the height of the display screen and the width of the display screen. When the display mode is the landscape mode, the width and
计算所述显示屏高度与第一预设比值的第一乘积,将所述第一乘积作为所述窗口高度;calculating a first product of the height of the display screen and a first preset ratio, and using the first product as the height of the window;
计算所述显示屏高度与第二预设比值的第二乘积,将所述第二乘积作为所述工具栏高度;calculating a second product of the height of the display screen and a second preset ratio, and using the second product as the height of the toolbar;
计算所述显示屏宽度与第三预设比值的第三乘积,将所述第三乘积作为所述窗口宽度。A third product of the display screen width and a third preset ratio is calculated, and the third product is used as the window width.
可选的,所述分辨率包括显示屏高度和显示屏宽度,所述当所述显示模式为竖屏模式时,所述宽高获取单元201,具体用于:Optionally, the resolution includes the height of the display screen and the width of the display screen, and when the display mode is the vertical screen mode, the width and
计算所述显示屏高度与第一预设比值的第一乘积,将所述第一乘积作为所述窗口高度;calculating a first product of the height of the display screen and a first preset ratio, and using the first product as the height of the window;
计算所述显示屏高度与第二预设比值的第二乘积,将所述第二乘积作为所述工具栏高度;calculating a second product of the height of the display screen and a second preset ratio, and using the second product as the height of the toolbar;
计算预设值与所述工具栏高度的差值,将所述差值与第三预设比值的乘积作为所述窗口宽度。Calculate the difference between the preset value and the height of the toolbar, and use the product of the difference and a third preset ratio as the window width.
可选的,如图16所示,所述窗口显示模块30,包括:Optionally, as shown in FIG. 16 , the
坐标获取单元301,用于获取所述目标窗口的预设顶点坐标;a coordinate obtaining
窗口显示单元302,用于将所述目标窗口按照所述预设顶点坐标、所述显示高度和显示宽度进行显示。The
可选的,所述窗口显示单元302,具体用于:Optionally, the
保持所述目标窗口的预设顶点坐标不变,将所述目标窗口的高度调整为所述显示高度,将所述目标窗口的宽度调整为所述显示宽度;Keeping the preset vertex coordinates of the target window unchanged, adjusting the height of the target window to the display height, and adjusting the width of the target window to the display width;
对调整后的所述目标窗口进行显示。The adjusted target window is displayed.
需要说明的是,上述实施例提供的窗口切换装置在执行窗口切换方法时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的窗口切换装置与窗口切换方法实施例属于同一构思,其体现实现过程详见方法实施例,这里不再赘述。It should be noted that, when the window switching apparatus provided in the above embodiments executes the window switching method, only the division of the above functional modules is used as an example for illustration. In practical applications, the above functions may be allocated to different functional modules as required. , that is, dividing the internal structure of the device into different functional modules to complete all or part of the functions described above. In addition, the window switching device and the window switching method embodiments provided by the above embodiments belong to the same concept, and the implementation process of which is embodied in the method embodiments, which will not be repeated here.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The above-mentioned serial numbers of the embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.
本申请实施例的方案在执行时,通过接收针对显示屏上的目标窗口输入的窗口切换操作,确定切换后所述目标窗口的具体显示模式为横屏模式还是竖屏模式,然后获取所述显示屏的分辨率,并基于所述分辨率计算所述目标窗口在所述显示模式下的显示高度和显示宽度,将所述目标窗口按照所述显示高度和显示宽度进行显示。通过显示屏的分辨率以及窗口切换后的显示模式计算切换后窗口的显示尺寸并进行显示,且可以适用窗口模式、全屏模式、分屏模式等各种模式的应用窗口的切换,同时,还可以针对显示屏上所显示的多个应用窗口分别进行横竖屏的切换,切换场景丰富,适用范围广。When the solutions of the embodiments of the present application are executed, by receiving a window switching operation input for the target window on the display screen, it is determined whether the specific display mode of the target window after switching is a landscape mode or a portrait mode, and then the display mode is obtained. The resolution of the screen is calculated, and the display height and display width of the target window in the display mode are calculated based on the resolution, and the target window is displayed according to the display height and display width. According to the resolution of the display screen and the display mode after the window is switched, the display size of the window after switching is calculated and displayed, and the switching of application windows in various modes such as windowed mode, full-screen mode, and split-screen mode can be applied. Switch between horizontal and vertical screens for multiple application windows displayed on the display screen, with rich switching scenarios and wide application range.
本申请实施例还提供了一种计算机存储介质,所述计算机存储介质可以存储有多条指令,所述指令适于由处理器加载并执行如上述图6-图13所示实施例的方法步骤,具体执行过程可以参见图6-图13所示实施例的具体说明,在此不进行赘述。Embodiments of the present application further provide a computer storage medium, where the computer storage medium can store multiple instructions, and the instructions are suitable for being loaded by a processor and executing the method steps of the embodiments shown in FIG. 6 to FIG. 13 above. , and the specific execution process may refer to the specific description of the embodiments shown in FIG. 6 to FIG. 13 , which will not be repeated here.
本申请还提供了一种计算机程序产品,该计算机程序产品存储有至少一条指令,所述至少一条指令由所述处理器加载并执行如上述图6-图13所示实施例的方法步骤,具体执行过程可以参见图6-图13所示实施例的具体说明,在此不进行赘述。The present application also provides a computer program product, where the computer program product stores at least one instruction, and the at least one instruction is loaded by the processor and executes the method steps of the embodiments shown in FIG. 6 to FIG. 13 , specifically For the execution process, reference may be made to the specific descriptions of the embodiments shown in FIG. 6 to FIG. 13 , which will not be repeated here.
请参见图17,为本申请实施例提供了一种交互智能平板的结构示意图。如图17所示,所述交互智能平板1000可以包括:至少一个处理器1001,至少一个网络接口1004,用户接口1003,存储器1005,至少一个通信总线1002。Please refer to FIG. 17 , which provides a schematic structural diagram of an interactive smart tablet according to an embodiment of the present application. As shown in FIG. 17 , the interactive
其中,通信总线1002用于实现这些组件之间的连接通信。Among them, the
其中,用户接口1003可以包括显示屏(Display)、摄像头(Camera),可选用户接口1003还可以包括标准的有线接口、无线接口。The
其中,网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。Wherein, the
其中,处理器1001可以包括一个或者多个处理核心。处理器1001利用各种借口和线路连接整个交互智能平板1000内的各个部分,通过运行或执行存储在存储器1005内的指令、程序、代码集或指令集,以及调用存储在存储器1005内的数据,执行交互智能平板1000的各种功能和处理数据。可选的,处理器1001可以采用数字信号处理(Digital SignalProcessing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器1001可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics ProcessingUnit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示屏所需要显示的内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器1001中,单独通过一块芯片进行实现。The
其中,存储器1005可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。可选的,该存储器1005包括非瞬时性计算机可读介质(non-transitory computer-readable storage medium)。存储器1005可用于存储指令、程序、代码、代码集或指令集。存储器1005可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现上述各个方法实施例的指令等;存储数据区可存储上面各个方法实施例中涉及到的数据等。存储器1005可选的还可以是至少一个位于远离前述处理器1001的存储装置。如图17所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及窗口切换应用程序。The
在图17所示的交互智能平板1000中,用户接口1003主要用于为用户提供输入的接口,获取用户输入的数据;而处理器1001可以用于调用存储器1005中存储的窗口切换应用程序,并具体执行以下操作:In the interactive
接收针对显示屏上的目标窗口输入的窗口切换操作,确定切换后所述目标窗口的显示模式,所述显示模式包括横屏模式或竖屏模式;Receive a window switching operation input for the target window on the display screen, and determine the display mode of the target window after switching, and the display mode includes a horizontal screen mode or a vertical screen mode;
获取所述显示屏的分辨率,基于所述分辨率计算所述目标窗口在所述显示模式下的显示高度和显示宽度;Acquire the resolution of the display screen, and calculate the display height and display width of the target window in the display mode based on the resolution;
将所述目标窗口按照所述显示高度和显示宽度进行显示。The target window is displayed according to the display height and display width.
在一个实施例中,所述处理器1001在执行基于所述分辨率计算所述目标窗口在所述显示模式下的显示高度和显示宽度时,具体执行以下操作:In one embodiment, when calculating the display height and display width of the target window in the display mode based on the resolution, the
基于所述分辨率,计算所述目标窗口在所述显示模式下的窗口高度、工具栏高度以及窗口宽度;Based on the resolution, calculating the window height, toolbar height and window width of the target window in the display mode;
将所述窗口高度与工具栏高度的和值作为所述目标窗口在所述显示模式下的显示高度,将所述窗口宽度作为所述目标窗口在所述显示模式下的显示宽度。The sum of the height of the window and the height of the toolbar is used as the display height of the target window in the display mode, and the window width is used as the display width of the target window in the display mode.
在一个实施例中,分辨率包括显示屏高度和显示屏宽度,当所述显示模式为横屏模式时,所述处理器1001在执行基于所述分辨率,计算所述目标窗口在所述显示模式下的窗口高度、工具栏高度以及窗口宽度时,具体执行以下操作:In one embodiment, the resolution includes the height of the display screen and the width of the display screen. When the display mode is the landscape mode, the
计算所述显示屏高度与第一预设比值的第一乘积,将所述第一乘积作为所述窗口高度;calculating a first product of the height of the display screen and a first preset ratio, and using the first product as the height of the window;
计算所述显示屏高度与第二预设比值的第二乘积,将所述第二乘积作为所述工具栏高度;calculating a second product of the height of the display screen and a second preset ratio, and using the second product as the height of the toolbar;
计算所述显示屏宽度与第三预设比值的第三乘积,将所述第三乘积作为所述窗口宽度。A third product of the display screen width and a third preset ratio is calculated, and the third product is used as the window width.
在一个实施例中,所述分辨率包括显示屏高度和显示屏宽度,所述当所述显示模式为竖屏模式时,所述处理器1001在执行基于所述窗口高度、所述工具栏高度以及所述窗口宽度确定所述目标窗口在所述显示模式下的显示高度和显示宽度时,具体执行以下操作:In one embodiment, the resolution includes the height of the display screen and the width of the display screen, and when the display mode is the vertical screen mode, the
计算所述显示屏高度与第一预设比值的第一乘积,将所述第一乘积作为所述窗口高度;calculating a first product of the height of the display screen and a first preset ratio, and using the first product as the height of the window;
计算所述显示屏高度与第二预设比值的第二乘积,将所述第二乘积作为所述工具栏高度;calculating a second product of the height of the display screen and a second preset ratio, and using the second product as the height of the toolbar;
计算预设值与所述工具栏高度的差值,将所述差值与第三预设比值的乘积作为所述窗口宽度。Calculate the difference between the preset value and the height of the toolbar, and use the product of the difference and a third preset ratio as the window width.
在一个实施例中,所述处理器1001在执行将所述目标窗口按照所述显示高度和显示宽度进行显示时,具体执行以下操作:In one embodiment, when the
获取所述目标窗口的预设顶点坐标;obtaining the preset vertex coordinates of the target window;
将所述目标窗口按照所述预设顶点坐标、所述显示高度和显示宽度进行显示。The target window is displayed according to the preset vertex coordinates, the display height and the display width.
在一个实施例中,所述处理器1001在执行将所述目标窗口按照所述预设顶点坐标、所述显示高度和显示宽度进行显示时,具体执行以下操作:In one embodiment, when the
保持所述目标窗口的预设顶点坐标不变,将所述目标窗口的高度调整为所述显示高度,将所述目标窗口的宽度调整为所述显示宽度;Keeping the preset vertex coordinates of the target window unchanged, adjusting the height of the target window to the display height, and adjusting the width of the target window to the display width;
对调整后的所述目标窗口进行显示。The adjusted target window is displayed.
本申请实施例的方案在执行时,通过接收针对显示屏上的目标窗口输入的窗口切换操作,确定切换后所述目标窗口的具体显示模式为横屏模式还是竖屏模式,然后获取所述显示屏的分辨率,并基于所述分辨率计算所述目标窗口在所述显示模式下的显示高度和显示宽度,将所述目标窗口按照所述显示高度和显示宽度进行显示。通过显示屏的分辨率以及窗口切换后的显示模式计算切换后窗口的显示尺寸并进行显示,且可以适用窗口模式、全屏模式、分屏模式等各种模式的应用窗口的切换,同时,还可以针对显示屏上所显示的多个应用窗口分别进行横竖屏的切换,切换场景丰富,适用范围广。When the solutions of the embodiments of the present application are executed, by receiving a window switching operation input for the target window on the display screen, it is determined whether the specific display mode of the target window after switching is a landscape mode or a portrait mode, and then the display mode is obtained. The resolution of the screen is calculated, and the display height and display width of the target window in the display mode are calculated based on the resolution, and the target window is displayed according to the display height and display width. According to the resolution of the display screen and the display mode after the window is switched, the display size of the window after switching is calculated and displayed, and the switching of application windows in various modes such as windowed mode, full-screen mode, and split-screen mode can be applied. Switch between horizontal and vertical screens for multiple application windows displayed on the display screen, with rich switching scenarios and wide application range.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体或随机存储记忆体等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. During execution, the processes of the embodiments of the above-mentioned methods may be included. Wherein, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, or a random storage memory, and the like.
以上所揭露的仅为本申请较佳实施例而已,当然不能以此来限定本申请之权利范围,因此依本申请权利要求所作的等同变化,仍属本申请所涵盖的范围。The above disclosures are only the preferred embodiments of the present application, and of course, the scope of the rights of the present application cannot be limited by this. Therefore, equivalent changes made according to the claims of the present application are still within the scope of the present application.
Claims (8)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910500160.5A CN110347317B (en) | 2019-06-11 | 2019-06-11 | A window switching method, device, storage medium and interactive smart tablet |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910500160.5A CN110347317B (en) | 2019-06-11 | 2019-06-11 | A window switching method, device, storage medium and interactive smart tablet |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN110347317A CN110347317A (en) | 2019-10-18 |
| CN110347317B true CN110347317B (en) | 2022-09-27 |
Family
ID=68181777
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201910500160.5A Active CN110347317B (en) | 2019-06-11 | 2019-06-11 | A window switching method, device, storage medium and interactive smart tablet |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN110347317B (en) |
Families Citing this family (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111142997A (en) * | 2019-12-17 | 2020-05-12 | 上海博泰悦臻电子设备制造有限公司 | Application display method, vehicle machine and computer storage medium |
| CN111610899A (en) * | 2020-04-26 | 2020-09-01 | 北京小米移动软件有限公司 | Interface display method, interface display device and storage medium |
| CN115357177B (en) * | 2020-07-09 | 2026-03-24 | Oppo广东移动通信有限公司 | Equipment control methods, devices, storage media and electronic equipment |
| CN111880759A (en) * | 2020-08-05 | 2020-11-03 | 深圳市嘉润原新显科技有限公司 | Control method and device for multi-split screen display picture, display and storage medium |
| CN115686401A (en) * | 2021-07-28 | 2023-02-03 | 华为技术有限公司 | Screen projection method, electronic equipment and system |
| CN116095461A (en) * | 2022-05-25 | 2023-05-09 | 荣耀终端有限公司 | Video recording method and related device |
| CN116095225B (en) * | 2022-05-30 | 2024-06-18 | 荣耀终端有限公司 | Image processing method and device for terminal equipment |
| CN117111813B (en) * | 2023-10-19 | 2024-02-20 | 深圳市慧为智能科技股份有限公司 | Display adaptation method and device, electronic equipment and storage medium |
| CN121326188A (en) * | 2024-07-12 | 2026-01-13 | 华为技术有限公司 | Display methods, media, products, and electronic devices |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH117273A (en) * | 1997-06-16 | 1999-01-12 | Kobe Nippon Denki Software Kk | Screen resolution control system |
| CN102890632A (en) * | 2012-09-18 | 2013-01-23 | 深圳市融创天下科技股份有限公司 | Screen adaptation method, system and terminal device |
| CN102999253A (en) * | 2012-11-13 | 2013-03-27 | 北京奇艺世纪科技有限公司 | Window display method and system of application program and mobile terminal |
| CN106940634A (en) * | 2017-03-14 | 2017-07-11 | 深圳市茁壮网络股份有限公司 | A kind of screen resolution changing method and system |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2017033291A (en) * | 2015-07-31 | 2017-02-09 | キヤノン株式会社 | Information processing device and control method thereof, information processing system, and computer program |
-
2019
- 2019-06-11 CN CN201910500160.5A patent/CN110347317B/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH117273A (en) * | 1997-06-16 | 1999-01-12 | Kobe Nippon Denki Software Kk | Screen resolution control system |
| CN102890632A (en) * | 2012-09-18 | 2013-01-23 | 深圳市融创天下科技股份有限公司 | Screen adaptation method, system and terminal device |
| CN102999253A (en) * | 2012-11-13 | 2013-03-27 | 北京奇艺世纪科技有限公司 | Window display method and system of application program and mobile terminal |
| CN106940634A (en) * | 2017-03-14 | 2017-07-11 | 深圳市茁壮网络股份有限公司 | A kind of screen resolution changing method and system |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110347317A (en) | 2019-10-18 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110347317B (en) | A window switching method, device, storage medium and interactive smart tablet | |
| US11054988B2 (en) | Graphical user interface display method and electronic device | |
| EP3091426B1 (en) | User terminal device providing user interaction and method therefor | |
| KR102793437B1 (en) | Method, device, storage medium and apparatus for controlling display of video call interface | |
| CN103376987B (en) | Adjust the method and electronic device of the size of window | |
| WO2022048633A1 (en) | Display method and apparatus and electronic device | |
| WO2015139408A1 (en) | Method for managing application program icons, and terminal | |
| US12293065B2 (en) | Method for adjusting interface display state, and electronic device | |
| CN101606123A (en) | Application programming interface for scrolling | |
| CN105335041A (en) | Method and apparatus for providing application icon | |
| CN103430137A (en) | Dual screen application behavior | |
| CN110471596A (en) | A kind of split screen switching method, device, storage medium and electronic equipment | |
| CN108762619A (en) | buoy display method, device, terminal and storage medium | |
| CN109992337B (en) | Webpage display method and device and storage medium | |
| EP2778880B1 (en) | Method for controlling display function and an electronic device thereof | |
| CN103902220A (en) | Mobile terminal and interface display method thereof | |
| WO2022007934A1 (en) | Application icon control method and apparatus, and electronic device | |
| KR20190064633A (en) | Method and apparatus for displaying pages, graphical user interface, and mobile terminal | |
| US8745525B1 (en) | Presenting graphical windows on a device | |
| CN111026480A (en) | A content display method and electronic device | |
| CN113835577B (en) | Display method, device, electronic device and storage medium | |
| WO2020248547A1 (en) | Window minimization method and apparatus, storage medium, and interactive intelligent panel | |
| CN110377220B (en) | Instruction response method and device, storage medium and electronic equipment | |
| EP2911115A2 (en) | Electronic device and method for color extraction | |
| CN110417984B (en) | A method, device and storage medium for realizing operation in a screen special-shaped area |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |