WO2019071677A1 - Control method and device for control, electronic device and readable storage medium - Google Patents

Control method and device for control, electronic device and readable storage medium Download PDF

Info

Publication number
WO2019071677A1
WO2019071677A1 PCT/CN2017/109573 CN2017109573W WO2019071677A1 WO 2019071677 A1 WO2019071677 A1 WO 2019071677A1 CN 2017109573 W CN2017109573 W CN 2017109573W WO 2019071677 A1 WO2019071677 A1 WO 2019071677A1
Authority
WO
WIPO (PCT)
Prior art keywords
text
coordinate
control
coordinates
line
Prior art date
Application number
PCT/CN2017/109573
Other languages
French (fr)
Chinese (zh)
Inventor
陈娇
陈少杰
张文明
Original Assignee
武汉斗鱼网络科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 武汉斗鱼网络科技有限公司 filed Critical 武汉斗鱼网络科技有限公司
Publication of WO2019071677A1 publication Critical patent/WO2019071677A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs

Definitions

  • the present invention relates to the field of computer technologies, and in particular, to a control method, apparatus, electronic device, and readable storage medium.
  • Android native controls can only display a single text style. If you need to display a variety of different styles of strings in the interface, you need to create a separate control for each style of string.
  • an object of embodiments of the present invention is to provide a control method, apparatus, electronic device, and readable storage medium.
  • Each text object in the data table is drawn in the control according to coordinates and style parameters corresponding to the text object.
  • the embodiment of the invention further provides a control device, and the control device includes:
  • the encapsulation module is configured to invoke the text adding device to encapsulate the incoming string and the corresponding style parameter into a text object and store the data in the data table;
  • the drawing module is configured to draw each text object in the data table in the control according to coordinates and style parameters corresponding to the text object.
  • An embodiment of the present invention further provides an electronic device, including:
  • control device that is installed/stored in the memory and executed by the processor.
  • An embodiment of the present invention further provides a readable storage medium on which a computer program is stored, where the computer program is The above control control method is implemented at the time of execution.
  • control method, the device, the electronic device and the readable storage medium of the embodiment of the present invention can add a character string and a corresponding style parameter as needed by calling a text adding method, and the number of added strings and each
  • the style parameters of the group string are not limited, so that the last generated space can display multiple styles of strings.
  • FIG. 1 is a block diagram of an electronic device according to a preferred embodiment of the present invention.
  • FIG. 2 is a flowchart of a control method of a control according to a preferred embodiment of the present invention.
  • FIG. 3 is a flowchart of step S102 of the control method of the control according to the preferred embodiment of the present invention.
  • FIG. 4 is a schematic diagram of functional modules of a control device according to a preferred embodiment of the present invention.
  • FIG. 1 it is a block schematic diagram of an electronic device 100.
  • the electronic device 100 includes a control device 110, a memory 111, a memory controller 112, a processor 113, a peripheral interface 114, an input and output unit 115, and a display unit 116.
  • a control device 110 includes a memory 111, a memory controller 112, a processor 113, a peripheral interface 114, an input and output unit 115, and a display unit 116.
  • FIG. 1 is merely illustrative and does not limit the structure of the electronic device 100.
  • electronic device 100 may also include more or fewer components than those shown in FIG. 1, or have a different configuration than that shown in FIG.
  • the electronic device 100 in this embodiment may be a mobile electronic device, and an Android system is installed in the mobile electronic device.
  • the components of the memory 111, the memory controller 112, the processor 113, the peripheral interface 114, the input and output unit 115, and the display unit 116 are electrically connected directly or indirectly to each other to implement data transmission or interaction.
  • the components can be electrically connected to one another via one or more communication buses or signal lines.
  • the control device 110 includes at least one software function module that can be stored in the memory 111 or is solidified in an operating system (OS) of the electronic device 100 in the form of software or firmware.
  • the processor 113 is configured to execute an executable module stored in a memory, such as a software function module or a computer program included in the control device 110.
  • the memory 111 can be, but not limited to, a random access memory (RAM), a read only memory (ROM), and a programmable read-only memory (PROM). Erasable Programmable Read-Only Memory (EPROM), Electric Erasable Programmable Read-Only Memory (EEPROM), and the like.
  • RAM random access memory
  • ROM read only memory
  • PROM programmable read-only memory
  • EPROM Erasable Programmable Read-Only Memory
  • EEPROM Electric Erasable Programmable Read-Only Memory
  • the memory 111 is configured to store a program, and the processor 113 executes the program after receiving an execution instruction.
  • the method performed by the process-defined electronic device 100 disclosed in any embodiment of the present invention may be applied to the processor 113 or implemented by the processor 113.
  • the processor 113 can be an integrated circuit chip with signal processing capabilities.
  • the processor 113 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP processor, etc.), or a digital signal processor (DSP), an application specific integrated circuit. (ASIC), Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component.
  • the above-described general-purpose processors may implement or perform the various methods, steps, and logic blocks disclosed in the embodiments of the present invention.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • peripheral interface 114 couples various input/input devices to the processor 113 and the memory 111.
  • peripheral interface 114, processor 113, and memory controller 112 can be implemented in a single chip.
  • the peripheral interface 114, the processor 113, and the memory controller 112 described above may each be implemented by separate chips.
  • the input and output unit 115 is configured to provide input data to a user.
  • the input and output unit 115 may be, but not limited to, a mouse, a keyboard, and the like.
  • the display unit 116 is configured to provide an interactive interface (eg, a user interface) between the electronic device 100 and a user or configured to display image data to a user reference.
  • the display unit may be a liquid crystal display or other type of display, and the display unit may be a non-touch display or a touch display.
  • a touch display it may include a capacitive touch screen or a resistive touch screen that supports single-point and multi-touch operations. Supporting single-point and multi-touch operations means that the touch display can sense a position generated from the touch display A touch operation or a touch operation simultaneously generated at a plurality of locations, and the touch operation is performed by the processor 113 for calculation and processing.
  • FIG. 2 is a flowchart of a control method applied to the electronic device shown in FIG. 1 according to a preferred embodiment of the present invention. The specific flow shown in FIG. 2 will be described in detail below.
  • Step S101 the invoking text adding method encapsulates the incoming string and the corresponding style parameter into a text object and stores the data in the data table.
  • the style parameter may include a character string display color, a display font, a display size, and whether the character string responds to a click event or the like.
  • step S101 may add the string and the corresponding style parameter through the addText() method.
  • the addText() method may include four parameters, namely text text, color color, response to event onclick, and display size. For example, addText(String text, int Color, boolean onclick, int size).
  • the addText() method may be preset by a technician.
  • the size parameter may be empty.
  • the display size of the string whose size parameter is empty in the control is a preset default size.
  • multiple sets of text objects may be added to the data table by calling the addText() method multiple times, and the style parameters of each group of text objects may be the same or different.
  • Step S102 setting coordinates for the text object in the data table.
  • step S102 includes: traversing the text objects in the data table, and setting corresponding coordinates for the text objects one by one according to the display size parameter.
  • the onMeasure() method can be used to set the corresponding coordinates for the text objects in the data table.
  • each set of character strings is displayed as an area in the control.
  • the coordinates of the four boundaries may be used to represent a rectangular area.
  • the coordinates corresponding to each of the text objects include a left coordinate, a right coordinate, a lower coordinate, and an upper coordinate, wherein a difference between the left coordinate and the right coordinate is a width required by the text object, and the upper coordinate is The difference between the lower coordinates is the height required for the text object.
  • the coordinate corresponding to the text object setting may also be composed of two-digit coordinates, and the distance between the coordinates of any two adjacent text objects is not less than two-dimensional of the sum of the sizes of the two text objects.
  • the length of one For example, if the A object and the B object are two horizontally adjacent objects, the difference between the horizontal coordinate of the A object and the horizontal coordinate of the B object is not less than one-half the sum of the required lengths of the horizontal levels of the A object and the B object.
  • the A object and the C object are two vertical
  • the difference between the vertical coordinates of the A object and the vertical coordinates of the C object is not less than one-half of the sum of the vertical required lengths of the A object and the C object.
  • Step S103 each text object in the data table is drawn in the control according to coordinates and style parameters corresponding to the text object.
  • the coordinates and style parameters corresponding to each text object in the data table are drawn in the control using the onDraw() method.
  • two sets of strings “Announcer” and “2330” need to be displayed in a control.
  • the display style is: display “Announcement” as red; “2330” as orange. Then the two words “Announce” are drawn in red and displayed in the control, and the "2330” is drawn in orange to be displayed in the control.
  • the two sets of strings “Announcer” "2330" are not set in size, they can be displayed in the control with a preset default size.
  • the style parameter includes a response click event parameter, please refer to FIG. 2 again, the method further includes: step S104 to step S106.
  • Step S104 receiving a click operation of the user by the user.
  • control includes two sets of strings “Announcer” and "2330".
  • the user's click may be by clicking on “Announcer” or "2330".
  • response click event parameter corresponding to the "Announcer” is true, and the "2330" response click event parameter is false.
  • Step S105 Determine whether the location of the click operation is within a coordinate range of any text object in the data table that is responsive to the click event parameter. In other words, it is determined whether the position of the click operation is within a coordinate range, and the coordinate range refers to a coordinate range of any text object in the data table that responds to the click event parameter as true.
  • the custom decision method onTouchEvent() method determines whether the location of the click operation is within a coordinate range of any text object in the data table that responds to the click event parameter being true. In other words, in this example, the custom determination method onTouchEvent() method determines whether the position of the click operation is within a coordinate range, and the coordinate range refers to any text in the data table that responds to the click event parameter as true. The coordinate range of the object.
  • the response click event parameter corresponding to the “host” is true, and it is determined whether the location of the click operation is within the coordinate range in which the two words “host” are located.
  • step S106 is performed; otherwise the flow ends.
  • Step S106 responding to a click event corresponding to the location of the click operation.
  • the click event corresponding to the “host” may be displaying an anchor card, and if the click event corresponding to the “owner” is displaying an anchor card, the anchor card may be displayed in a small window mode.
  • the onDraw() method may be a drawing of the android native display control TextView. Method of production.
  • the onMeasure() method, the addText() method, and the onTouchEvent() method are custom methods.
  • a character string and a corresponding style parameter can be added as needed by calling a text adding method.
  • the number of strings added and the style parameters of each set of strings are not limited, so that the resulting space can display multiple styles of strings.
  • each set of strings can also respond to click events, and a single control can display multiple texts and multiple response click events.
  • the step S102 includes steps S1021 to S1025.
  • Step S1021 setting a width for the control.
  • step S1022 the length of the control is initialized and set to zero.
  • the width of the control may be preset, and the length of the control may be generated according to the amount and size of the character string to be displayed.
  • the length of the control may be preset, and the width of the control may be generated according to the amount and size of the string to be displayed.
  • Step S1023 setting corresponding coordinates for each text object in the data table.
  • the left coordinate of the first text element is set to zero
  • the upper coordinate is set to the upper coordinate of the line
  • the right coordinate is set to the text element.
  • the width and bottom coordinates are set to the height of the text element.
  • the left coordinate of the Mth text element is set to the right coordinate of the M-1 element
  • the upper coordinate is set to be the same as the upper coordinate of the M-1 element
  • the right coordinate is set.
  • the sum of the width of the Mth element and the right coordinate of the M-1th element, and the lower coordinate is set to the sum of the upper coordinate of the line and the line height of the line text element, wherein the line height of the line text element is The highest value of the height of all text elements in the line.
  • the coordinates of the text element of the next line are set in the above manner.
  • the upper coordinate of the first row is zero
  • the upper coordinate of the Xth row is the sum of the upper coordinate of the X-1th row and the row height of the X-1th row.
  • each line of text element set the left and upper coordinates of the first text element to the current value of the control, the right coordinate to the width of the text element, and the lower coordinate to the control.
  • the current value of the control is zero.
  • the left coordinate of the Mth text element is set to the right coordinate of the M-1 element
  • the upper coordinate is set to be the same as the upper coordinate of the M-1 element
  • the right coordinate is set.
  • the sum of the width of the Mth element and the right coordinate of the M-1th element, and the lower coordinate is set to the sum of the current value of the length of the control and the line height of the line of the line, wherein the line height of the line of text elements The highest value for the height of all text elements in the line.
  • the width of the Nth element plus the right coordinate value of the N-1th element is greater than the width of the preset control, the coordinates of the next line of text elements are set in the above manner, and the length of the control is reset to The sum of the current value and the row height of the previous row.
  • Step S1024 after calculating the coordinates corresponding to each text object, setting the coordinates of the text object to the coordinate member variables of the text object.
  • step S1025 the value of the length of the control is reset to the value of the coordinates of the last line of text elements.
  • the value of the length of the control can also be the sum of the line heights of each line.
  • FIG. 4 is a functional block diagram of the control device 110 shown in FIG. 1 according to a preferred embodiment of the present invention.
  • the various modules and units of the control device 110 are configured to perform the various steps of the method embodiments described above.
  • the control device 110 includes a package module 1101, a setting module 1102, and a drawing module 1103.
  • the encapsulating module 1101 is configured to invoke a text adding device to encapsulate the incoming string and the corresponding style parameter into a text object and store the data in the data table.
  • the setting module 1102 is configured to set coordinates of a text object in the data table.
  • the drawing module 1103 is configured to draw each text object in the data table in a control according to coordinates and style parameters corresponding to the text object.
  • the style parameter includes a response click event parameter
  • the control device 110 further includes: a receiving module 1104, a determining module 1105, and a response module 1106.
  • the receiving module 1104 is configured to receive a user click operation on the control.
  • the determining module 1105 is configured to determine whether the location of the click operation operation is within a coordinate range of any text object in the data table that is responsive to the click event parameter.
  • the response module 1106 is configured to respond to a click event corresponding to the location of the click operation when the location of the click operation operation is within a coordinate range of any text object that is responsive to the click event parameter.
  • the setting module 1102 is further configured to set the left coordinate of the first text element to zero, the upper coordinate to the upper coordinate of the row, and the right coordinate to the
  • the width and lower coordinates of the text element are set to the height of the text element; for the Mth text element of each line, the left coordinate of the Mth text element is set to the right coordinate of the M-1 element, and the upper coordinate is set to Same as the upper coordinate of the M-1th element, the right coordinate is set to the sum of the width of the Mth element and the right coordinate of the M-1th element, and the lower coordinate is set to the upper coordinate of the line plus the line text element Row height, where the row height of the line text element is the highest value of the height of all text elements in the row; when the width of the Nth element plus the right coordinate value of the N-1th element is greater than the preset control For width, set the coordinates for the text element of the next line in the above manner.
  • the upper coordinate of the first row is zero
  • the upper coordinate of the Xth row is
  • the setting module 1102 is further configured to set the left and upper coordinates of the first text element to the current value of the control and the right coordinate to the text element for each line of text element.
  • the width and lower coordinates are set to the current value of the control plus the height of the text element.
  • the length of the control The current value of the degree is zero; for the Mth text element of each line, the left coordinate of the Mth text element is set to the right coordinate of the M-1 element, and the upper coordinate is set to be the upper M-1 element
  • the coordinates are the same, the right coordinate is set to the sum of the width of the Mth element and the right coordinate of the M-1th element, and the lower coordinate is set to the current value of the length of the control plus the line height of the line of the line element, wherein the line of text
  • the row height of the element is the highest value of the height of all the text elements in the row; when the width of the Nth element plus the right coordinate value of the N-1th element is greater than the width of the preset control, the above method is used.
  • the text element of a line sets the coordinates and resets the length of the control to the current value plus the line height of one line.
  • a character string and a corresponding style parameter can be added as needed by calling a text adding method.
  • the number of strings added and the style parameters of each set of strings are not limited, so that the resulting space can display multiple styles of strings.
  • each set of strings can also respond to click events, and a single control can display multiple texts and multiple response click events.
  • the embodiment of the present invention provides a readable storage medium, on which a computer program is stored, and the computer program implements the control method provided by the foregoing embodiment when executed.
  • each block of the flowchart or block diagram can represent a module, a program segment, or a portion of code that includes one or more of the Executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks may also occur in a different order than those illustrated in the drawings.
  • each block of the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts can be implemented in a dedicated hardware-based system that performs the specified function or action. Or it can be implemented by a combination of dedicated hardware and computer instructions.
  • each functional module in each embodiment of the present invention may be integrated to form a separate part, or each module may exist separately, or two or more modules may be integrated to form a separate part.
  • the functions, if implemented in the form of software functional modules and sold or used as separate products, may be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product, which is stored in a storage medium, including
  • the instructions are used to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), and a random memory.
  • the control method, device, electronic device and readable storage medium of the embodiment of the present invention can add a character string and a corresponding style parameter as needed by calling a text adding method.
  • the number of strings added and the style parameters of each set of strings are not limited, so that the resulting space can display multiple styles of strings.

Abstract

A control method and device for a control, an electronic device and a readable storage medium. The control method for a control comprises: invoking a text adding method to encapsulate an incoming character string and a corresponding style parameter into a text object and storing same in a data table (S101); setting coordinates for the text object in the data table (S102); and drawing each text object in the data table in a control according to the coordinates and style parameter corresponding to the text object (S103). The character string and the corresponding style parameter can be added as needed by invoking the text adding method. The number of added strings and the style parameter of each set of strings are not limited so that the last generated space can display strings of a plurality of styles.

Description

控件控制方法、装置、电子设备及可读存储介质Control method, device, electronic device and readable storage medium
本申请要求于2017年10月09日提交中国专利局的申请号为CN2017109285838、名称为“控件控制方法、装置、电子设备及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. CN2017109285838, entitled "Control Control Method, Apparatus, Electronic Device, and Readable Storage Medium", filed on October 09, 2017, the entire contents of which are hereby incorporated by reference. Combined in this application.
技术领域Technical field
本发明涉及计算机技术领域,特别是涉及一种控件控制方法、装置、电子设备及可读存储介质。The present invention relates to the field of computer technologies, and in particular, to a control method, apparatus, electronic device, and readable storage medium.
背景技术Background technique
android的原生控件只能显示单一的文字风格。若需要在界面中显示多种不同风格的字符串,则需要就每一种风格的字符串分别创建一个控件。Android native controls can only display a single text style. If you need to display a variety of different styles of strings in the interface, you need to create a separate control for each style of string.
发明内容Summary of the invention
有鉴于此,本发明实施例的目的在于提供一种控件控制方法、装置、电子设备及可读存储介质。In view of this, an object of embodiments of the present invention is to provide a control method, apparatus, electronic device, and readable storage medium.
本发明实施例提供的一种控件控制方法,所述控件控制方法包括:A control method for controlling a control provided by an embodiment of the present invention includes:
调用文本添加方法将传入的字符串及对应的风格参数封装成文本对象并存储在数据表中;Calling the text adding method to encapsulate the incoming string and the corresponding style parameter into a text object and storing it in the data table;
为所述数据表中的文本对象设置坐标;以及Setting coordinates for text objects in the data table;
将所述数据表中的每个文本对象根据该文本对象对应的坐标及风格参数绘制在控件中。Each text object in the data table is drawn in the control according to coordinates and style parameters corresponding to the text object.
本发明实施例还提供一种控件控制装置,所述控件控制装置包括:The embodiment of the invention further provides a control device, and the control device includes:
封装模块,被配置成调用文本添加装置将传入的字符串及对应的风格参数封装成文本对象并存储在数据表中;The encapsulation module is configured to invoke the text adding device to encapsulate the incoming string and the corresponding style parameter into a text object and store the data in the data table;
设置模块,被配置成为所述数据表中的文本对象设置坐标;以及Setting a module configured to set a coordinate of a text object in the data table;
绘制模块,被配置成将所述数据表中的每个文本对象根据该文本对象对应的坐标及风格参数绘制在控件中。The drawing module is configured to draw each text object in the data table in the control according to coordinates and style parameters corresponding to the text object.
本发明实施例还提供一种电子设备,包括:An embodiment of the present invention further provides an electronic device, including:
存储器;Memory
处理器;processor;
安装/存储于所述存储器并由所述处理器执行的上述的控件控制装置。The above-described control device that is installed/stored in the memory and executed by the processor.
本发明实施例还提供一种可读存储介质,其上存储有计算机程序,所述计算机程序在 执行时实现上述的控件控制方法。An embodiment of the present invention further provides a readable storage medium on which a computer program is stored, where the computer program is The above control control method is implemented at the time of execution.
与现有技术相比,本发明实施例的控件控制方法、装置、电子设备及可读存储介质,通过调用文本添加方法可以按照需要添加字符串及对应的风格参数,添加的字符串数量及每组字符串的风格参数不受限制,以使最后生成的空间可以显示多种风格的字符串。Compared with the prior art, the control method, the device, the electronic device and the readable storage medium of the embodiment of the present invention can add a character string and a corresponding style parameter as needed by calling a text adding method, and the number of added strings and each The style parameters of the group string are not limited, so that the last generated space can display multiple styles of strings.
为使本发明的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。The above described objects, features, and advantages of the invention will be apparent from the description and appended claims appended claims
附图说明DRAWINGS
为了更清楚地说明本发明实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本发明的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments will be briefly described below. It should be understood that the following drawings show only certain embodiments of the present invention, and therefore It should be seen as a limitation on the scope, and those skilled in the art can obtain other related drawings according to these drawings without any creative work.
图1为本发明较佳实施例提供的电子设备的方框示意图。FIG. 1 is a block diagram of an electronic device according to a preferred embodiment of the present invention.
图2为本发明较佳实施例提供的控件控制方法的流程图。FIG. 2 is a flowchart of a control method of a control according to a preferred embodiment of the present invention.
图3为本发明较佳实施例提供的控件控制方法的步骤S102的流程图。FIG. 3 is a flowchart of step S102 of the control method of the control according to the preferred embodiment of the present invention.
图4为本发明较佳实施例提供的控件控制装置的功能模块示意图。FIG. 4 is a schematic diagram of functional modules of a control device according to a preferred embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本发明实施例的组件可以以各种不同的配置来布置和设计。因此,以下对在附图中提供的本发明的实施例的详细描述并非旨在限制要求保护的本发明的范围,而是仅仅表示本发明的选定实施例。基于本发明的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of the embodiments of the invention, which are generally described and illustrated in the figures herein, may be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the invention in the claims All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。同时,在本发明的描述中,术语“第一”、“第二”等仅用于区分描述,而不能理解为指示或暗示相对重要性。It should be noted that similar reference numerals and letters indicate similar items in the following figures. Therefore, once an item is defined in one figure, it is not necessary to further define and explain it in the subsequent figures. Also, in the description of the present invention, the terms "first", "second", and the like are used merely to distinguish a description, and are not to be construed as indicating or implying a relative importance.
如图1所示,是一电子设备100的方框示意图。所述电子设备100包括控件控制装置110、存储器111、存储控制器112、处理器113、外设接口114、输入输出单元115、显示单元116。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对电子设备100的结构造成限定。例如,电子设备100还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。本实施例所述的电子设备100可以是移动电子设备,所述移动电子设备中安装有Android系统。 As shown in FIG. 1, it is a block schematic diagram of an electronic device 100. The electronic device 100 includes a control device 110, a memory 111, a memory controller 112, a processor 113, a peripheral interface 114, an input and output unit 115, and a display unit 116. It will be understood by those skilled in the art that the structure shown in FIG. 1 is merely illustrative and does not limit the structure of the electronic device 100. For example, electronic device 100 may also include more or fewer components than those shown in FIG. 1, or have a different configuration than that shown in FIG. The electronic device 100 in this embodiment may be a mobile electronic device, and an Android system is installed in the mobile electronic device.
所述存储器111、存储控制器112、处理器113、外设接口114、输入输出单元115及显示单元116各元件相互之间直接或间接地电性连接,以实现数据的传输或交互。例如,这些元件相互之间可通过一条或多条通讯总线或信号线实现电性连接。所述控件控制装置110包括至少一个可以软件或固件(Firmware)的形式存储于所述存储器111中或固化在所述电子设备100的操作系统(Operating System,OS)中的软件功能模块。所述处理器113被配置成执行存储器中存储的可执行模块,例如所述控件控制装置110包括的软件功能模块或计算机程序。The components of the memory 111, the memory controller 112, the processor 113, the peripheral interface 114, the input and output unit 115, and the display unit 116 are electrically connected directly or indirectly to each other to implement data transmission or interaction. For example, the components can be electrically connected to one another via one or more communication buses or signal lines. The control device 110 includes at least one software function module that can be stored in the memory 111 or is solidified in an operating system (OS) of the electronic device 100 in the form of software or firmware. The processor 113 is configured to execute an executable module stored in a memory, such as a software function module or a computer program included in the control device 110.
其中,所述存储器111可以是,但不限于,随机存取存储器(Random Access Memory,RAM),只读存储器(Read Only Memory,ROM),可编程只读存储器(Programmable Read-Only Memory,PROM),可擦除只读存储器(Erasable Programmable Read-Only Memory,EPROM),电可擦除只读存储器(Electric Erasable Programmable Read-Only Memory,EEPROM)等。其中,存储器111被配置成存储程序,所述处理器113在接收到执行指令后,执行所述程序。本发明任一实施例揭示的过程定义的电子设备100所执行的方法可以应用于处理器113中,或者由处理器113实现。The memory 111 can be, but not limited to, a random access memory (RAM), a read only memory (ROM), and a programmable read-only memory (PROM). Erasable Programmable Read-Only Memory (EPROM), Electric Erasable Programmable Read-Only Memory (EEPROM), and the like. The memory 111 is configured to store a program, and the processor 113 executes the program after receiving an execution instruction. The method performed by the process-defined electronic device 100 disclosed in any embodiment of the present invention may be applied to the processor 113 or implemented by the processor 113.
所述处理器113可以是一种集成电路芯片,具有信号的处理能力。上述的处理器113可以是通用处理器,包括中央处理器(Central Processing Unit,简称CPU)、网络处理器(Network Processor,简称NP)等;还可以是数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。上述的通用处理器可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The processor 113 can be an integrated circuit chip with signal processing capabilities. The processor 113 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP processor, etc.), or a digital signal processor (DSP), an application specific integrated circuit. (ASIC), Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component. The above-described general-purpose processors may implement or perform the various methods, steps, and logic blocks disclosed in the embodiments of the present invention. The general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
所述外设接口114将各种输入/输入装置耦合至处理器113以及存储器111。在一些实施例中,外设接口114、处理器113以及存储控制器112可以在单个芯片中实现。在其他一些实例中,上述的外设接口114、处理器113以及存储控制器112可以分别由独立的芯片实现。The peripheral interface 114 couples various input/input devices to the processor 113 and the memory 111. In some embodiments, peripheral interface 114, processor 113, and memory controller 112 can be implemented in a single chip. In other examples, the peripheral interface 114, the processor 113, and the memory controller 112 described above may each be implemented by separate chips.
所述输入输出单元115被配置成提供给用户输入数据。所述输入输出单元115可以是,但不限于,鼠标和键盘等。The input and output unit 115 is configured to provide input data to a user. The input and output unit 115 may be, but not limited to, a mouse, a keyboard, and the like.
所述显示单元116被配置成在所述电子设备100与用户之间提供一个交互界面(例如用户操作界面)或被配置成显示图像数据给用户参考。在本实施例中,所述显示单元可以是液晶显示器或者其他类型的显示器,所述显示单元可以为非触控显示器或触控显示器。若为触控显示器,其可包括支持单点和多点触控操作的电容式触控屏或电阻式触控屏等。支持单点和多点触控操作是指触控显示器能感应到来自该触控显示器的一个位置处产生的 触控操作或多个位置处同时产生的触控操作,并将该感应到的触控操作交由处理器113进行计算和处理。The display unit 116 is configured to provide an interactive interface (eg, a user interface) between the electronic device 100 and a user or configured to display image data to a user reference. In this embodiment, the display unit may be a liquid crystal display or other type of display, and the display unit may be a non-touch display or a touch display. In the case of a touch display, it may include a capacitive touch screen or a resistive touch screen that supports single-point and multi-touch operations. Supporting single-point and multi-touch operations means that the touch display can sense a position generated from the touch display A touch operation or a touch operation simultaneously generated at a plurality of locations, and the touch operation is performed by the processor 113 for calculation and processing.
请参阅图2,是本发明较佳实施例提供的应用于图1所示的电子设备的控件控制方法的流程图。下面将对图2所示的具体流程进行详细阐述。Please refer to FIG. 2 , which is a flowchart of a control method applied to the electronic device shown in FIG. 1 according to a preferred embodiment of the present invention. The specific flow shown in FIG. 2 will be described in detail below.
步骤S101,调用文本添加方法将传入的字符串及对应的风格参数封装成文本对象并存储在数据表中。Step S101, the invoking text adding method encapsulates the incoming string and the corresponding style parameter into a text object and stores the data in the data table.
进一步地,所述风格参数可以包括字符串显示颜色、显示字体、显示大小及字符串是否响应点击事件等。Further, the style parameter may include a character string display color, a display font, a display size, and whether the character string responds to a click event or the like.
在一个实例中,步骤S101可以通过addText()方法添加所述字符串及对应的风格参数。其中,所述addText()方法可包括四个参数,分别是文本text,颜色color,是否响应事件onclick及显示大小size。例如,addText(String text,int Color,boolean onclick,int size)。所述addText()方法可以是由技术人员预先设置。In an example, step S101 may add the string and the corresponding style parameter through the addText() method. The addText() method may include four parameters, namely text text, color color, response to event onclick, and display size. For example, addText(String text, int Color, boolean onclick, int size). The addText() method may be preset by a technician.
进一步地,所述大小参数可以为空,当所述大小为空时,大小参数为空的字符串在控件中的显示大小为预设的默认大小。Further, the size parameter may be empty. When the size is empty, the display size of the string whose size parameter is empty in the control is a preset default size.
进一步地,可以多次调用addText()方法向所述数据表中加入多组文本对象,每一组文本对象的风格参数可以相同也可以不同。Further, multiple sets of text objects may be added to the data table by calling the addText() method multiple times, and the style parameters of each group of text objects may be the same or different.
步骤S102,为所述数据表中的文本对象设置坐标。Step S102, setting coordinates for the text object in the data table.
进一步地,所述步骤S102包括:遍历所述数据表中的文本对象,根据所述显示大小参数逐一为所述文本对象设置对应的坐标。Further, the step S102 includes: traversing the text objects in the data table, and setting corresponding coordinates for the text objects one by one according to the display size parameter.
进一步地,在一个实例中,可以使用onMeasure()方法为所述数据表中的文本对象设置对应的坐标。Further, in one example, the onMeasure() method can be used to set the corresponding coordinates for the text objects in the data table.
本实施例中,每组字符串在控件中显示为一个区域,进一步地,在一种实施方式中,可以通过四个边界的坐标以表示一个矩形区域。具体地,每个所述文本对象对应的坐标包括左坐标、右坐标、下坐标、上坐标,其中所述左坐标和右坐标之差为所述文本对象所需的宽度,所述上坐标和下坐标之差为所述文本对象所需的高度。通过用四位坐标表示每个文本对象对应的位置,可以直接能通过坐标表示一个区域,方便识别每个字符串所在的区域,也方便在控件中绘制待显示的字符串。In this embodiment, each set of character strings is displayed as an area in the control. Further, in one embodiment, the coordinates of the four boundaries may be used to represent a rectangular area. Specifically, the coordinates corresponding to each of the text objects include a left coordinate, a right coordinate, a lower coordinate, and an upper coordinate, wherein a difference between the left coordinate and the right coordinate is a width required by the text object, and the upper coordinate is The difference between the lower coordinates is the height required for the text object. By using four-bit coordinates to represent the position of each text object, it is possible to directly represent an area by coordinates, to easily identify the area where each character string is located, and to conveniently draw the character string to be displayed in the control.
在另一种实施方式中,所述文本对象设置对应的坐标也可以由两位坐标组成,任意两个相邻的文本对象的坐标的距离不小于两个文本对象的大小之和的二分之一的长度。例如,A对象和B对象为两个水平相邻的对象,则A对象的水平坐标与B对象的水平坐标之差不小于A对象和B对象的水平所需长度之和的二分之一。例如,A对象和C对象为两个竖直 相邻的对象,则A对象的竖直坐标与C对象的竖直坐标之差不小于A对象和C对象的竖直所需长度之和的二分之一。In another implementation manner, the coordinate corresponding to the text object setting may also be composed of two-digit coordinates, and the distance between the coordinates of any two adjacent text objects is not less than two-dimensional of the sum of the sizes of the two text objects. The length of one. For example, if the A object and the B object are two horizontally adjacent objects, the difference between the horizontal coordinate of the A object and the horizontal coordinate of the B object is not less than one-half the sum of the required lengths of the horizontal levels of the A object and the B object. For example, the A object and the C object are two vertical For adjacent objects, the difference between the vertical coordinates of the A object and the vertical coordinates of the C object is not less than one-half of the sum of the vertical required lengths of the A object and the C object.
步骤S103,将所述数据表中的每个文本对象根据该文本对象对应的坐标及风格参数绘制在控件中。Step S103, each text object in the data table is drawn in the control according to coordinates and style parameters corresponding to the text object.
在一个实例中,使用onDraw()方法中将数据表中的每个文本对象对应的坐标及风格参数绘制在控件中。In one example, the coordinates and style parameters corresponding to each text object in the data table are drawn in the control using the onDraw() method.
例如,在一控件中需要显示两组字符串“主播”和“2330”。显示风格为:将“主播”显示为红色;将“2330”显示为橙色。则将“主播”两个字绘制成红色在所述控件中显示,将所述“2330”绘制成橙色在所述控件中显示。本实例中,两组字符串“主播”“2330”均未设置大小,则可以以预设的默认大小显示在所述控件中。For example, two sets of strings "Announcer" and "2330" need to be displayed in a control. The display style is: display "Announcement" as red; "2330" as orange. Then the two words "Announce" are drawn in red and displayed in the control, and the "2330" is drawn in orange to be displayed in the control. In this example, if the two sets of strings "Announcer" "2330" are not set in size, they can be displayed in the control with a preset default size.
进一步地,所述风格参数包括响应点击事件参数,请再次参阅图2,所述方法还包括:步骤S104至步骤S106。Further, the style parameter includes a response click event parameter, please refer to FIG. 2 again, the method further includes: step S104 to step S106.
步骤S104,接收用户对所述控件的点击操作。Step S104, receiving a click operation of the user by the user.
在一个实例中,所述控件中包括两组字符串“主播”和“2330”。用户的点击操作可能是点击“主播”或“2330”。在一个实例中,所述“主播”对应的响应点击事件参数为真,所述“2330”响应点击事件参数为假。In one example, the control includes two sets of strings "Announcer" and "2330". The user's click may be by clicking on "Announcer" or "2330". In one example, the response click event parameter corresponding to the "Announcer" is true, and the "2330" response click event parameter is false.
步骤S105,判断所述点击操作的位置是否在所述数据表中任何一个响应点击事件参数为真的文本对象的坐标范围内。换句话说,判断所述点击操作的位置是否在坐标范围内,该坐标范围是指所述数据表中任何一个响应点击事件参数为真的文本对象的坐标范围。Step S105: Determine whether the location of the click operation is within a coordinate range of any text object in the data table that is responsive to the click event parameter. In other words, it is determined whether the position of the click operation is within a coordinate range, and the coordinate range refers to a coordinate range of any text object in the data table that responds to the click event parameter as true.
在一个实例中,自定义判断方法onTouchEvent()方法判断所述点击操作的位置是否在所述数据表中任何一个响应点击事件参数为真的文本对象的坐标范围内。换句话说,在该实例中,自定义判断方法onTouchEvent()方法判断所述点击操作的位置是否在坐标范围内,该坐标范围是指所述数据表中任何一个响应点击事件参数为真的文本对象的坐标范围。In one example, the custom decision method onTouchEvent() method determines whether the location of the click operation is within a coordinate range of any text object in the data table that responds to the click event parameter being true. In other words, in this example, the custom determination method onTouchEvent() method determines whether the position of the click operation is within a coordinate range, and the coordinate range refers to any text in the data table that responds to the click event parameter as true. The coordinate range of the object.
本实例中,所述“主播”对应的响应点击事件参数为真,判断所述点击操作的位置是否在“主播”两个字所处的坐标范围内。In this example, the response click event parameter corresponding to the “host” is true, and it is determined whether the location of the click operation is within the coordinate range in which the two words “host” are located.
如果在任何一个响应点击事件参数为真的文本对象的坐标范围内,则执行步骤S106;否则流程结束。If in any coordinate range of the text object in response to the click event parameter being true, step S106 is performed; otherwise the flow ends.
步骤S106,响应所述点击操作的位置对应的点击事件。Step S106, responding to a click event corresponding to the location of the click operation.
在一个实例中,所述“主播”对应的点击事件可以是显示主播卡片,若所述“主播”对应的点击事件是显示主播卡片,则可以以一小窗口的模式显示所述主播卡片。In an example, the click event corresponding to the “host” may be displaying an anchor card, and if the click event corresponding to the “owner” is displaying an anchor card, the anchor card may be displayed in a small window mode.
本实施例中,所述onDraw()方法可以是android原生的显示控件TextView自带的绘 制方法。所述onMeasure()方法、addText()方法、onTouchEvent()方法为自定义的方法。In this embodiment, the onDraw() method may be a drawing of the android native display control TextView. Method of production. The onMeasure() method, the addText() method, and the onTouchEvent() method are custom methods.
根据本发明实施例的控件控制方法,通过调用文本添加方法可以按照需要添加字符串及对应的风格参数。添加的字符串数量及每组字符串的风格参数不受限制,以使最后生成的空间可以显示多种风格的字符串。另外,每组字符串也可以对应响应点击事件,一个控件可以实现多种文字的显示以及多种响应点击事件。According to the control method of the embodiment of the present invention, a character string and a corresponding style parameter can be added as needed by calling a text adding method. The number of strings added and the style parameters of each set of strings are not limited, so that the resulting space can display multiple styles of strings. In addition, each set of strings can also respond to click events, and a single control can display multiple texts and multiple response click events.
本实施例中,如图3所示,所述步骤S102包括:步骤S1021至步骤S1025。In this embodiment, as shown in FIG. 3, the step S102 includes steps S1021 to S1025.
步骤S1021,为所述控件设置宽度。Step S1021, setting a width for the control.
步骤S1022,初始化设置所述控件的长度为零。In step S1022, the length of the control is initialized and set to zero.
本实施例中,所述控件的宽度可以预先设定,所述控件的长度可以根据需要显示的字符串的量及大小生成。In this embodiment, the width of the control may be preset, and the length of the control may be generated according to the amount and size of the character string to be displayed.
在其它实施例中,所述控件的长度可以预先设定,所述控件的宽度可以根据需要显示的字符串的量及大小生成。In other embodiments, the length of the control may be preset, and the width of the control may be generated according to the amount and size of the string to be displayed.
步骤S1023,为所述数据表中每一个文本对象设置对应的坐标。Step S1023, setting corresponding coordinates for each text object in the data table.
在一种实施方式中,针对所述数据表中,每一行文本元素,将第一个文本元素的左坐标设置为零、上坐标设置为该行的上坐标、右坐标设置为该文本元素的宽度、下坐标设置为该文本元素的高度。针对每一行的第M个文本元素,将该第M个文本元素的左坐标设置为第M-1元素的右坐标、上坐标设置为与第M-1个元素的上坐标相同、右坐标设置为该第M个元素的宽度与第M-1个元素的右坐标之和、下坐标设置为该行的上坐标与该行文本元素的行高之和,其中该行文本元素的行高为该行中所有文本元素的高度的最高值。当第N个元素的宽度加上第N-1个元素的右坐标值大于预设的控件的宽度时,采用上述方式为下一行的文本元素设置坐标。本实施方式中,第一行的上坐标为零,第X行的上坐标为第X-1行的上坐标与第X-1行的行高之和。In one embodiment, for each line of text elements in the data table, the left coordinate of the first text element is set to zero, the upper coordinate is set to the upper coordinate of the line, and the right coordinate is set to the text element. The width and bottom coordinates are set to the height of the text element. For the Mth text element of each line, the left coordinate of the Mth text element is set to the right coordinate of the M-1 element, the upper coordinate is set to be the same as the upper coordinate of the M-1 element, and the right coordinate is set. The sum of the width of the Mth element and the right coordinate of the M-1th element, and the lower coordinate is set to the sum of the upper coordinate of the line and the line height of the line text element, wherein the line height of the line text element is The highest value of the height of all text elements in the line. When the width of the Nth element plus the right coordinate value of the N-1th element is greater than the width of the preset control, the coordinates of the text element of the next line are set in the above manner. In the present embodiment, the upper coordinate of the first row is zero, and the upper coordinate of the Xth row is the sum of the upper coordinate of the X-1th row and the row height of the X-1th row.
在另一种实施方式中,针对每一行文本元素,将第一个文本元素的左坐标和上坐标设置为控件的长度当前值、右坐标设置为该文本元素的宽度、下坐标设置为该控件的长度当前值与文本元素的高度之和,当该行为第一行时,所述控件的长度当前值为零。针对每一行的第M个文本元素,将该第M个文本元素的左坐标设置为第M-1元素的右坐标、上坐标设置为与第M-1个元素的上坐标相同、右坐标设置为该第M个元素的宽度与第M-1个元素的右坐标之和、下坐标设置为该控件的长度当前值与该行文本元素的行高之和,其中该行文本元素的行高为该行中所有文本元素的高度的最高值。当第N个元素的宽度加上第N-1个元素的右坐标值大于预设的控件的宽度时,采用上述方式为下一行的文本元素设置坐标,并且将所述控件的长度重置为当前值与上一行的行高之和。 In another embodiment, for each line of text element, set the left and upper coordinates of the first text element to the current value of the control, the right coordinate to the width of the text element, and the lower coordinate to the control. The sum of the current value of the length and the height of the text element. When the first line of the behavior, the current value of the control is zero. For the Mth text element of each line, the left coordinate of the Mth text element is set to the right coordinate of the M-1 element, the upper coordinate is set to be the same as the upper coordinate of the M-1 element, and the right coordinate is set. The sum of the width of the Mth element and the right coordinate of the M-1th element, and the lower coordinate is set to the sum of the current value of the length of the control and the line height of the line of the line, wherein the line height of the line of text elements The highest value for the height of all text elements in the line. When the width of the Nth element plus the right coordinate value of the N-1th element is greater than the width of the preset control, the coordinates of the next line of text elements are set in the above manner, and the length of the control is reset to The sum of the current value and the row height of the previous row.
步骤S1024,将每个文本对象对应的坐标计算出来后,将该文本对象的坐标设置给该文本对象的坐标成员变量。Step S1024, after calculating the coordinates corresponding to each text object, setting the coordinates of the text object to the coordinate member variables of the text object.
步骤S1025,将所述控件的长度的值重置为最后一行文本元素下坐标的值。In step S1025, the value of the length of the control is reset to the value of the coordinates of the last line of text elements.
可以理解的是,所述控件的长度的值也可以是每一行的行高之和。It can be understood that the value of the length of the control can also be the sum of the line heights of each line.
请参阅图4,是本发明较佳实施例提供的图1所示的控件控制装置110的功能模块示意图。所述控件控制装置110的各个模块及单元被配置成执行上述方法实施例中的各个步骤。所述控件控制装置110包括封装模块1101、设置模块1102及绘制模块1103。Please refer to FIG. 4 , which is a functional block diagram of the control device 110 shown in FIG. 1 according to a preferred embodiment of the present invention. The various modules and units of the control device 110 are configured to perform the various steps of the method embodiments described above. The control device 110 includes a package module 1101, a setting module 1102, and a drawing module 1103.
所述封装模块1101,被配置成调用文本添加装置将传入的字符串及对应的风格参数封装成文本对象并存储在数据表中。The encapsulating module 1101 is configured to invoke a text adding device to encapsulate the incoming string and the corresponding style parameter into a text object and store the data in the data table.
所述设置模块1102,被配置成为所述数据表中的文本对象设置坐标。The setting module 1102 is configured to set coordinates of a text object in the data table.
所述绘制模块1103,被配置成将所述数据表中的每个文本对象根据该文本对象对应的坐标及风格参数绘制在控件中。The drawing module 1103 is configured to draw each text object in the data table in a control according to coordinates and style parameters corresponding to the text object.
本实施例中,所述风格参数包括响应点击事件参数,所控件控制装置110还包括:接收模块1104、判断模块1105及响应模块1106。In this embodiment, the style parameter includes a response click event parameter, and the control device 110 further includes: a receiving module 1104, a determining module 1105, and a response module 1106.
所述接收模块1104,被配置成接收用户对所述控件的点击操作。The receiving module 1104 is configured to receive a user click operation on the control.
所述判断模块1105,被配置成判断所述点击操作操作的位置是否在所述数据表中任何一个响应点击事件参数为真的文本对象的坐标范围内。The determining module 1105 is configured to determine whether the location of the click operation operation is within a coordinate range of any text object in the data table that is responsive to the click event parameter.
所述响应模块1106,被配置成当点击操作操作的位置在任何一个响应点击事件参数为真的文本对象的坐标范围内,则响应所述点击操作的位置对应的点击事件。The response module 1106 is configured to respond to a click event corresponding to the location of the click operation when the location of the click operation operation is within a coordinate range of any text object that is responsive to the click event parameter.
在一种实施方式中,所述设置模块1102还被配置成针对每一行文本元素,将第一个文本元素的左坐标设置为零、上坐标设置为该行的上坐标、右坐标设置为该文本元素的宽度、下坐标设置为该文本元素的高度;针对每一行的第M个文本元素,将该第M个文本元素的左坐标设置为第M-1元素的右坐标、上坐标设置为与第M-1个元素的上坐标相同、右坐标设置为该第M个元素的宽度与第M-1个元素的右坐标之和、下坐标设置为该行的上坐标加该行文本元素的行高,其中该行文本元素的行高为该行中所有文本元素的高度的最高值;当第N个元素的宽度加上第N-1个元素的右坐标值大于预设的控件的宽度时,采用上述方式为下一行的文本元素设置坐标。本实施方式中,第一行的上坐标为零,第X行的上坐标为第X-1行的上坐标加第X-1行的行高。In an embodiment, the setting module 1102 is further configured to set the left coordinate of the first text element to zero, the upper coordinate to the upper coordinate of the row, and the right coordinate to the The width and lower coordinates of the text element are set to the height of the text element; for the Mth text element of each line, the left coordinate of the Mth text element is set to the right coordinate of the M-1 element, and the upper coordinate is set to Same as the upper coordinate of the M-1th element, the right coordinate is set to the sum of the width of the Mth element and the right coordinate of the M-1th element, and the lower coordinate is set to the upper coordinate of the line plus the line text element Row height, where the row height of the line text element is the highest value of the height of all text elements in the row; when the width of the Nth element plus the right coordinate value of the N-1th element is greater than the preset control For width, set the coordinates for the text element of the next line in the above manner. In this embodiment, the upper coordinate of the first row is zero, and the upper coordinate of the Xth row is the upper coordinate of the X-1th row plus the row height of the X-1th row.
在另一种实施方式中,所述设置模块1102还被配置成针对每一行文本元素,将第一个文本元素的左坐标和上坐标设置为控件的长度当前值、右坐标设置为该文本元素的宽度、下坐标设置为该控件的长度当前值加文本元素的高度,当该行为第一行时,所述控件的长 度当前值为零;针对每一行的第M个文本元素,将该第M个文本元素的左坐标设置为第M-1元素的右坐标、上坐标设置为与第M-1个元素的上坐标相同、右坐标设置为该第M个元素的宽度与第M-1个元素的右坐标之和、下坐标设置为该控件的长度当前值加该行文本元素的行高,其中该行文本元素的行高为该行中所有文本元素的高度的最高值;当第N个元素的宽度加上第N-1个元素的右坐标值大于预设的控件的宽度时,采用上述方式为下一行的文本元素设置坐标,并且将所述控件的长度重置为当前值加上一行的行高。In another embodiment, the setting module 1102 is further configured to set the left and upper coordinates of the first text element to the current value of the control and the right coordinate to the text element for each line of text element. The width and lower coordinates are set to the current value of the control plus the height of the text element. When the first line of the behavior, the length of the control The current value of the degree is zero; for the Mth text element of each line, the left coordinate of the Mth text element is set to the right coordinate of the M-1 element, and the upper coordinate is set to be the upper M-1 element The coordinates are the same, the right coordinate is set to the sum of the width of the Mth element and the right coordinate of the M-1th element, and the lower coordinate is set to the current value of the length of the control plus the line height of the line of the line element, wherein the line of text The row height of the element is the highest value of the height of all the text elements in the row; when the width of the Nth element plus the right coordinate value of the N-1th element is greater than the width of the preset control, the above method is used. The text element of a line sets the coordinates and resets the length of the control to the current value plus the line height of one line.
关于本实施例的其它细节可以进一步地参考上述方法实施例中的描述,在此不再赘述。For further details of the present embodiment, reference may be made to the description in the foregoing method embodiments, and details are not described herein again.
根据本发明实施例的控件控制装置,通过调用文本添加方法可以按照需要添加字符串及对应的风格参数。添加的字符串数量及每组字符串的风格参数不受限制,以使最后生成的空间可以显示多种风格的字符串。另外,每组字符串也可以对应响应点击事件,一个控件可以实现多种文字的显示以及多种响应点击事件。According to the control device of the embodiment of the present invention, a character string and a corresponding style parameter can be added as needed by calling a text adding method. The number of strings added and the style parameters of each set of strings are not limited, so that the resulting space can display multiple styles of strings. In addition, each set of strings can also respond to click events, and a single control can display multiple texts and multiple response click events.
本发明实施例提供一种可读存储介质,其上存储有计算机程序,所述计算机程序在执行时实现上述实施例提供的控件控制方法。The embodiment of the present invention provides a readable storage medium, on which a computer program is stored, and the computer program implements the control method provided by the foregoing embodiment when executed.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,也可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,附图中的流程图和框图显示了根据本发明的多个实施例的装置、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现方式中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may also be implemented in other manners. The apparatus embodiments described above are merely illustrative, for example, the flowcharts and block diagrams in the figures illustrate the architecture, functionality, and functionality of possible implementations of apparatus, methods, and computer program products according to various embodiments of the invention. operating. In this regard, each block of the flowchart or block diagram can represent a module, a program segment, or a portion of code that includes one or more of the Executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks may also occur in a different order than those illustrated in the drawings. For example, two consecutive blocks may be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts, can be implemented in a dedicated hardware-based system that performs the specified function or action. Or it can be implemented by a combination of dedicated hardware and computer instructions.
另外,在本发明各个实施例中的各功能模块可以集成在一起形成一个独立的部分,也可以是各个模块单独存在,也可以两个或两个以上模块集成形成一个独立的部分。In addition, each functional module in each embodiment of the present invention may be integrated to form a separate part, or each module may exist separately, or two or more modules may be integrated to form a separate part.
所述功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存 取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。The functions, if implemented in the form of software functional modules and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product, which is stored in a storage medium, including The instructions are used to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), and a random memory. Take a variety of media that can store program code, such as RAM (Random Access Memory), disk, or optical disk. It should be noted that, in this context, relational terms such as first and second are used merely to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply these entities or operations. There is any such actual relationship or order between them. Furthermore, the term "comprises" or "comprises" or "comprises" or any other variations thereof is intended to encompass a non-exclusive inclusion, such that a process, method, article, or device that comprises a plurality of elements includes not only those elements but also Other elements, or elements that are inherent to such a process, method, item, or device. An element that is defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, method, item, or device that comprises the element.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。The above description is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention. It should be noted that similar reference numerals and letters indicate similar items in the following figures. Therefore, once an item is defined in one figure, it is not necessary to further define and explain it in the subsequent figures.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应所述以权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of changes or substitutions within the technical scope of the present invention. It should be covered by the scope of the present invention. Therefore, the scope of the invention should be determined by the scope of the claims.
工业实用性Industrial applicability
本发明实施例的控件控制方法、装置、电子设备及可读存储介质,通过调用文本添加方法可以按照需要添加字符串及对应的风格参数。添加的字符串数量及每组字符串的风格参数不受限制,以使最后生成的空间可以显示多种风格的字符串。 The control method, device, electronic device and readable storage medium of the embodiment of the present invention can add a character string and a corresponding style parameter as needed by calling a text adding method. The number of strings added and the style parameters of each set of strings are not limited, so that the resulting space can display multiple styles of strings.

Claims (17)

  1. 一种控件控制方法,其特征在于,所述控件控制方法包括:A control control method, wherein the control control method comprises:
    调用文本添加方法将传入的字符串及对应的风格参数封装成文本对象并存储在数据表中;Calling the text adding method to encapsulate the incoming string and the corresponding style parameter into a text object and storing it in the data table;
    为所述数据表中的文本对象设置坐标;以及Setting coordinates for text objects in the data table;
    将所述数据表中的每个文本对象根据该文本对象对应的坐标及风格参数绘制在控件中。Each text object in the data table is drawn in the control according to coordinates and style parameters corresponding to the text object.
  2. 如权利要求1所述的控件控制方法,其特征在于,所述风格参数包括响应点击事件参数,所述方法还包括:The control method of claim 1, wherein the style parameter comprises a response to a click event parameter, the method further comprising:
    接收用户对所述控件的点击操作;Receiving a user click operation on the control;
    判断所述点击操作操作的位置是否在所述数据表中任何一个响应点击事件参数为真的文本对象的坐标范围内;Determining whether the location of the click operation operation is within a coordinate range of any text object in the data table that responds to the click event parameter is true;
    如果在任何一个响应点击事件参数为真的文本对象的坐标范围内,则响应所述点击操作的位置对应的点击事件。If in any coordinate range of the text object that responds to the click event parameter is true, respond to the click event corresponding to the location of the click operation.
  3. 如权利要求1所述的控件控制方法,其特征在于,所述风格参数包括所述字符串的显示大小,所述为所述数据表中的文本对象设置坐标的步骤包括:The control method according to claim 1, wherein the style parameter comprises a display size of the character string, and the step of setting coordinates for the text object in the data table comprises:
    遍历所述数据表中的文本对象,根据所述显示大小参数逐一为所述文本对象设置对应的坐标。Traversing the text objects in the data table, and setting corresponding coordinates for the text objects one by one according to the display size parameter.
  4. 如权利要求1-3任一项所述的控件控制方法,其特征在于,通过文本添加方法方法添加所述字符串及对应的风格参数。The control control method according to any one of claims 1 to 3, wherein the character string and the corresponding style parameter are added by a text adding method method.
  5. 如权利要求4所述的控件控制方法,其特征在于,所述文本添加方法方法包括四个参数,分别是文本、颜色、是否响应事件及显示大小。The control method according to claim 4, wherein the text adding method comprises four parameters, namely text, color, response event, and display size.
  6. 如权利要求5所述的控件控制方法,其特征在于,所述大小为空,大小参数为空的字符串在控件中的显示大小为预设的默认大小。The control method according to claim 5, wherein the display size of the character string whose size is empty and whose size parameter is empty is a preset default size.
  7. 如权利要求3所述的控件控制方法,其特征在于,每个所述文本对象的坐标由两位坐标组成,任意两个相邻的文本对象的坐标的距离不小于两个文本对象的大小之和的二分之一的长度。The control method according to claim 3, wherein the coordinates of each of the text objects are composed of two-dimensional coordinates, and the coordinates of the coordinates of any two adjacent text objects are not less than the size of the two text objects. And one-half the length.
  8. 如权利要求7所述的控件控制方法,其特征在于,任意水平相邻的文本对象的坐标的水平坐标之差不小于该两个文本对象的水平所需长度之和的二分之一。The control control method according to claim 7, wherein a difference in horizontal coordinates of coordinates of any horizontally adjacent text objects is not less than one-half of a sum of horizontal required lengths of the two text objects.
  9. 如权利要求7所述的控件控制方法,其特征在于,任意竖直相邻的文本对象的坐标 的竖直坐标之差不小于该两个文本对象的竖直所需长度之和的二分之一。A control method according to claim 7, wherein coordinates of any vertically adjacent text objects The difference in vertical coordinates is not less than one-half the sum of the vertical required lengths of the two text objects.
  10. 如权利要求3所述的控件控制方法,其特征在于,每个所述文本对象的坐标包括左坐标、右坐标、下坐标、上坐标,其中所述左坐标和右坐标之差为所述文本对象所需的宽度,所述上坐标和下坐标之差为所述文本对象所需的高度。The control method according to claim 3, wherein the coordinates of each of the text objects comprise a left coordinate, a right coordinate, a lower coordinate, and an upper coordinate, wherein a difference between the left coordinate and the right coordinate is the text The desired width of the object, the difference between the upper and lower coordinates being the height required for the text object.
  11. 如权利要求10所述的控件控制方法,其特征在于,所述遍历所述数据表中的文本对象,根据所述显示大小参数逐一为所述文本对象设置对应的坐标的步骤包括:The control method according to claim 10, wherein the step of traversing the text objects in the data table and setting corresponding coordinates for the text objects one by one according to the display size parameter comprises:
    针对所述数据表中,每一行文本元素,将第一个文本元素的左坐标设置为零、上坐标设置为该行的上坐标、右坐标设置为该文本元素的宽度、下坐标设置为该文本元素的高度;For each line of text element in the data table, set the left coordinate of the first text element to zero, the upper coordinate to the upper coordinate of the line, the right coordinate to the width of the text element, and the lower coordinate to the The height of the text element;
    针对每一行的第M个文本元素,将该第M个文本元素的左坐标设置为第M-1元素的右坐标、上坐标设置为与第M-1个元素的上坐标相同、右坐标设置为该第M个元素的宽度与第M-1个元素的右坐标之和、下坐标设置为该行的上坐标与该行文本元素的行高之和,其中该行文本元素的行高为该行中所有文本元素的高度的最高值;For the Mth text element of each line, the left coordinate of the Mth text element is set to the right coordinate of the M-1 element, the upper coordinate is set to be the same as the upper coordinate of the M-1 element, and the right coordinate is set. The sum of the width of the Mth element and the right coordinate of the M-1th element, and the lower coordinate is set to the sum of the upper coordinate of the line and the line height of the line text element, wherein the line height of the line text element is The highest value of the height of all text elements in the line;
    当第N个元素的宽度加上第N-1个元素的右坐标值大于预设的控件的宽度时,采用上述方式为下一行的文本元素设置坐标;When the width of the Nth element plus the right coordinate value of the N-1th element is greater than the width of the preset control, the coordinates of the text element of the next line are set in the above manner;
    其中,第一行的上坐标为零,第X行的上坐标为第X-1行的上坐标与第X-1行的行高之和。Wherein, the upper coordinate of the first row is zero, and the upper coordinate of the Xth row is the sum of the upper coordinate of the X-1th row and the row height of the X-1th row.
  12. 如权利要求10所述的控件控制方法,其特征在于,所述遍历所述数据表中的文本对象,根据所述显示大小参数逐一为所述文本对象设置对应的坐标的步骤包括:The control method according to claim 10, wherein the step of traversing the text objects in the data table and setting corresponding coordinates for the text objects one by one according to the display size parameter comprises:
    针对所述数据表中,每一行文本元素,将第一个文本元素的左坐标和上坐标设置为控件的长度当前值、右坐标设置为该文本元素的宽度、下坐标设置为该控件的长度当前值与文本元素的高度之和,当该行为第一行时,所述控件的长度当前值为零;For each line of text element in the data table, set the left and upper coordinates of the first text element to the current value of the control, the right coordinate to the width of the text element, and the lower coordinate to the length of the control. The sum of the current value and the height of the text element. When the first line of the behavior, the current value of the control is zero;
    针对每一行的第M个文本元素,将该第M个文本元素的左坐标设置为第M-1元素的右坐标、上坐标设置为与第M-1个元素的上坐标相同、右坐标设置为该第M个元素的宽度与第M-1个元素的右坐标之和、下坐标设置为该控件的长度当前值与该行文本元素的行高之和,其中该行文本元素的行高为该行中所有文本元素的高度的最高值;For the Mth text element of each line, the left coordinate of the Mth text element is set to the right coordinate of the M-1 element, the upper coordinate is set to be the same as the upper coordinate of the M-1 element, and the right coordinate is set. The sum of the width of the Mth element and the right coordinate of the M-1th element, and the lower coordinate is set to the sum of the current value of the length of the control and the line height of the line of the line, wherein the line height of the line of text elements The highest value of the height of all text elements in the line;
    当第N个元素的宽度加上第N-1个元素的右坐标值大于预设的控件的宽度时,采用上述方式为下一行的文本元素设置坐标,并且将所述控件的长度重置为当前值与上一行的行高之和。When the width of the Nth element plus the right coordinate value of the N-1th element is greater than the width of the preset control, the coordinates of the next line of text elements are set in the above manner, and the length of the control is reset to The sum of the current value and the row height of the previous row.
  13. 一种控件控制装置,其特征在于,所述控件控制装置包括:A control device for controlling a control device, comprising:
    封装模块,被配置成调用文本添加装置将传入的字符串及对应的风格参数封装成文本对象并存储在数据表中; The encapsulation module is configured to invoke the text adding device to encapsulate the incoming string and the corresponding style parameter into a text object and store the data in the data table;
    设置模块,被配置成为所述数据表中的文本对象设置坐标;以及Setting a module configured to set a coordinate of a text object in the data table;
    绘制模块,被配置成将所述数据表中的每个文本对象根据该文本对象对应的坐标及风格参数绘制在控件中。The drawing module is configured to draw each text object in the data table in the control according to coordinates and style parameters corresponding to the text object.
  14. 如权利要求13所述的控件控制装置,其特征在于,所述风格参数包括响应点击事件参数,所述装置还包括:The control device of claim 13, wherein the style parameter comprises a response to a click event parameter, the device further comprising:
    接收模块,被配置成接收用户对所述控件的点击操作;a receiving module configured to receive a user click operation on the control;
    判断模块,被配置成判断所述点击操作操作的位置是否在所述数据表中任何一个响应点击事件参数为真的文本对象的坐标范围内;The determining module is configured to determine whether the location of the click operation operation is within a coordinate range of any text object in the data table that is responsive to the click event parameter;
    响应模块,被配置成当点击操作操作的位置在任何一个响应点击事件参数为真的文本对象的坐标范围内,则响应所述点击操作的位置对应的点击事件。The response module is configured to respond to the click event corresponding to the location of the click operation when the location of the click operation operation is within a coordinate range of any text object that is responsive to the click event parameter.
  15. 如权利要求13所述的控件控制装置,其特征在于,所述风格参数包括所述字符串的显示大小,所述设置模块还被配置成遍历所述数据表中的文本对象,根据所述显示大小参数逐一为所述文本对象设置对应的坐标。The control device according to claim 13, wherein said style parameter includes a display size of said character string, and said setting module is further configured to traverse a text object in said data table according to said display The size parameter sets the corresponding coordinates for the text object one by one.
  16. 一种电子设备,其特征在于,包括:An electronic device, comprising:
    存储器;Memory
    处理器;processor;
    安装/存储于所述存储器并由所述处理器执行的权利要求13-15任一项所述的控件控制装置。A control device as claimed in any one of claims 13 to 15 installed/stored in said memory and executed by said processor.
  17. 一种可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序在执行时实现上述权利要求1-12中任意一项所述的控件控制方法。 A readable storage medium having stored thereon a computer program, wherein the computer program, when executed, implements the control control method of any of the preceding claims 1-12.
PCT/CN2017/109573 2017-10-09 2017-11-06 Control method and device for control, electronic device and readable storage medium WO2019071677A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710928583.8A CN107643916A (en) 2017-10-09 2017-10-09 Control control method, device, electronic equipment and readable storage medium storing program for executing
CN201710928583.8 2017-10-09

Publications (1)

Publication Number Publication Date
WO2019071677A1 true WO2019071677A1 (en) 2019-04-18

Family

ID=61123079

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/109573 WO2019071677A1 (en) 2017-10-09 2017-11-06 Control method and device for control, electronic device and readable storage medium

Country Status (2)

Country Link
CN (1) CN107643916A (en)
WO (1) WO2019071677A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109213485A (en) * 2018-08-20 2019-01-15 武汉斗鱼网络科技有限公司 A kind of text folds implementation method, terminal device and storage medium
CN109388299A (en) * 2018-09-04 2019-02-26 广州优视网络科技有限公司 Display methods, device and the electronic equipment of interface object

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6388686B1 (en) * 1998-12-15 2002-05-14 International Business Machines Corporation Method, system and computer program product for rotating through a sequence of display states in a multi-field text string class in a graphical user interface
CN101944027A (en) * 2010-09-26 2011-01-12 北京神州泰岳软件股份有限公司 User interface generation method
CN104267945A (en) * 2014-09-22 2015-01-07 北京金山安全软件有限公司 Character display method and device and mobile terminal
CN105760177A (en) * 2016-03-16 2016-07-13 飞天诚信科技股份有限公司 Control text arrangement and display method and device applicable to Mac system
CN106681586A (en) * 2016-12-21 2017-05-17 广东欧珀移动通信有限公司 Placement position adjusting method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103186912B (en) * 2011-12-28 2016-07-06 北京神州泰岳软件股份有限公司 The method and system of word are shown with picture format
CN103077156A (en) * 2012-11-01 2013-05-01 广州汇讯营销咨询有限公司 Method for producing electronic magazine in mobile equipment
CN106598410B (en) * 2016-12-07 2018-10-23 掌阅科技股份有限公司 Display methods, device and the terminal device of e-book
CN107122104B (en) * 2017-03-29 2020-10-16 武汉斗鱼网络科技有限公司 Data display method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6388686B1 (en) * 1998-12-15 2002-05-14 International Business Machines Corporation Method, system and computer program product for rotating through a sequence of display states in a multi-field text string class in a graphical user interface
CN101944027A (en) * 2010-09-26 2011-01-12 北京神州泰岳软件股份有限公司 User interface generation method
CN104267945A (en) * 2014-09-22 2015-01-07 北京金山安全软件有限公司 Character display method and device and mobile terminal
CN105760177A (en) * 2016-03-16 2016-07-13 飞天诚信科技股份有限公司 Control text arrangement and display method and device applicable to Mac system
CN106681586A (en) * 2016-12-21 2017-05-17 广东欧珀移动通信有限公司 Placement position adjusting method and device

Also Published As

Publication number Publication date
CN107643916A (en) 2018-01-30

Similar Documents

Publication Publication Date Title
US10560511B2 (en) Adaptive tile framework
US10691284B2 (en) Canvas layout algorithm
US10528589B2 (en) Cross visualization interaction between data visualizations
WO2021072912A1 (en) File sharing method, apparatus, and system, interactive smart device, source end device, and storage medium
WO2019134309A1 (en) Page display method and device, electronic terminal, and computer storage medium
CN108038894B (en) Animation creation method, animation creation device, electronic equipment and computer-readable storage medium
US20180150215A1 (en) Method for implementing dialing keypad of touch screen and smart watch
KR20170041219A (en) Hover-based interaction with rendered content
CN105528167B (en) Information display method and device
US10042539B2 (en) Dynamic text control for mobile devices
US10747387B2 (en) Method, apparatus and user terminal for displaying and controlling input box
US10782857B2 (en) Adaptive user interface
WO2019071677A1 (en) Control method and device for control, electronic device and readable storage medium
US20190073091A1 (en) Dynamic display layout systems and methods
CN107562540B (en) Method and device for delivering callback function to UI thread and client
WO2019000746A1 (en) Method for switching text color of control, and system, electronic device and storage medium
WO2015160647A1 (en) Animating content display
WO2019024495A1 (en) Application theme pushing terminal and method, and computer-readable storage medium
CN108228126B (en) Screen projection control method and device, electronic terminal and readable storage medium
CN107037948B (en) Method and system for realizing list sliding
CN110471737B (en) Immersive status bar setting method and related device
TWI598748B (en) Electronic Device And Method For Correcting Character
CN107153502B (en) Interface sliding method and system
US10838615B2 (en) Method for moving graphical pointer, system for moving graphical pointer, and touch display device
CN112507671B (en) Method, apparatus, and readable medium for adjusting text distance

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17928510

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17928510

Country of ref document: EP

Kind code of ref document: A1