CN105975199A - Method and device for displaying prompt box - Google Patents
Method and device for displaying prompt box Download PDFInfo
- Publication number
- CN105975199A CN105975199A CN201610267135.3A CN201610267135A CN105975199A CN 105975199 A CN105975199 A CN 105975199A CN 201610267135 A CN201610267135 A CN 201610267135A CN 105975199 A CN105975199 A CN 105975199A
- Authority
- CN
- China
- Prior art keywords
- prompt box
- height
- end position
- display
- prompt
- 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.)
- Pending
Links
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/0487—Interaction 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/0488—Interaction 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/04883—Interaction 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 for inputting data by handwriting, e.g. gesture or text
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
本公开是关于显示提示框的方法和装置。该方法包括:检测页面中的选择区域;获取所述选择区域在所述页面中的起始位置和终止位置;根据所述起始位置和所述终止位置之间的位置关系以及所述提示框的高度,确定所述提示框的显示位置。由于考虑到了选择区域的起始位置和终止位置以及提示框的高度,因此,本技术方案可以尽可能地避免显示的提示框对选择区域以外的部分造成遮挡。
The present disclosure relates to a method and device for displaying a prompt box. The method includes: detecting a selection area in a page; acquiring the start position and end position of the selection area in the page; according to the positional relationship between the start position and the end position and the prompt box to determine the display position of the prompt box. Since the start position and end position of the selection area and the height of the prompt frame are taken into consideration, this technical solution can avoid the displayed prompt frame from occluding parts outside the selection area as much as possible.
Description
技术领域technical field
本公开涉及信息领域,尤其涉及显示提示框的方法和装置。The present disclosure relates to the field of information, and in particular to a method and device for displaying a prompt box.
背景技术Background technique
随着智能终端技术的不断发展,越来越多的人们使用智能终端进行社交、学习、工作、娱乐等。例如,用户会经常在手机上浏览网页、电子书、安装在手机中的APP(应用)中的文字、图片等。用户对于浏览的文字、图像等对象,还可以进行复制、剪切等操作。通常,用户选择了一段文本后,所选的文本区域会高亮,同时会出现一个悬浮窗口形式的提示框,提示框中包括能够对所选的文本区域进行的操作。显示的提示框可能会遮挡住用户需要使用的其他区域,例如位于屏幕底部的输入法区域,这将影响用户的输入。With the continuous development of smart terminal technologies, more and more people use smart terminals for socializing, learning, working, entertainment, and so on. For example, users often browse webpages, e-books, texts and pictures in APPs (applications) installed in the mobile phone. Users can also perform operations such as copying and cutting on objects such as text and images that are browsed. Usually, after the user selects a piece of text, the selected text area will be highlighted, and a prompt box in the form of a floating window will appear at the same time, and the prompt box includes operations that can be performed on the selected text area. The displayed prompt box may block other areas that the user needs to use, such as the input method area at the bottom of the screen, which will affect the user's input.
发明内容Contents of the invention
本公开实施例提供一种显示提示框的方法和装置。所述技术方案如下:Embodiments of the present disclosure provide a method and device for displaying a prompt box. Described technical scheme is as follows:
根据本公开实施例的第一方面,提供一种显示提示框的方法,包括:According to a first aspect of an embodiment of the present disclosure, a method for displaying a prompt box is provided, including:
检测页面中的选择区域;Detect the selection area in the page;
获取所述操作选择区域在所述页面中的起始位置和终止位置;Obtain the start position and end position of the operation selection area in the page;
根据所述起始位置和所述终止位置之间的位置关系以及所述提示框的高度,确定所述提示框的显示位置。The display position of the prompt box is determined according to the positional relationship between the start position and the end position and the height of the prompt box.
可选的,所述根据所述起始位置和所述终止位置之间的位置关系以及所述提示框的高度,确定所述提示框的显示位置,包括:Optionally, the determining the display position of the prompt box according to the positional relationship between the start position and the end position and the height of the prompt box includes:
确定所述起始位置和/或所述终止位置是否在屏幕上可见;determining whether the start position and/or the end position are visible on the screen;
若所述起始位置在屏幕上不可见,使用选择区域的可见部分的顶部位置替换所述起始位置;if the starting position is not visible on the screen, replacing the starting position with the top position of the visible part of the selection area;
若所述终止位置在屏幕上不可见,使用选择区域的可见部分的底部位置替换所述终止位置。If the end position is not visible on the screen, replace the end position with the bottom position of the visible part of the selection area.
可选的,所述根据所述起始位置和所述终止位置之间的位置关系以及所述提示框的高度,确定所述提示框的显示位置,包括:Optionally, the determining the display position of the prompt box according to the positional relationship between the start position and the end position and the height of the prompt box includes:
当所述起始位置和所述终止位置之间能够容纳所述提示框时,在所述起始位置和所述终止位置之间显示所述提示框。When the prompt box can be accommodated between the start position and the end position, the prompt box is displayed between the start position and the end position.
可选的,所述当所述起始位置和所述终止位置之间容纳预设的提示框时,在所述起始位置和所述终止位置之间显示所述提示框,包括:Optionally, when a preset prompt box is accommodated between the start position and the end position, displaying the prompt box between the start position and the end position includes:
计算所述起始位置和所述终止位置之间的第一垂直距离;calculating a first vertical distance between the starting location and the ending location;
若所述第一垂直距离大于所述提示框的高度,在所述起始位置和所述终止位置之间显示所述提示框。If the first vertical distance is greater than the height of the prompt box, display the prompt box between the start position and the end position.
可选的,所述根据所述起始位置和所述终止位置之间的位置关系以及所述提示框的高度,确定所述提示框的显示位置,还包括:Optionally, the determining the display position of the prompt box according to the positional relationship between the start position and the end position and the height of the prompt box further includes:
获取所述起始位置与屏幕的顶部之间的第二垂直距离;Acquiring a second vertical distance between the starting position and the top of the screen;
若所述第二垂直距离大于所述提示框的高度,在所述起始位置的上方显示所述提示框;If the second vertical distance is greater than the height of the prompt box, display the prompt box above the starting position;
所述计算所述起始位置和所述终止位置之间的第一垂直距离,包括:The calculating the first vertical distance between the starting position and the ending position includes:
若所述第二垂直距离小于所述提示框的高度,计算所述起始位置和所述终止位置之间的第一垂直距离。If the second vertical distance is smaller than the height of the prompt box, calculate a first vertical distance between the starting position and the ending position.
可选的,所述根据所述起始位置和所述终止位置之间的位置关系以及所述提示框的高度,确定所述提示框的显示位置,还包括:Optionally, the determining the display position of the prompt box according to the positional relationship between the start position and the end position and the height of the prompt box further includes:
若所述第一垂直距离小于所述提示框的高度,在所述终止位置的下方显示所述提示框。If the first vertical distance is smaller than the height of the prompt box, display the prompt box below the end position.
可选的,所述根据所述起始位置和所述终止位置之间的位置关系以及所述提示框的高度,确定所述提示框的显示位置,还包括:Optionally, the determining the display position of the prompt box according to the positional relationship between the start position and the end position and the height of the prompt box further includes:
根据预设区域与提示框高度的对应关系,确定所述选择区域对应的提示框高度;According to the corresponding relationship between the preset area and the height of the prompt box, determine the height of the prompt box corresponding to the selection area;
获取确定的提示框高度作为所述提示框的高度。Obtain the determined height of the prompt box as the height of the prompt box.
根据本公开实施例的第二方面,提供一种显示提示框的装置,包括:According to a second aspect of an embodiment of the present disclosure, there is provided an apparatus for displaying a prompt box, including:
检测模块,用于检测页面中的选择区域;The detection module is used to detect the selection area in the page;
获取模块,用于获取所述检测模块检测到的选择区域在所述页面中的起始位置和终止位置;An acquisition module, configured to acquire the start position and end position of the selection area detected by the detection module in the page;
确定模块,用于据所述获取模块获取的所述起始位置和所述终止位置之间的位置关系以及所述提示框的高度,确定所述提示框的显示位置。A determination module, configured to determine the display position of the prompt box according to the positional relationship between the start position and the end position acquired by the acquisition module and the height of the prompt box.
可选的,所述确定模块还包括:Optionally, the determination module also includes:
第一确定子模块,用于确定所述获取模块获取的所述起始位置和/或所述终止位置是否在屏幕上可见;A first determination submodule, configured to determine whether the start position and/or the end position acquired by the acquisition module are visible on the screen;
第一处理子模块,用于若所述第一确定子模块确定所述起始位置在屏幕上不可见,使用选择区域的可见部分的顶部位置替换所述起始位置;The first processing submodule is configured to replace the starting position with the top position of the visible part of the selection area if the first determining submodule determines that the starting position is not visible on the screen;
第二处理子模块,用于若所述第一确定子模块确定所述终止位置在屏幕上不可见,使用选择区域的可见部分的底部位置替换所述终止位置。The second processing sub-module is configured to replace the end position with the bottom position of the visible part of the selection area if the first determination sub-module determines that the end position is not visible on the screen.
可选的,所述确定模块,还包括:Optionally, the determining module also includes:
第一显示子模块,用于当所述获取模块获取的所述起始位置和所述终止位置之间能够容纳所述提示框时,在所述起始位置和所述终止位置之间显示所述提示框。A first display submodule, configured to display the prompt box between the starting position and the ending position acquired by the acquisition module when the prompt box can be accommodated between the starting position and the ending position prompt box.
可选的,所述确定模块,还包括:Optionally, the determining module also includes:
第一计算子模块,用于计算所述获取模块获取的所述起始位置和所述终止位置之间的第一垂直距离;A first calculation submodule, configured to calculate a first vertical distance between the start position and the end position acquired by the acquisition module;
所述第一显示子模块,还用于若所述第一计算子模块计算的所述第一垂直距离大于所述提示框的高度,在所述起始位置和所述终止位置之间显示所述提示框。The first display submodule is further configured to display the first vertical distance between the start position and the end position if the first vertical distance calculated by the first calculation submodule is greater than the height of the prompt box. prompt box.
可选的,所述确定模块,还包括:Optionally, the determining module also includes:
第二计算子模块,用于计算所述获取模块获取的所述起始位置与屏幕的顶部之间的第二垂直距离;A second calculation submodule, configured to calculate a second vertical distance between the starting position acquired by the acquisition module and the top of the screen;
第二显示子模块,用于若所述第二计算子模块计算的所述第二垂直距离大于所述提示框的高度,在所述起始位置的上方显示所述提示框;The second display submodule is configured to display the prompt box above the starting position if the second vertical distance calculated by the second calculation submodule is greater than the height of the prompt box;
所述第一计算子模块,还用于若所述第二计算子模块计算的所述第二垂直距离小于所述提示框的高度,计算所述起始位置和所述终止位置之间的第一垂直距离。The first calculation submodule is further configured to calculate the second vertical distance between the start position and the end position if the second vertical distance calculated by the second calculation submodule is smaller than the height of the prompt box. a vertical distance.
可选的,所述确定模块,还包括:Optionally, the determining module also includes:
第三显示子模块,用于若所述第一计算子模块计算的所述第一垂直距离小于所述提示框的高度,在所述终止位置的下方显示所述提示框。The third display submodule is configured to display the prompt box below the termination position if the first vertical distance calculated by the first calculation submodule is smaller than the height of the prompt box.
可选的,所述确定模块,还包括:Optionally, the determining module also includes:
第二确定子模块,用于根据预设区域与提示框高度的对应关系,确定所述检测模块检测到的选择区域对应的提示框高度;The second determining submodule is used to determine the height of the prompt box corresponding to the selection area detected by the detection module according to the correspondence between the preset area and the height of the prompt box;
获取子模块,用于获取所述第二确定子模块确定的提示框高度作为所述提示框的高度。An acquiring submodule, configured to acquire the height of the prompt box determined by the second determining submodule as the height of the prompt box.
根据本公开实施例的第三方面,提供一种显示提示框的装置,包括:According to a third aspect of the embodiments of the present disclosure, there is provided an apparatus for displaying a prompt box, including:
处理器;processor;
用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;
其中,所述处理器被配置为:Wherein, the processor is configured as:
检测页面中的选择区域;Detect the selection area in the page;
获取所述选择区域在所述页面中的起始位置和终止位置;Obtain the start position and end position of the selection area in the page;
根据所述起始位置和所述终止位置之间的位置关系以及所述提示框的高度,确定所述提示框的显示位置。The display position of the prompt box is determined according to the positional relationship between the start position and the end position and the height of the prompt box.
本公开的实施例提供的技术方案可以包括以下有益效果:The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:
上述技术方案,通过选择区域的起始位置和终止位置之间的位置关系以及提示框的高度,来确定提示框的显示位置。由于考虑到了选择区域的起始位置和终止位置以及提示框的高度,因此,本技术方案可以尽可能地避免显示的提示框对选择区域以外的部分造成遮挡。In the above technical solution, the display position of the prompt box is determined by selecting the positional relationship between the start position and the end position of the area and the height of the prompt box. Since the start position and end position of the selection area and the height of the prompt frame are taken into consideration, this technical solution can avoid the displayed prompt frame from blocking the parts outside the selection area as much as possible.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description serve to explain the principles of the disclosure.
图1是根据一示例性实施例示出的显示提示框的方法的流程图。Fig. 1 is a flowchart showing a method for displaying a prompt box according to an exemplary embodiment.
图2是示例性的用户在页面中选择某一区域后的示意图。Fig. 2 is an exemplary schematic diagram after a user selects a certain area on a page.
图3是示例性的在图2中的选择区域中显示提示框的示意图。FIG. 3 is an exemplary schematic diagram of displaying a prompt box in the selection area in FIG. 2 .
图4是根据另一示例性实施例示出的显示提示框的方法的流程图。Fig. 4 is a flowchart of a method for displaying a prompt box according to another exemplary embodiment.
图5是根据另一示例性实施例示出的显示提示框的方法的流程图。Fig. 5 is a flowchart of a method for displaying a prompt box according to another exemplary embodiment.
图6是示例性的使用选择区域的可见部分的顶部位置来替换起始位置的示意图。Fig. 6 is a schematic diagram of an exemplary use of the top position of the visible part of the selection area to replace the initial position.
图7是示例性的使用选择区域的可见部分的底部位置来替换终止位置的示意图。Fig. 7 is a schematic diagram of an exemplary use of the bottom position of the visible part of the selection area to replace the end position.
图8是根据另一示例性实施例示出的显示提示框的方法的流程图。Fig. 8 is a flowchart of a method for displaying a prompt box according to another exemplary embodiment.
图9是在选择区域的起始位置的上方显示提示框的示意图。FIG. 9 is a schematic diagram of displaying a prompt box above the initial position of the selection area.
图10是根据一示例性实施例示出的显示提示框的装置的框图。Fig. 10 is a block diagram of an apparatus for displaying a prompt box according to an exemplary embodiment.
图11是根据另一示例性实施例示出的显示提示框的装置中的获取模块的框图。Fig. 11 is a block diagram of an acquisition module in an apparatus for displaying a prompt box according to another exemplary embodiment.
图12是根据另一示例性实施例示出的显示提示框的装置中的确定模块的框图。Fig. 12 is a block diagram of a determination module in an apparatus for displaying a prompt box according to another exemplary embodiment.
图13是根据另一示例性实施例示出的显示提示框的装置中的确定模块的框图。Fig. 13 is a block diagram of a determination module in an apparatus for displaying a prompt box according to another exemplary embodiment.
图14是根据另一示例性实施例示出的显示提示框的装置中的确定模块的框图。Fig. 14 is a block diagram of a determination module in an apparatus for displaying a prompt box according to another exemplary embodiment.
图15是根据另一示例性实施例示出的显示提示框的装置中的确定模块的框图。Fig. 15 is a block diagram of a determination module in an apparatus for displaying a prompt box according to another exemplary embodiment.
图16是根据另一示例性实施例示出的显示提示框的装置中的确定模块的框图。Fig. 16 is a block diagram of a determination module in an apparatus for displaying a prompt box according to another exemplary embodiment.
图17是根据一示例性实施例示出的终端设备的框图。Fig. 17 is a block diagram of a terminal device according to an exemplary embodiment.
具体实施方式detailed description
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatuses and methods consistent with aspects of the present disclosure as recited in the appended claims.
本公开实施例提供的技术方案,涉及终端设备,比如可以包括智能手机、平板电脑、笔记本电脑、台式电脑。The technical solutions provided by the embodiments of the present disclosure relate to terminal devices, such as smart phones, tablet computers, notebook computers, and desktop computers.
图1是根据一示例性实施例示出的一种显示提示框的方法的流程图,如图1所示,方法用于终端设备中,包括以下步骤S11-S13:Fig. 1 is a flowchart of a method for displaying a prompt box according to an exemplary embodiment. As shown in Fig. 1, the method is used in a terminal device and includes the following steps S11-S13:
在步骤S11中,检测页面中的选择区域。In step S11, the selected area in the page is detected.
例如,当检测到用户在页面中的预设操作时,则检测到页面中的选择区域。用户在页面中的预设操作例如可以是触摸要选择区域预设时长、点击光标位置设置选择区域的起始位置和终止位置等。For example, when a user's preset operation on a page is detected, a selection area on the page is detected. The user's preset operation on the page may be, for example, touching the area to be selected for a preset duration, clicking the cursor position to set the start position and end position of the selection area, and the like.
在步骤S12中,获取该选择区域在页面中的起始位置和终止位置。In step S12, the start position and end position of the selection area on the page are obtained.
如图2所示为用户在页面201中选择某一区域202后的示意图,可以将选择区域202进行高亮显示,并且还可以显示出起始位置的标识A和终止位置的标识B。FIG. 2 is a schematic diagram of a user selecting a certain area 202 on the page 201. The selected area 202 can be highlighted, and the mark A of the starting position and the mark B of the ending position can also be displayed.
在步骤S13中,根据起始位置和终止位置之间的位置关系以及提示框的高度,确定提示框的显示位置。In step S13, the display position of the prompt frame is determined according to the positional relationship between the start position and the end position and the height of the prompt frame.
例如,当起始位置和终止位置之间能够容纳提示框时,在起始位置和终止位置之间显示提示框。当起始位置和终止位置之间的垂直距离大于提示框的高度时,则确认起始位置和终止位置之间能够容纳提示框。For example, when a prompt box can be accommodated between the start position and the end position, the prompt box is displayed between the start position and the end position. When the vertical distance between the start position and the end position is greater than the height of the prompt box, it is confirmed that the prompt box can be accommodated between the start position and the end position.
如图3所示为示例性的在图2中的选择区域中显示提示框的示意图。如图3所示,提示框203在选择区域202中显示。提示框203中可以包括能够对选择区域202进行的操作,例如包括复制、转发、全选等。FIG. 3 is an exemplary schematic diagram of displaying a prompt box in the selection area in FIG. 2 . As shown in FIG. 3 , a prompt box 203 is displayed in the selection area 202 . The prompt box 203 may include operations that can be performed on the selection area 202, such as copying, forwarding, and selecting all.
在本公开的其他实施例中,不同页面中的不同区域可以对应不同的提示框。例如,区域可以是文字类型的区域、图片类型的区域、文字和图片混合的区域。文字类型的区域对应提示框1、图片类型的区域对应提示框2、文字和图片混合的区域对应提示框3。提示框1、提示框2、提示框3中可以包括不同的操作。不同的提示框还可以具有不同的高度。因此,在显示提示框时,可以根据预设的区域与提示框高度的对应关系,确定选择区域对应的提示框高度;获取确定的提示框高度作为要显示的提示框的高度。In other embodiments of the present disclosure, different regions on different pages may correspond to different prompt boxes. For example, the area may be a text-type area, a picture-type area, or a mixed text-picture area. The area of text type corresponds to prompt box 1, the area of picture type corresponds to prompt box 2, and the area of mixed text and pictures corresponds to prompt box 3. Prompt box 1, prompt box 2, and prompt box 3 may include different operations. Different prompt boxes can also have different heights. Therefore, when the prompt box is displayed, the height of the prompt box corresponding to the selected area can be determined according to the preset correspondence between the area and the height of the prompt box; the determined height of the prompt box can be obtained as the height of the prompt box to be displayed.
在本公开的另一实施例中,判断起始位置和终止位置之间是否能够容纳预设的提示框,如图4所示,可以采用以下步骤:In another embodiment of the present disclosure, to determine whether a preset prompt box can be accommodated between the start position and the end position, as shown in FIG. 4 , the following steps may be adopted:
在步骤S131中,计算起始位置和终止位置之间的第一垂直距离。In step S131, a first vertical distance between the starting position and the ending position is calculated.
在步骤S132中,若第一垂直距离大于提示框的高度时,在起始位置和终止位置之间显示提示框。In step S132, if the first vertical distance is greater than the height of the prompt box, a prompt box is displayed between the start position and the end position.
通过将提示框显示在选择区域的起始位置和终止位置之间,实现了将提示框显示在选择区域中。这样,显示的提示框将不会对选择区域以外的部分造成遮挡,避免为用户带来不便。Displaying the prompt box in the selection area is realized by displaying the prompt box between the start position and the end position of the selection area. In this way, the displayed prompt box will not block the parts outside the selection area, so as to avoid inconvenience to the user.
本实施例中,通过选择区域的起始位置和终止位置之间的位置关系以及提示框的高度,来确定提示框的显示位置。由于考虑到了选择区域的起始位置和终止位置以及提示框的高度,因此,本技术方案可以尽可能地避免显示的提示框对选择区域以外的部分造成遮挡。In this embodiment, the display position of the prompt box is determined by the positional relationship between the start position and the end position of the selection area and the height of the prompt box. Since the start position and end position of the selection area and the height of the prompt frame are taken into consideration, this technical solution can avoid the displayed prompt frame from blocking the parts outside the selection area as much as possible.
有时,用户在页面中选择区域时,可能还会上下滚动页面,以选择较大的区域,此时,由于页面的滚动,标记在页面上的初始位置和/或终止位置可能在屏幕上不可见;或者,用户在页面中选择区域之后,也会上下滚动页面进行查看,这也会造成,标记在页面上的初始位置和/或终止位置可能在屏幕上不可见。在本公开的另一个实施例中,可以有效解决上述技术问题。如图5所示是根据另一示例性实施例示出的一种显示提示框的方法的流程图,该方法可以包括以下步骤:Sometimes when a user selects an area on a page, they may also scroll up and down the page to select a larger area, at which point the initial and/or ending position of the marker on the page may not be visible on the screen due to the scrolling of the page ; Or, after the user selects an area on the page, he will also scroll up and down the page to view it, which will also cause the initial position and/or end position of the mark on the page to be invisible on the screen. In another embodiment of the present disclosure, the above technical problems can be effectively solved. As shown in FIG. 5, it is a flow chart of a method for displaying a prompt box according to another exemplary embodiment, and the method may include the following steps:
在步骤S51中,检测页面中的选择区域。In step S51, the selected area in the page is detected.
在步骤S52中,获取该选择区域在页面中的起始位置和终止位置。In step S52, the start position and end position of the selection area on the page are acquired.
在步骤S53中,确定起始位置是否在屏幕上可见;若是,执行步骤S55;若否,执行步骤S54。In step S53, it is determined whether the starting position is visible on the screen; if yes, execute step S55; if not, execute step S54.
在步骤S54中,使用选择区域的可见部分的顶部位置替换起始位置,然后执行步骤S55。In step S54, the top position of the visible part of the selection area is used to replace the initial position, and then step S55 is executed.
如图6所示,当图2中的起始位置的标识A由于页面向上滚动而不可见时,使用选择区域202的可见部分的顶部位置A’来替换起始位置A。As shown in FIG. 6 , when the sign A of the starting position in FIG. 2 is invisible due to scrolling up the page, the starting position A is replaced by the top position A' of the visible part of the selection area 202.
在步骤S55中,确定终止位置是否在屏幕上可见;若是,执行步骤S57;若否,执行步骤S56。In step S55, it is determined whether the termination position is visible on the screen; if yes, execute step S57; if not, execute step S56.
在步骤S56中,使用选择区域的可见部分的底部位置替换终止位置,然后执行步骤S57。In step S56, the end position is replaced with the bottom position of the visible part of the selection area, and then step S57 is executed.
如图7所示,当图2中的终止位置的标识B由于页面向下滚动而不可见时,使用选择区域202的可见部分的顶部位置B’来替换B。As shown in FIG. 7, when the sign B of the termination position in FIG. 2 is invisible due to scrolling down the page, the top position B' of the visible part of the selection area 202 is used to replace B.
在步骤S57中,若起始位置和终止位置之间能够容纳预设的提示框时,在起始位置和终止位置之间显示提示框。In step S57, if a preset prompt frame can be accommodated between the start position and the end position, a prompt frame is displayed between the start position and the end position.
在本公开的另一个实施例中,可以优先在选择区域的上方显示提示框,当选择区域的上方空间不足以显示提示框时,在选择区域中显示提示框。如图8所示是根据另一示例性实施例示出的一种显示提示框的方法的流程图,该方法可以包括以下步骤:In another embodiment of the present disclosure, the prompt box may be preferentially displayed above the selection area, and when the space above the selection area is not enough to display the prompt box, the prompt box is displayed in the selection area. FIG. 8 is a flow chart of a method for displaying a prompt box according to another exemplary embodiment, and the method may include the following steps:
在步骤S81中,检测页面中的选择区域。In step S81, the selected area in the page is detected.
在步骤S82中,获取该选择区域在页面中的起始位置和终止位置。In step S82, the start position and end position of the selection area on the page are acquired.
在步骤S83中,获取起始位置与屏幕的顶部之间的垂直距离D1。In step S83, the vertical distance D1 between the starting position and the top of the screen is obtained.
在步骤S84中,判断垂直距离D1是否大于提示框的高度;若是,执行步骤S85;若否,执行步骤S86。In step S84, it is judged whether the vertical distance D1 is greater than the height of the prompt box; if yes, execute step S85; if not, execute step S86.
在步骤S85中,在起始位置的上方显示提示框。In step S85, a prompt box is displayed above the starting position.
如图9所示,在选择区域202的起始位置A的上方显示提示框。As shown in FIG. 9 , a prompt box is displayed above the starting position A of the selection area 202 .
在步骤S86中,计算起始位置和终止位置之间的垂直距离D2。In step S86, the vertical distance D2 between the start position and the end position is calculated.
在步骤S87中,判断垂直距离D2是否大于提示框的高度;若是,执行步骤S88;若否,执行步骤S89。In step S87, it is judged whether the vertical distance D2 is greater than the height of the prompt box; if yes, execute step S88; if not, execute step S89.
在步骤S88中,在起始位置和终止位置之间显示提示框。如上述图3所示。In step S88, a prompt box is displayed between the start position and the end position. As shown in Figure 3 above.
在步骤S89中,在终止位置的下方显示提示框。In step S89, a prompt box is displayed below the termination position.
下述为本公开装置实施例,可以用于执行本公开方法实施例。The following are device embodiments of the present disclosure, which can be used to implement the method embodiments of the present disclosure.
图10是根据一示例性实施例示出的一种显示提示框的装置的框图,该装置可以通过软件、硬件或者两者的结合实现成为电子设备的部分或者全部。如图10所示,该显示提示框的装置包括:Fig. 10 is a block diagram showing an apparatus for displaying a prompt box according to an exemplary embodiment, and the apparatus may be implemented as part or all of an electronic device through software, hardware or a combination of the two. As shown in Figure 10, the device for displaying the prompt box includes:
检测模块101,被配置为检测页面中的选择区域;The detection module 101 is configured to detect the selection area in the page;
例如,当检测到用户在页面中的预设操作时,则检测到页面中的选择区域。用户在页面中的预设操作例如可以是触摸要选择区域预设时长、点击光标位置设置选择区域的起始位置和终止位置等。For example, when a user's preset operation on a page is detected, a selection area on the page is detected. The user's preset operation on the page may be, for example, touching the area to be selected for a preset duration, clicking the cursor position to set the start position and end position of the selection area, and the like.
获取模块102,被配置为获取检测模块101检测到的选择区域在页面中的起始位置和终止位置;The obtaining module 102 is configured to obtain the start position and end position of the selection area detected by the detection module 101 in the page;
如图2所示为用户在页面201中选择某一区域202后的示意图,可以将所选区域202进行高亮显示,并且还可以显示出起始位置的标识A和终止位置的标识B。As shown in FIG. 2 , the user selects a certain area 202 on the page 201. The selected area 202 can be highlighted, and the mark A of the starting position and the mark B of the ending position can also be displayed.
确定模块103,被配置为根据获取模块102获取的起始位置和终止位置之间的位置关系以及提示框的高度,确定提示框的显示位置。The determination module 103 is configured to determine the display position of the prompt box according to the positional relationship between the start position and the end position acquired by the acquisition module 102 and the height of the prompt box.
本实施例中,通过选择区域的起始位置和终止位置之间的位置关系以及提示框的高度,来确定提示框的显示位置。由于考虑到了选择区域的起始位置和终止位置以及提示框的高度,因此,本技术方案可以尽可能地避免显示的提示框对选择区域以外的部分造成遮挡。In this embodiment, the display position of the prompt box is determined by the positional relationship between the start position and the end position of the selection area and the height of the prompt box. Since the start position and end position of the selection area and the height of the prompt frame are taken into consideration, this technical solution can avoid the displayed prompt frame from blocking the parts outside the selection area as much as possible.
用户在页面中选择区域时,可能还会上下滚动页面,以选择较大的区域,此时,由于页面的滚动,标记在页面上的初始位置和/或终止位置可能在屏幕上不可见;或者,用户在页面中选择区域之后,也会上下滚动页面进行查看,这也会造成,标记在页面上的初始位置和/或终止位置可能在屏幕上不可见。在本公开的另一个实施例中,如图11所示,确定模块103中包括:When the user selects an area on the page, the user may also scroll up and down the page to select a larger area, in which case the initial and/or ending position of the marker on the page may not be visible on the screen due to the scrolling of the page; or , after the user selects an area on the page, the user will also scroll up and down the page to view it, which will also cause the initial position and/or end position of the mark on the page to be invisible on the screen. In another embodiment of the present disclosure, as shown in FIG. 11 , the determining module 103 includes:
第一确定子模块1031,被配置为确定获取模块102获取的起始位置和/或终止位置是否在屏幕上可见;The first determination sub-module 1031 is configured to determine whether the starting position and/or the ending position acquired by the acquiring module 102 are visible on the screen;
第一处理子模块1032,被配置为若第一确定子模块1021确定起始位置在屏幕上不可见,使用选择区域的可见部分的顶部位置替换起始位置;The first processing sub-module 1032 is configured to replace the starting position with the top position of the visible part of the selection area if the first determining sub-module 1021 determines that the starting position is not visible on the screen;
第二处理模块1033,被配置为若第一确定子模块1021确定终止位置在屏幕上不可见,使用选择区域的可见部分的底部位置替换终止位置。The second processing module 1033 is configured to replace the end position with the bottom position of the visible part of the selection area if the first determination sub-module 1021 determines that the end position is not visible on the screen.
如图6所示,当图2中的起始位置的标识A由于页面向上滚动而不可见时,使用选择区域202的可见部分的顶部位置A’来替换起始位置A。如图7所示,当图2中的终止位置的标识B由于页面向下滚动而不可见时,使用选择区域202的可见部分的顶部位置B’来替换B。As shown in FIG. 6 , when the sign A of the starting position in FIG. 2 is invisible due to scrolling up the page, the starting position A is replaced by the top position A' of the visible part of the selection area 202. As shown in FIG. 7, when the sign B of the termination position in FIG. 2 is invisible due to scrolling down the page, the top position B' of the visible part of the selection area 202 is used to replace B.
在本公开的另一个实施例中,如图12所示,确定模块103,还包括:In another embodiment of the present disclosure, as shown in FIG. 12, the determination module 103 further includes:
第一显示子模块1034,用于当获取模块102获取的起始位置和终止位置之间能够容纳提示框时,在起始位置和终止位置之间显示提示框。The first display submodule 1034 is configured to display a prompt frame between the start position and the end position when the prompt frame can be accommodated between the start position and the end position acquired by the acquisition module 102 .
如图3所示为示例性的在图2中的选择区域中显示提示框的示意图。如图3所示,提示框203在选择区域202中显示。提示框203中可以包括能够对选择区域202进行的操作,例如包括复制、转发、全选等。FIG. 3 is an exemplary schematic diagram of displaying a prompt box in the selection area in FIG. 2 . As shown in FIG. 3 , a prompt box 203 is displayed in the selection area 202 . The prompt box 203 may include operations that can be performed on the selection area 202, such as copying, forwarding, and selecting all.
本实施例中,通过将提示框显示在选择区域的起始位置和终止位置之间,实现了将提示框显示在选择区域中。这样,显示的提示框将不会对选择区域以外的部分造成遮挡,避免为用户带来不便。In this embodiment, the prompt box is displayed in the selection area by displaying the prompt box between the start position and the end position of the selection area. In this way, the displayed prompt box will not block the parts outside the selection area, so as to avoid inconvenience to the user.
在本公开的另一个实施例中,如图13所示,确定模块103,还包括:In another embodiment of the present disclosure, as shown in FIG. 13, the determination module 103 further includes:
第一计算子模块1035,被配置为计算获取模块102获取的起始位置和终止位置之间的第一垂直距离;The first calculation sub-module 1035 is configured to calculate the first vertical distance between the start position and the end position acquired by the acquisition module 102;
第一显示子模块1034,被配置为若第一计算子模块1031计算的第一垂直距离大于提示框的高度,在起始位置和终止位置之间显示提示框。The first display submodule 1034 is configured to display the prompt box between the start position and the end position if the first vertical distance calculated by the first calculation submodule 1031 is greater than the height of the prompt box.
在本公开的另一个实施例中,如图14所示,确定模块103,还包括:In another embodiment of the present disclosure, as shown in FIG. 14, the determining module 103 further includes:
第二计算子模块1036,被配置为计算获取模块102获取的起始位置与屏幕的顶部之间的第二垂直距离;The second calculation submodule 1036 is configured to calculate a second vertical distance between the starting position acquired by the acquisition module 102 and the top of the screen;
第二显示子模块1037,被配置为若第二计算子模块1033计算的第二垂直距离大于提示框的高度,在起始位置的上方显示提示框;The second display submodule 1037 is configured to display the prompt box above the initial position if the second vertical distance calculated by the second calculation submodule 1033 is greater than the height of the prompt box;
如图9所示,在选择区域202的起始位置A的上方显示提示框。As shown in FIG. 9 , a prompt box is displayed above the starting position A of the selection area 202 .
第一计算子模块1035,被配置为若第二计算子模块1033计算的第二垂直距离小于提示框的高度,计算起始位置和终止位置之间的第一垂直距离。The first calculation sub-module 1035 is configured to calculate the first vertical distance between the start position and the end position if the second vertical distance calculated by the second calculation sub-module 1033 is smaller than the height of the prompt box.
在本公开的另一个实施例中,如图15所示,所述确定模块103,还包括:In another embodiment of the present disclosure, as shown in FIG. 15, the determination module 103 further includes:
第三显示子模块1038,用于若第一计算子模块1031计算的第一垂直距离小于提示框的高度,在终止位置的下方显示提示框。The third display submodule 1038 is configured to display the prompt box below the termination position if the first vertical distance calculated by the first calculation submodule 1031 is smaller than the height of the prompt box.
在本公开的另一个实施例中,如图15所示,所述确定模块103,还包括:In another embodiment of the present disclosure, as shown in FIG. 15, the determination module 103 further includes:
第二确定子模块1039,用于根据预设区域与提示框高度的对应关系,确定检测模块101检测到的选择区域对应的提示框高度;The second determination sub-module 1039 is used to determine the height of the prompt frame corresponding to the selection area detected by the detection module 101 according to the correspondence between the preset area and the height of the prompt frame;
获取子模块1040,用于获取第二确定子模块1039确定的提示框高度作为提示框的高度。The acquiring submodule 1040 is configured to acquire the height of the prompt box determined by the second determining submodule 1039 as the height of the prompt box.
不同页面中的不同区域可以对应不同的提示框。例如,区域可以是文字类型的区域、图片类型的区域、文字和图片混合的区域。文字类型的区域对应提示框1、图片类型的区域对应提示框2、文字和图片混合的区域对应提示框3。提示框1、提示框2、提示框3中可以包括不同的操作。不同的提示框还可以具有不同的高度。因此,在显示提示框时,可以根据预设区域与提示框高度的对应关系,确定选择区域对应的提示框高度;获取确定的提示框高度作为所述选择区域的提示框的高度。Different regions on different pages may correspond to different prompt boxes. For example, the area may be a text-type area, a picture-type area, or a mixed text-picture area. The area of text type corresponds to prompt box 1, the area of picture type corresponds to prompt box 2, and the area of mixed text and pictures corresponds to prompt box 3. Prompt box 1, prompt box 2, and prompt box 3 may include different operations. Different prompt boxes can also have different heights. Therefore, when displaying the prompt frame, the height of the prompt frame corresponding to the selection area may be determined according to the correspondence between the preset area and the height of the prompt frame; the determined height of the prompt frame may be obtained as the height of the prompt frame of the selection area.
本公开还提供一种显示提示框的装置,包括:The present disclosure also provides a device for displaying a prompt box, including:
处理器;processor;
被配置为存储处理器可执行指令的存储器;memory configured to store processor-executable instructions;
其中,处理器被配置为:where the processor is configured as:
检测页面中的选择区域;Detect the selection area in the page;
获取所述选择区域在所述页面中的起始位置和终止位置;Obtain the start position and end position of the selection area in the page;
根据所述起始位置和所述终止位置之间的位置关系以及所述提示框的高度,确定所述提示框的显示位置。The display position of the prompt box is determined according to the positional relationship between the start position and the end position and the height of the prompt box.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the foregoing embodiments, the specific manner in which each module executes operations has been described in detail in the embodiments related to the method, and will not be described in detail here.
图17是根据一示例性实施例示出的一种用于显示提示框的装置800的框图。例如,装置800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。Fig. 17 is a block diagram of an apparatus 800 for displaying a prompt box according to an exemplary embodiment. For example, the apparatus 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.
参照图17,装置800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(I/O)的接口812,传感器组件814,以及通信组件816。17, device 800 may include one or more of the following components: processing component 802, memory 804, power supply component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816 .
处理组件802通常控制装置800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。The processing component 802 generally controls the overall operations of the device 800, such as those associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above method. Additionally, processing component 802 may include one or more modules that facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802 .
存储器804被配置为存储各种类型的数据以支持在设备800的操作。这些数据的示例包括用于在装置800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。The memory 804 is configured to store various types of data to support operations at the device 800 . Examples of such data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, and the like. The memory 804 can be implemented by any type of volatile or non-volatile storage device or their combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.
电源组件806为装置800的各种组件提供电力。电源组件806可以包括电源管理系统,一个或多个电源,及其他与为装置800生成、管理和分配电力相关联的组件。The power supply component 806 provides power to the various components of the device 800 . Power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for device 800 .
多媒体组件808包括在装置800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当设备800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may not only sense a boundary of a touch or a swipe action, but also detect duration and pressure associated with the touch or swipe operation. In some embodiments, the multimedia component 808 includes a front camera and/or a rear camera. When the device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capability.
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC),当装置800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a microphone (MIC) configured to receive external audio signals when the device 800 is in operation modes, such as call mode, recording mode and voice recognition mode. Received audio signals may be further stored in memory 804 or sent via communication component 816 . In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
I/O接口812为处理组件802和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module, which may be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: a home button, volume buttons, start button, and lock button.
传感器组件814包括一个或多个传感器,用于为装置800提供各个方面的状态评估。例如,传感器组件814可以检测到设备800的打开/关闭状态,组件的相对定位,例如组件为装置800的显示器和小键盘,传感器组件814还可以检测装置800或装置800一个组件的位置改变,用户与装置800接触的存在或不存在,装置800方位或加速/减速和装置800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。Sensor assembly 814 includes one or more sensors for providing status assessments of various aspects of device 800 . For example, the sensor component 814 can detect the open/closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, the sensor component 814 can also detect a change in the position of the device 800 or a component of the device 800, the user Presence or absence of contact with device 800 , device 800 orientation or acceleration/deceleration and temperature change of device 800 . Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. Sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
通信组件816被配置为便于装置800和其他设备之间有线或无线方式的通信。装置800可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信部件816经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,通信部件816还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。The communication component 816 is configured to facilitate wired or wireless communication between the apparatus 800 and other devices. The device 800 can access wireless networks based on communication standards, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology and other technologies.
在示例性实施例中,装置800可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, apparatus 800 may be programmed by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation for performing the methods described above.
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器804,上述指令可由装置800的处理器820执行以完成上述方法。例如,非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium including instructions, such as the memory 804 including instructions, which can be executed by the processor 820 of the device 800 to implement the above method. For example, the non-transitory computer readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
一种非临时性计算机可读存储介质,当存储介质中的指令由移动终端的处理器执行时,使得移动终端能够执行一种显示提示框的方法,方法包括:A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by the processor of the mobile terminal, the mobile terminal can execute a method for displaying a prompt box, the method comprising:
检测页面中的选择区域;Detect the selection area in the page;
获取所述操作选择区域在所述页面中的起始位置和终止位置;Obtain the start position and end position of the operation selection area in the page;
根据所述起始位置和所述终止位置之间的位置关系以及所述提示框的高度,确定所述提示框的显示位置。The display position of the prompt box is determined according to the positional relationship between the start position and the end position and the height of the prompt box.
可选的,所述根据所述起始位置和所述终止位置之间的位置关系以及所述提示框的高度,确定所述提示框的显示位置,包括:Optionally, the determining the display position of the prompt box according to the positional relationship between the start position and the end position and the height of the prompt box includes:
确定所述起始位置和/或所述终止位置是否在屏幕上可见;determining whether the start position and/or the end position are visible on the screen;
若所述起始位置在屏幕上不可见,使用选择区域的可见部分的顶部位置替换所述起始位置;if the starting position is not visible on the screen, replacing the starting position with the top position of the visible part of the selection area;
若所述终止位置在屏幕上不可见,使用选择区域的可见部分的底部位置替换所述终止位置。If the end position is not visible on the screen, replace the end position with the bottom position of the visible part of the selection area.
可选的,所述根据所述起始位置和所述终止位置之间的位置关系以及所述提示框的高度,确定所述提示框的显示位置,包括:Optionally, the determining the display position of the prompt box according to the positional relationship between the start position and the end position and the height of the prompt box includes:
当所述起始位置和所述终止位置之间能够容纳所述提示框时,在所述起始位置和所述终止位置之间显示所述提示框。When the prompt box can be accommodated between the start position and the end position, the prompt box is displayed between the start position and the end position.
可选的,所述当所述起始位置和所述终止位置之间容纳预设的提示框时,在所述起始位置和所述终止位置之间显示所述提示框,包括:Optionally, when a preset prompt box is accommodated between the start position and the end position, displaying the prompt box between the start position and the end position includes:
计算所述起始位置和所述终止位置之间的第一垂直距离;calculating a first vertical distance between the starting location and the ending location;
若所述第一垂直距离大于所述提示框的高度,在所述起始位置和所述终止位置之间显示所述提示框。If the first vertical distance is greater than the height of the prompt box, display the prompt box between the start position and the end position.
可选的,所述根据所述起始位置和所述终止位置之间的位置关系以及所述提示框的高度,确定所述提示框的显示位置,还包括:Optionally, the determining the display position of the prompt box according to the positional relationship between the start position and the end position and the height of the prompt box further includes:
获取所述起始位置与屏幕的顶部之间的第二垂直距离;Acquiring a second vertical distance between the starting position and the top of the screen;
若所述第二垂直距离大于所述提示框的高度,在所述起始位置的上方显示所述提示框;If the second vertical distance is greater than the height of the prompt box, display the prompt box above the starting position;
所述计算所述起始位置和所述终止位置之间的第一垂直距离,包括:The calculating the first vertical distance between the starting position and the ending position includes:
若所述第二垂直距离小于所述提示框的高度,计算所述起始位置和所述终止位置之间的第一垂直距离。If the second vertical distance is smaller than the height of the prompt box, calculate a first vertical distance between the starting position and the ending position.
可选的,所述根据所述起始位置和所述终止位置之间的位置关系以及所述提示框的高度,确定所述提示框的显示位置,还包括:Optionally, the determining the display position of the prompt box according to the positional relationship between the start position and the end position and the height of the prompt box further includes:
若所述第一垂直距离小于所述提示框的高度,在所述终止位置的下方显示所述提示框。If the first vertical distance is smaller than the height of the prompt box, display the prompt box below the end position.
可选的,所述根据所述起始位置和所述终止位置之间的位置关系以及所述提示框的高度,确定所述提示框的显示位置,还包括:Optionally, the determining the display position of the prompt box according to the positional relationship between the start position and the end position and the height of the prompt box further includes:
根据预设区域与提示框高度的对应关系,确定所述选择区域对应的提示框高度;According to the corresponding relationship between the preset area and the height of the prompt box, determine the height of the prompt box corresponding to the selection area;
获取确定的提示框高度作为所述提示框的高度。Obtain the determined height of the prompt box as the height of the prompt box.
本领域技术人员在考虑说明书及实践这里公开的公开后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Other embodiments of the present disclosure will be readily apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any modification, use or adaptation of the present disclosure, and these modifications, uses or adaptations follow the general principles of the present disclosure and include common knowledge or conventional technical means in the technical field not disclosed in the present disclosure . The specification and examples are to be considered exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It should be understood that the present disclosure is not limited to the precise constructions which have been described above and shown in the drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (15)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610267135.3A CN105975199A (en) | 2016-04-26 | 2016-04-26 | Method and device for displaying prompt box |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610267135.3A CN105975199A (en) | 2016-04-26 | 2016-04-26 | Method and device for displaying prompt box |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN105975199A true CN105975199A (en) | 2016-09-28 |
Family
ID=56993884
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201610267135.3A Pending CN105975199A (en) | 2016-04-26 | 2016-04-26 | Method and device for displaying prompt box |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN105975199A (en) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102087572A (en) * | 2009-12-02 | 2011-06-08 | 乐金电子(中国)研究开发中心有限公司 | Display method and device of Chinese character input window of mobile terminal |
| CN103425395A (en) * | 2013-08-29 | 2013-12-04 | 宇龙计算机通信科技(深圳)有限公司 | Text copying method and mobile terminal |
| CN104102424A (en) * | 2013-04-05 | 2014-10-15 | 索尼公司 | Information processing apparatus, information processing method, and program |
| CN104142786A (en) * | 2014-07-26 | 2014-11-12 | 珠海市君天电子科技有限公司 | Prompt box display method and terminal |
| CN105005430A (en) * | 2015-07-17 | 2015-10-28 | 深圳市金立通信设备有限公司 | Window display method and terminal |
-
2016
- 2016-04-26 CN CN201610267135.3A patent/CN105975199A/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102087572A (en) * | 2009-12-02 | 2011-06-08 | 乐金电子(中国)研究开发中心有限公司 | Display method and device of Chinese character input window of mobile terminal |
| CN104102424A (en) * | 2013-04-05 | 2014-10-15 | 索尼公司 | Information processing apparatus, information processing method, and program |
| CN103425395A (en) * | 2013-08-29 | 2013-12-04 | 宇龙计算机通信科技(深圳)有限公司 | Text copying method and mobile terminal |
| CN104142786A (en) * | 2014-07-26 | 2014-11-12 | 珠海市君天电子科技有限公司 | Prompt box display method and terminal |
| CN105005430A (en) * | 2015-07-17 | 2015-10-28 | 深圳市金立通信设备有限公司 | Window display method and terminal |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN107153541B (en) | Browsing interaction processing method and device | |
| CN108509232A (en) | Screen recording method, device and computer readable storage medium | |
| WO2016023341A1 (en) | Application program corner mark adding method and apparatus | |
| CN107357505A (en) | The method, apparatus and computer-readable recording medium of screenshot capture | |
| CN106980409B (en) | Input control method and device | |
| CN108595074A (en) | Status bar operating method, device and computer readable storage medium | |
| EP2921969A1 (en) | Method and apparatus for centering and zooming webpage and electronic device | |
| CN110968364B (en) | Methods, devices and smart devices for adding shortcut plug-ins | |
| EP3016048A1 (en) | Method and device for displaying a reminder based on geographic criteria | |
| CN106126018A (en) | Desktop icons sort method and device | |
| CN106598429A (en) | Method and device for adjusting window of mobile terminal | |
| CN106354504B (en) | Message display method and device | |
| CN106095236A (en) | The method and device of arranging desktop icons | |
| CN106844717A (en) | Webpage search display methods and device | |
| CN106325670A (en) | Message prompting method and device | |
| CN104199609A (en) | Cursor positioning method and device | |
| CN107239351A (en) | Method of attaching and device | |
| CN106888309A (en) | The fingerprint recognition reminding method and device of video terminal | |
| CN113126843B (en) | Method, device and storage medium for exchanging positions of application icons | |
| CN106126050B (en) | Menu display method and device | |
| CN106919302B (en) | Operation control method and device of mobile terminal | |
| CN106445376B (en) | Webpage operation method and device | |
| CN107491238A (en) | The display methods and device of pushed information | |
| CN107390929A (en) | Control method, device and the storage medium of touch-control system | |
| CN106775247A (en) | The method and intelligent terminal of application icon movement |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20160928 |
|
| RJ01 | Rejection of invention patent application after publication |