WO2015176483A1 - 标签创建方法、装置及终端 - Google Patents

标签创建方法、装置及终端 Download PDF

Info

Publication number
WO2015176483A1
WO2015176483A1 PCT/CN2014/089198 CN2014089198W WO2015176483A1 WO 2015176483 A1 WO2015176483 A1 WO 2015176483A1 CN 2014089198 W CN2014089198 W CN 2014089198W WO 2015176483 A1 WO2015176483 A1 WO 2015176483A1
Authority
WO
WIPO (PCT)
Prior art keywords
label
width
content
style
determining
Prior art date
Application number
PCT/CN2014/089198
Other languages
English (en)
French (fr)
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 小米科技有限责任公司
Priority to JP2016520273A priority Critical patent/JP2016524763A/ja
Priority to BR112015000217A priority patent/BR112015000217A2/pt
Priority to KR1020147035987A priority patent/KR20150144264A/ko
Priority to RU2014153979/08A priority patent/RU2603538C2/ru
Priority to MX2014015638A priority patent/MX354880B/es
Priority to US14/585,796 priority patent/US20150339016A1/en
Publication of WO2015176483A1 publication Critical patent/WO2015176483A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0483Interaction with page-structured environments, e.g. book metaphor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04842Selection of displayed objects or displayed text elements
    • 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
    • G06F9/451Execution arrangements for user interfaces

Definitions

  • the present disclosure relates to the field of computer technologies, and in particular, to a label creation method, apparatus, and terminal.
  • the label is an element in the application interface.
  • the terminal can create the label as follows: the terminal receives the label creation request; the preset label style information is read from the system, and the label style information is used to indicate that the label width is Calculated by a rule that bisects the width of the tab bar; creates a label of the width defined by the tab style information in the tab bar.
  • the label style information provided by the system is fixed.
  • the styles of the labels created by any application in the terminal according to the label style information are the same, and cannot adapt to the changing requirements of the theme of the application, resulting in inconsistent label and theme styles.
  • the present disclosure provides a label creation method, device and terminal.
  • a label creation method including:
  • the label creation request carries a label content and a theme identifier of the application, where the theme identifier is an identifier of a theme currently used by the application;
  • Reading tag attribute information from the topic information indicated by the topic identifier Reading tag attribute information from the topic information indicated by the topic identifier
  • a label including the content of the label is created in the tab bar according to the label style.
  • the reading the label attribute information from the topic information indicated by the topic identifier includes:
  • the tag attribute information is read from the found topic information, and the tag attribute information includes a width determination rule of the tag and an arrangement manner of the tag in the tag column.
  • the width determining rule is to determine a label width according to a width occupied by the label content, and determine a predetermined width as one of a label width, wherein the arrangement manner is a left-aligned arrangement, a right-aligned arrangement, and a centered arrangement.
  • the width determination rule determines the maximum available width of the tab bar as the label width, and the arrangement is a distributed arrangement.
  • the determining, according to the label attribute information, the label style defined by the theme including:
  • width determining rule determines the label width according to the width occupied by the label content, calculating the label width according to the label content;
  • the label pattern is determined according to the label width and the arrangement.
  • the calculating the label width according to the label content includes:
  • the determining the minimum width or the maximum width as the label width comprises:
  • the first difference value being obtained by subtracting the content width from the minimum width, wherein the second difference value is subtracted from the maximum width
  • the content width is obtained
  • the minimum width is determined as the label width.
  • the determining, according to the label attribute information, the label style defined by the theme including:
  • width determination rule is to determine the maximum available width of the tab bar as the label width, then at least one label included in the tab bar and the label being created are equally divided into tab widths, and the width obtained is equally divided. Determined to be the width of the label;
  • the label pattern is determined according to the label width and the arrangement.
  • a label creation apparatus comprising:
  • a request receiving module configured to receive a label creation request, where the label creation request carries a label content and a theme identifier of the application, where the theme identifier is an identifier of a theme currently used by the application;
  • An information reading module configured to read tag attribute information from the topic information indicated by the topic identifier
  • a pattern determining module configured to determine a label style defined by the theme according to the label attribute information read by the information reading module
  • a label creation module configured to create a label including the label content in the label column according to the label style determined by the pattern determining module.
  • the information reading module includes:
  • An information searching unit configured to search for topic information indicated by the topic identifier from at least one topic information pre-stored by the application;
  • An information reading unit configured to read the tag attribute information from the topic information searched by the information searching unit, where the tag attribute information includes a width determining rule of the tag and the tag is in the tag Arrangement in the column.
  • the width determining rule is to determine a label width according to a width occupied by the label content, and determine a predetermined width as one of a label width, wherein the arrangement manner is a left-aligned arrangement, a right-aligned arrangement, and a centered arrangement.
  • the width determination rule determines the maximum available width of the tab bar as the label width, and the arrangement is a distributed arrangement.
  • the style determining module includes:
  • a width calculation unit configured to calculate the label width according to the label content when the width determination rule determines the label width according to the width occupied by the label content
  • a first determining unit configured to determine the label style according to the label width calculated by the width calculating unit and the arrangement manner.
  • the width calculation unit includes:
  • a width calculation subunit configured to calculate a content width occupied by the label content
  • a width determining subunit configured to determine the content width calculated by the width calculating subunit as the label width; or detecting whether the content width calculated by the width calculating subunit is greater than a preset minimum Width is less than a preset maximum width, and if the content width is greater than the minimum width and smaller than the maximum width, the content width is determined as the label width, and if the content width is detected to be smaller than The minimum width or the maximum width is determined as the label width.
  • the width determining subunit is configured to compare an absolute value of the first difference value with an absolute value of the second difference value, where the first difference value is obtained by subtracting the content width from the minimum width, The second difference is obtained by subtracting the content width from the maximum width; if the absolute value of the first difference is greater than the absolute value of the second difference, determining the maximum width as the label Width; if the absolute value of the first difference is less than the absolute value of the second difference, the minimum width is determined as the label width.
  • the style determining module includes:
  • a width determining unit configured to divide the at least one label included in the label column and the label being created into a label column width when the width determining rule determines the maximum available width of the tab bar as the label width, Defining the width obtained by the division into the label width;
  • a second determining unit configured to determine the label style according to the label width determined by the width determining unit and the arrangement manner.
  • a terminal including:
  • a memory for storing processor executable instructions
  • processor is configured to:
  • the label creation request carries a label content and a theme identifier of the application, where the theme identifier is an identifier of a theme currently used by the application;
  • Reading tag attribute information from the topic information indicated by the topic identifier Reading tag attribute information from the topic information indicated by the topic identifier
  • a label including the content of the label is created in the tab bar according to the label style.
  • the label creation request carries a label content and an application identifier of the application, the topic identifier is an identifier of a theme currently used by the application; and reading label attribute information from the topic information indicated by the topic identifier;
  • the label style defined by the theme is determined; according to the label style, a label including the label content is created in the label column, and different label styles can be defined according to different theme styles, so that the label and the theme style are unified, and the fixed
  • the label style makes the label style unable to adapt to the theme change requirements of the application, resulting in the problem that the label and the theme are not uniform, achieving the effect of unifying the label and theme style.
  • FIG. 1 is a flowchart of a label creation method according to an exemplary embodiment.
  • FIG. 2A is a flowchart of a label creation method according to another exemplary embodiment.
  • FIG. 2B is a schematic diagram of a first type of tab bar shown in accordance with the present embodiment.
  • 2C is a schematic diagram of a second type of tab bar shown in accordance with the present embodiment.
  • 2D is a schematic diagram of a third tab bar shown in accordance with the present embodiment.
  • 2E is a schematic diagram of a fourth type of tab bar shown in accordance with the present embodiment.
  • FIG. 3 is a block diagram of a tag creation apparatus, according to an exemplary embodiment.
  • FIG. 4 is a block diagram of a tag creation apparatus, according to an exemplary embodiment.
  • FIG. 5 is a block diagram of a tag creation apparatus, according to an exemplary embodiment.
  • FIG. 1 is a flowchart of a label creation method according to an exemplary embodiment. As shown in FIG. 1 , a label creation method is applied to a terminal, and includes the following steps.
  • step 101 a tag creation request is received, where the tag creation request carries a tag content and an application identifier of the application, and the topic identifier is an identifier of a theme currently used by the application.
  • the tag is used to identify the application interface of the application, and the tag content is used to indicate the content included in the application interface.
  • the theme ID of the application is used to identify the topic currently used by the application.
  • step 102 tag attribute information is read from the topic information indicated by the topic identifier.
  • the developer can pre-set the label style according to the theme style of the theme, and add the label attribute information for defining the label style to the theme information, and the terminal creates the request according to the label.
  • the tag attribute information is read from the topic information of the topic.
  • step 103 the label style defined by the theme is determined based on the tag attribute information.
  • the terminal determines the label style according to each parameter defined by the tag attribute information.
  • step 104 a tag including the tag content is created in the tag bar according to the tag style.
  • the terminal creates a label in the label column according to the determined label style, and adds the label content carried in the label creation request to the created label.
  • the label creation method receives a label creation request, and the label creation request carries a label content and an application identifier of the application, where the theme identifier is an identifier of a theme currently used by the application;
  • the tag attribute information is read in the theme information indicated by the identifier;
  • the label style defined by the theme is determined according to the label attribute information;
  • the label including the label content is created in the label column according to the label style, and different label styles may be defined according to different theme styles.
  • the label and theme style are unified, and the fixed label style is solved, so that the label style cannot adapt to the theme change requirement of the application, and the problem that the label and the theme are not uniform is achieved, and the effect of the uniform label and the theme style is achieved.
  • FIG. 2A is a flowchart of a label creation method according to another exemplary embodiment. As shown in FIG. 2A, a label creation method is applied to a terminal, and includes the following steps.
  • step 201 a tag creation request is received, where the tag creation request carries the tag content and the topic identifier of the application, and the topic identifier is an identifier of the topic currently used by the application.
  • the tag is used to identify the application interface of the application, and the tag content is used to indicate the content included in the application interface.
  • the application includes two application interfaces, one application interface includes other applications recommended by the application, and another application interface includes a short message stored by the application, and the terminal can create two labels for the two application interfaces. Set the label content of the first application interface as the recommended application, and set the label content of the second application interface as the short message.
  • the label column 210 of the application in FIG. 2B includes a label 211 and a label 212, wherein the label content of the label 211 is "sms", and the label content of the label 212 is " Recommended Applications”. If the user clicks on the tag 212, the application interface 213 corresponding to the tag 212 is displayed, and the application interface 213 The icons for the five apps recommended by the app are shown.
  • the theme ID of the application is used to identify the topic currently used by the application.
  • the label creation request may be sent after the terminal adds the content to the newly created application interface, or may be sent before the terminal adds the content to the newly created application interface. This embodiment does not limit the sending timing of the label creation request.
  • step 202 the topic information indicated by the topic identifier is searched from the at least one topic information pre-stored by the application, and the tag attribute information is read from the found topic information, where the tag attribute information includes a tag width determination rule and a tag in the tag. Arrangement in the tab bar.
  • the developer can set the label style according to the theme style of the theme in advance, and add the label attribute information for defining the label style to the theme information, and the terminal creates the request from the label.
  • the topic information indicated by the topic identifier is searched for at least one topic information included in the application, and the tag attribute information is read from the topic information.
  • the label style includes the width, arrangement, font, font size, font color, and background color of the label, and the font, font size, font color, and background color are defined by the theme, and therefore, the label style in this embodiment Including the width of the label and the arrangement of the label in the label column, the label attribute information in this embodiment includes the width determination rule of the label and the arrangement manner of the label in the label column.
  • the width determining rule is to determine the label width according to the width occupied by the label content, and determine the predetermined width as one of the label widths, and the arrangement manner is one of a left-aligned arrangement, a right-aligned arrangement, and a centered arrangement; Or, the width determination rule determines the maximum available width of the tab bar as the label width, and the arrangement manner is a decentralized arrangement.
  • the width determination rule is used to determine the label width.
  • width determination rules There are many types of width determination rules. This embodiment uses three of them as examples, as follows:
  • the label content is used to indicate the content included in the application interface. Therefore, in order for the user to specify the application interface corresponding to the label, the terminal needs to display all the label contents included in the label. In this case, the terminal may occupy the content according to the label content.
  • the width determines the width of the label.
  • the width of the label determined according to the width occupied by the contents of the label may correspond to a plurality of arrangements. For example, left-aligned, right-aligned, and centered.
  • the terminal may be preset with a predetermined width, which is determined as the label width. Since no calculation is required, this width determination rule can save the processing resources of the terminal and increase the label creation speed.
  • the width of the label determined according to the predetermined width may correspond to a plurality of arrangements. For example, left-aligned, right-aligned, and centered.
  • the maximum available width is the maximum width that the tab bar can provide for the created label.
  • the width of the label determined according to the maximum available width of the tab bar may correspond to a decentralized arrangement.
  • the label width is the width of the label column; when the label column includes two labels that have been created, the label width is the width obtained by dividing the width of the label column by three equal parts.
  • the label field 210 of FIG. 2B includes a label 211 and a label 212.
  • the label 211 and the label 212 are arranged according to the arrangement. Dividing the label column 210, at this time, the label width of the label 211 and the label 212 are both equal to one-half of the width of the label column; the label column 210 in FIG.
  • 2C includes the label 211, the label 212 and the label 214, the label 211, the label 212 and The label 214 bisects the label column 210 according to the distributed arrangement. At this time, the label width of the label 211, the label 212, and the label 214 are both equal to one-third of the width of the label column.
  • the developer can select a width determination rule that is consistent with the theme style from at least two width determination rules.
  • the developer can select an arrangement that is consistent with the theme style from at least two permutations. In this way, by providing different width determination rules and different arrangement manners, the width determination rules and the arrangement manners can be arbitrarily combined to achieve the effect of enriching the label style.
  • step 203 the label style defined by the theme is determined according to the tag attribute information.
  • the terminal can read the width determination rule and the arrangement manner defined in the tag attribute information, determine the tag width according to the width determination rule, and determine the label style according to the label width and the arrangement manner.
  • the tag attribute information When the width determination rule in the tag attribute information is read, if the tag attribute information includes the width determination rule, it is directly read; if the tag attribute information includes the index of the width determination rule, the search is performed in the preset correspondence relationship. The width corresponding to the index determines the rule; if the tag attribute information does not include the width determination rule, the default width determination rule is obtained. Similarly, the terminal can read the arrangement in the tag attribute information.
  • the label style defined by the theme is determined according to the label attribute information, including:
  • the width determination rule determines the label width according to the width occupied by the label content, the label width is calculated according to the label content;
  • the terminal may read the label content from the label creation request, calculate the label width according to the label content, and determine the label style according to the calculated label width and arrangement manner.
  • the label width is calculated according to the content of the label, including:
  • the tag content may include at least one of a text and a picture, and therefore, the terminal may calculate the width of each character and each picture separately, and determine the label width according to the sum of the widths of all the characters and the picture. Wherein, the terminal calculates the label content
  • the method of occupying the width can be based on various mature methods, and will not be described here.
  • the terminal may directly determine the content width as the label width; or the terminal may also set the minimum width and the maximum width of the label width, which are determined according to the content width from the minimum width and the maximum width.
  • the width of the label is determined in the width range.
  • the terminal may detect whether the content width is greater than the minimum width and less than the maximum width, and if the content width is greater than the minimum width and less than the maximum width, The content width is determined as the label width; if it is detected that the content width is smaller than the minimum width or larger than the maximum width, the width of the minimum width and the maximum width closest to the content width is determined as the label width.
  • the label width including:
  • the minimum width is determined as the label width.
  • the terminal subtracts the content width from the minimum width to obtain a first difference, and subtracts the maximum width from the content width to obtain a second difference, and compares the absolute value of the first difference with the absolute value of the second difference. If the absolute value of the first difference is greater than the absolute value of the second difference, it is determined that the content width is closer to the maximum width, and the maximum width is determined as the label width; if the absolute value of the first difference is smaller than the second difference The absolute value of the value determines that the content width is closer to the minimum width and the minimum width is determined to be the label width.
  • the label width is positively correlated with the width occupied by the label content.
  • the label content of the label 211 is “sms”, and the label content of the label 212 is “recommended application”, because the number of words of the “recommended application” is more than the number of words of “sms”. Therefore, the width occupied by the label 212 is greater than the width occupied by the label 211, that is, the label width of the label 212 is greater than the label width of the label 211.
  • the label style defined by the theme is determined according to the label attribute information, including:
  • the width determination rule is to determine the maximum available width of the tab bar as the label width, the at least one label included in the label column and the label being created are equally divided into the width of the label column, and the width obtained by the division is determined as the label width. ;
  • the terminal calculates the label width according to the number of labels already included in the label column and the width of the label column, and determines the label style according to the calculated label width and arrangement manner.
  • the terminal When calculating the width of the label, the terminal adds 1 to the number of labels already included in the label column to obtain the total number of labels; divides the width of the label column by the total number of labels to obtain the label width of each label, according to the calculated label width and Arrange the way to determine the label style.
  • step 204 a tag including the tag content is created in the tag bar according to the tag style.
  • the terminal creates a label in the label column according to the determined label style, and adds the label content carried in the label creation request to the created label. Among them, when the created label does not affect other labels in the label column, you can directly create The built-in label is added to the label bar for display; when the created label affects other labels in the label column, other labels need to be adjusted.
  • the present embodiment describes the label creation process by creating a label 214 whose label content is "favorite” in the tab bar 210.
  • the label column 210 further includes a label 211 and a label 212.
  • the label content of the label 211 is " "SMS”
  • the label content of the label 212 is "recommended application”, as follows:
  • the arrangement manner is a decentralized arrangement:
  • the label field 210 before the label 214 is created includes a label 211 and a label 212, and the label 211 and the label 212 are equally divided into the label column 210.
  • the tab bar 210 after the label 214 is created includes the label 211, the label 212 and the label 214, the label 211, the label 212, and the label 214. .
  • the label field 210 before the label 214 is created includes the label 211 and the label 212. Since the text content of the label 211 is less than the text content of the label 212, the label of the label 211 The width is less than the label width of the label 212. The label 211 and the label 212 are arranged in the label column 210 in a left-aligned manner.
  • the label column 210 after the label 214 is created includes the label 211 , the label 212 and the label 214 . Since the text content of the label 214 is equal to the text content of the label 211 and smaller than the label 212 The text content, therefore, the label width of the label 214 is equal to the label width of the label 211 and less than the label width of the label 212.
  • the label 211, the label 212, and the label 214 are arranged in the label column 210 in a left-aligned manner.
  • the label creation method receives a label creation request, and the label creation request carries a label content and an application identifier of the application, where the theme identifier is an identifier of a theme currently used by the application;
  • the tag attribute information is read in the theme information indicated by the identifier;
  • the label style defined by the theme is determined according to the label attribute information;
  • the label including the label content is created in the label column according to the label style, and different label styles may be defined according to different theme styles.
  • the label and theme style are unified, and the fixed label style is solved, so that the label style cannot adapt to the theme change requirement of the application, and the problem that the label and the theme are not uniform is achieved, and the effect of the uniform label and the theme style is achieved.
  • the width determining rule is to determine the label width according to the width occupied by the label content, and determine the predetermined width as one of the label widths, and the arrangement manner is one of a left-aligned arrangement, a right-aligned arrangement, and a centered arrangement;
  • the width determination rule is to determine the maximum available width of the tab bar as the label width, and the arrangement manner is a distributed arrangement manner, and the width determination rule and the arrangement manner can be arbitrarily combined by providing different width determination rules and different arrangement manners. , achieved the effect of rich label style.
  • FIG. 3 is a block diagram of a label creation apparatus according to an exemplary embodiment. As shown in FIG. 3, the label creation apparatus is applied to a terminal, including: a request receiving module 310, an information reading module 320, and a pattern determining module 330. with Tag creation module 340.
  • the request receiving module 310 is configured to receive a label creation request, where the label creation request carries a label content and a theme identifier of the application, and the topic identifier is an identifier of a theme currently used by the application;
  • the information reading module 320 is configured to read the tag attribute information from the topic information indicated by the topic identifier;
  • the style determining module 330 is configured to determine a label style defined by the theme according to the label attribute information read by the information reading module 320;
  • the tag creation module 340 is configured to create a tag including tag content in the tag bar based on the tag style determined by the style determination module 330.
  • the label creation apparatus receives a label creation request carrying a label content and a theme identifier of an application, where the theme identifier is an identifier of a theme currently used by the application;
  • the tag attribute information is read in the theme information indicated by the identifier;
  • the label style defined by the theme is determined according to the label attribute information;
  • the label including the label content is created in the label column according to the label style, and different label styles may be defined according to different theme styles.
  • the label and theme style are unified, and the fixed label style is solved, so that the label style cannot adapt to the theme change requirement of the application, and the problem that the label and the theme are not uniform is achieved, and the effect of the uniform label and the theme style is achieved.
  • FIG. 4 is a block diagram of a label creation apparatus according to an exemplary embodiment. As shown in FIG. 4, the label creation apparatus is applied to a terminal, including: a request receiving module 310, an information reading module 320, and a pattern determining module 330. And a tag creation module 340.
  • the request receiving module 310 is configured to receive a label creation request, where the label creation request carries a label content and a theme identifier of the application, where the topic identifier is an identifier of a theme currently used by the application;
  • the information reading module 320 is configured to read the tag attribute information from the topic information indicated by the topic identifier;
  • the style determining module 330 is configured to determine a label style defined by the theme according to the label attribute information read by the information reading module 320;
  • the tag creation module 340 is configured to create a tag including tag content in the tag bar based on the tag style determined by the style determination module 330.
  • the information reading module 320 includes: an information searching unit 321 and an information reading unit 322;
  • the information searching unit 321 is configured to search for topic information indicated by the topic identifier from at least one topic information pre-stored by the application;
  • the information reading unit 322 is configured to read the tag attribute information from the topic information found by the information searching unit 321, and the tag attribute information includes a tag width determination rule and a label arrangement manner in the tag column.
  • the width determination rule is to determine the label width according to the width occupied by the label content, and determine the predetermined width as one of the label widths, and the arrangement manner is one of left-aligned arrangement, right-aligned arrangement, and centered arrangement.
  • the arrangement manner is one of left-aligned arrangement, right-aligned arrangement, and centered arrangement.
  • the width determination rule determines the maximum available width of the tab bar as the label width, and the arrangement is a decentralized arrangement.
  • the style determining module 330 includes: a width calculating unit 331 and a first determining unit 332;
  • the width calculation unit 331 is configured to calculate a label width according to the label content when the width determination rule determines the label width according to the width occupied by the label content;
  • the first determining unit 332 is configured to determine the label pattern according to the label width and the arrangement manner calculated by the width calculating unit 331.
  • the width calculating unit 33 comprising: a width calculating subunit 3311 and a width determining subunit 3312;
  • the width calculation sub-unit 3311 is configured to calculate a content width occupied by the label content
  • the width determining sub-unit 3312 is configured to determine the content width calculated by the width calculating sub-unit 3311 as the label width; or whether the content width calculated by the detecting width calculating sub-unit 3311 is greater than a preset minimum width and less than The preset maximum width, if the content width is greater than the minimum width and less than the maximum width, the content width is determined as the label width, and if the content width is less than the minimum width or greater than the maximum width, the minimum width or the maximum width is determined as Label width.
  • the width determining subunit 3312 is configured to compare an absolute value of the first difference value with an absolute value of the second difference value, where the first difference value is obtained by subtracting the content width from the minimum width, and the second difference value is obtained. Obtaining the content width from the maximum width; if the absolute value of the first difference is greater than the absolute value of the second difference, determining the maximum width as the label width; if the absolute value of the first difference is less than the absolute value of the second difference The value determines the minimum width as the label width.
  • the style determining module 330 includes: a width determining unit 333 and a second determining unit 334;
  • the width determining unit 333 is configured to, when the width determining rule determines the maximum available width of the tab bar as the label width, divide the at least one label included in the tab bar and the label being created into the label column width, The width obtained by halving is determined as the width of the label;
  • the second determining unit 334 is configured to determine the label pattern according to the label width and the arrangement determined by the width determining unit 333.
  • the label creation apparatus receives a label creation request carrying a label content and a theme identifier of an application, where the theme identifier is an identifier of a theme currently used by the application;
  • the tag attribute information is read in the theme information indicated by the identifier;
  • the label style defined by the theme is determined according to the label attribute information;
  • the label including the label content is created in the label column according to the label style, and different label styles may be defined according to different theme styles.
  • the label and theme style are unified, and the fixed label style is solved, so that the label style cannot adapt to the theme change requirement of the application, and the problem that the label and the theme are not uniform is achieved, and the effect of the uniform label and the theme style is achieved.
  • the width determining rule is to determine the label width according to the width occupied by the label content, and determine the predetermined width as one of the label widths, and the arrangement manner is one of a left-aligned arrangement, a right-aligned arrangement, and a centered arrangement;
  • the width determination rule is to determine the maximum available width of the tab bar as the label width, and the arrangement manner is a distributed arrangement manner, and the width determination rule and the arrangement manner are determined by providing different width determination rules and different arrangement manners. The combinations can be arbitrarily combined to achieve the effect of rich label styles.
  • FIG. 5 is a block diagram of a tag creation apparatus 500, according to an exemplary embodiment.
  • device 500 can be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a gaming console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.
  • apparatus 500 can include one or more of the following components: processing component 502, memory 504, power component 506, multimedia component 508, audio component 510, input/output (I/O) interface 512, sensor component 514, And a communication component 516.
  • Processing component 502 typically controls the overall operation of device 500, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations.
  • Processing component 502 can include one or more processors 518 to execute instructions to perform all or part of the steps described above.
  • processing component 502 can include one or more modules to facilitate interaction between component 502 and other components.
  • processing component 502 can include a multimedia module to facilitate interaction between multimedia component 508 and processing component 502.
  • Memory 504 is configured to store various types of data to support operation at device 500. Examples of such data include instructions for any application or method operating on device 500, contact data, phone book data, messages, pictures, videos, and the like.
  • the memory 504 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read only memory
  • EPROM Electrically erasable programmable read only memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Flash Memory
  • Disk Disk or Optical Disk.
  • Power component 506 provides power to various components of device 500.
  • Power component 506 can include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for device 500.
  • the multimedia component 508 includes a screen between the device 500 and the user that provides an output interface.
  • the screen can include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user.
  • the touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor may sense not only the boundary of the touch or sliding action, but also the duration and pressure associated with the touch or slide operation.
  • the multimedia component 508 includes a front camera and/or a rear camera. When the device 500 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 and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
  • the audio component 510 is configured to output and/or input an audio signal.
  • audio component 510 includes a microphone (MIC) that is configured to receive an external audio signal when device 500 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode.
  • the received audio signal may be further stored in memory 504 or transmitted via communication component 516.
  • audio component 510 also includes a speaker for outputting an audio signal.
  • the I/O interface 512 provides an interface between the processing component 502 and the peripheral interface module, which may be a keyboard, a click wheel, a button, or the like. These buttons may include, but are not limited to, a home button, a volume button, a start button, and a lock button.
  • Sensor assembly 514 includes one or more sensors for providing device 500 with various aspects of status assessment.
  • sensor assembly 514 can detect an open/closed state of device 500, a relative positioning of components, such as the display and keypad of device 500, and sensor component 514 can also detect a change in position of one component of device 500 or device 500. The presence or absence of user contact with device 500, device 500 orientation or acceleration/deceleration, and temperature variation of device 500.
  • Sensor assembly 514 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact.
  • Sensor assembly 514 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications.
  • the sensor component 514 can also include an acceleration sensor, a gyro sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
  • Communication component 516 is configured to facilitate wired or wireless communication between device 500 and other devices.
  • the device 500 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof.
  • communication component 516 receives broadcast signals or broadcast associated information from an external broadcast management system via a broadcast channel.
  • the communication component 516 also includes a near field communication (NFC) module to facilitate short range communication.
  • NFC near field communication
  • the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
  • RFID radio frequency identification
  • IrDA infrared data association
  • UWB ultra-wideband
  • Bluetooth Bluetooth
  • apparatus 500 may be implemented 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 above methods.
  • ASICs application specific integrated circuits
  • DSPs digital signal processors
  • DSPDs digital signal processing devices
  • PLDs programmable logic devices
  • FPGA field programmable A gate array
  • controller microcontroller, microprocessor, or other electronic component implementation for performing the above methods.
  • non-transitory computer readable storage medium comprising instructions, such as a memory 504 comprising instructions executable by processor 518 of apparatus 500 to perform the above method.
  • the non-transitory computer readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computer Hardware Design (AREA)
  • Document Processing Apparatus (AREA)
  • User Interface Of Digital Computer (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本公开是关于一种标签创建方法、装置及终端,属于计算机技术领域。所述方法包括:接收标签创建请求,所述标签创建请求中携带有标签内容和应用程序的主题标识,所述主题标识是所述应用程序当前使用的主题的标识;从所述主题标识所指示的主题信息中读取标签属性信息;根据所述标签属性信息确定所述主题所定义的标签样式;根据所述标签样式在标签栏中创建包括所述标签内容的标签。所述装置包括:请求接收模块、信息读取模块、样式确定模块和标签创建模块。本公开解决了固定的标签样式使得标签样式无法适应应用程序的主题变化需求,导致标签与主题的样式不统一的问题,达到了统一标签和主题的样式的效果。

Description

标签创建方法、装置及终端
本申请基于申请号为201410216429.4、申请日为2014年5月21日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本公开涉及计算机技术领域,特别涉及一种标签创建方法、装置及终端。
背景技术
近年来,终端的个性化越来越受到欢迎和关注,这其中应用程序的主题是最重要的一部分。然而,这种通过主题对应用界面的颜色、图片和文字等的个性化定制已经不能满足用户的个性化需求,用户提出了对应用界面中元素的位置等更深层次的个性化定制需求。
标签是应用界面中的一种元素,终端在创建标签时可以按照如下方式进行:终端接收标签创建请求;从系统中读取预设的标签样式信息,该标签样式信息用于指示标签的宽度是通过等分标签栏宽度的规则计算得到的;在标签栏中创建该标签样式信息所定义的宽度的标签。
发明人在实现本公开的过程中,发现相关技术中至少存在以下缺陷:
系统提供的标签样式信息是固定的,终端中任意一个应用程序根据该标签样式信息创建的标签的样式均相同,无法适应应用程序的主题的变化需求,导致标签与主题的样式不统一。
发明内容
为解决固定的标签样式使得标签样式无法适应应用程序的主题变化需求,导致标签与主题的样式不统一的问题,本公开提供了一种标签创建方法、装置及终端。
根据本公开实施例的第一方面,提供一种标签创建方法,包括:
接收标签创建请求,所述标签创建请求中携带有标签内容和应用程序的主题标识,所述主题标识是所述应用程序当前使用的主题的标识;
从所述主题标识所指示的主题信息中读取标签属性信息;
根据所述标签属性信息确定所述主题所定义的标签样式;
根据所述标签样式在标签栏中创建包括所述标签内容的标签。
可选的,所述从所述主题标识所指示的主题信息中读取标签属性信息,包括:
从所述应用程序预存的至少一个主题信息中查找所述主题标识所指示的主题信息;
从查找到的所述主题信息中读取所述标签属性信息,所述标签属性信息包括所述标签的宽度确定规则和所述标签在所述标签栏中的排列方式。
可选的,所述宽度确定规则是根据标签内容所占用的宽度确定标签宽度、将预定宽度确定为标签宽度中的一种,所述排列方式是左对齐排列方式、右对齐排列方式、居中排列方式中的一种;或,
所述宽度确定规则是将标签栏的最大可用宽度确定为标签宽度,所述排列方式是分散排列方式。
可选的,所述根据所述标签属性信息确定所述主题所定义的标签样式,包括:
若所述宽度确定规则是根据标签内容所占用的宽度确定标签宽度,则根据所述标签内容计算所述标签宽度;
根据所述标签宽度和所述排列方式确定所述标签样式。
可选的,所述根据所述标签内容计算所述标签宽度,包括:
计算所述标签内容所占用的内容宽度;
将所述内容宽度确定为所述标签宽度;或,检测所述内容宽度是否大于预设的最小宽度且小于预设的最大宽度,若检测出所述内容宽度大于所述最小宽度且小于所述最大宽度,则将所述内容宽度确定为所述标签宽度,若检测出所述内容宽度小于所述最小宽度或大于所述最大宽度,则将所述最小宽度或所述最大宽度确定为所述标签宽度。
可选的,所述将所述最小宽度或所述最大宽度确定为所述标签宽度,包括:
比较第一差值的绝对值和第二差值的绝对值,所述第一差值由所述最小宽度减去所述内容宽度得到,所述第二差值由所述最大宽度减去所述内容宽度得到;
若所述第一差值的绝对值大于所述第二差值的绝对值,则将所述最大宽度确定为所述标签宽度;
若所述第一差值的绝对值小于所述第二差值的绝对值,则将所述最小宽度确定为所述标签宽度。
可选的,所述根据所述标签属性信息确定所述主题所定义的标签样式,包括:
若所述宽度确定规则是将标签栏的最大可用宽度确定为标签宽度,则将所述标签栏所包括的至少一个标签和正在创建的所述标签等分标签栏宽度,将等分得到的宽度确定为所述标签宽度;
根据所述标签宽度和所述排列方式确定所述标签样式。
根据本公开实施例的第二方面,提供一种标签创建装置,包括:
请求接收模块,用于接收标签创建请求,所述标签创建请求中携带有标签内容和应用程序的主题标识,所述主题标识是所述应用程序当前使用的主题的标识;
信息读取模块,用于从所述主题标识所指示的主题信息中读取标签属性信息;
样式确定模块,用于根据所述信息读取模块读取到的所述标签属性信息确定所述主题所定义的标签样式;
标签创建模块,用于根据所述样式确定模块确定的所述标签样式在标签栏中创建包括所述标签内容的标签。
可选的,所述信息读取模块,包括:
信息查找单元,用于从所述应用程序预存的至少一个主题信息中查找所述主题标识所指示的主题信息;
信息读取单元,用于从所述信息查找单元查找到的所述主题信息中读取所述标签属性信息,所述标签属性信息包括所述标签的宽度确定规则和所述标签在所述标签栏中的排列方式。
可选的,所述宽度确定规则是根据标签内容所占用的宽度确定标签宽度、将预定宽度确定为标签宽度中的一种,所述排列方式是左对齐排列方式、右对齐排列方式、居中排列方式中的一种;或,
所述宽度确定规则是将标签栏的最大可用宽度确定为标签宽度,所述排列方式是分散排列方式。
可选的,所述样式确定模块,包括:
宽度计算单元,用于在所述宽度确定规则是根据标签内容所占用的宽度确定标签宽度时,根据所述标签内容计算所述标签宽度;
第一确定单元,用于根据所述宽度计算单元计算得到的所述标签宽度和所述排列方式确定所述标签样式。
可选的,所述宽度计算单元,包括:
宽度计算子单元,用于计算所述标签内容所占用的内容宽度;
宽度确定子单元,用于将所述宽度计算子单元计算得到的所述内容宽度确定为所述标签宽度;或,检测所述宽度计算子单元计算得到的所述内容宽度是否大于预设的最小宽度且小于预设的最大宽度,若检测出所述内容宽度大于所述最小宽度且小于所述最大宽度,则将所述内容宽度确定为所述标签宽度,若检测出所述内容宽度小于所述最小宽度或大于所述最大宽度,则将所述最小宽度或所述最大宽度确定为所述标签宽度。
可选的,所述宽度确定子单元,用于比较第一差值的绝对值和第二差值的绝对值,所述第一差值由所述最小宽度减去所述内容宽度得到,所述第二差值由所述最大宽度减去所述内容宽度得到;若所述第一差值的绝对值大于所述第二差值的绝对值,则将所述最大宽度确定为所述标签宽度;若所述第一差值的绝对值小于所述第二差值的绝对值,则将所述最小宽度确定为所述标签宽度。
可选的,所述样式确定模块,包括:
宽度确定单元,用于在所述宽度确定规则是将标签栏的最大可用宽度确定为标签宽度时,将所述标签栏所包括的至少一个标签和正在创建的所述标签等分标签栏宽度,将等分得到的宽度确定为所述标签宽度;
第二确定单元,用于根据所述宽度确定单元确定的所述标签宽度和所述排列方式确定所述标签样式。
根据本公开实施例的第三方面,提供一种终端,包括:
处理器;
用于存储处理器可执行指令的存储器;
其中,所述处理器被配置为:
接收标签创建请求,所述标签创建请求中携带有标签内容和应用程序的主题标识,所述主题标识是所述应用程序当前使用的主题的标识;
从所述主题标识所指示的主题信息中读取标签属性信息;
根据所述标签属性信息确定所述主题所定义的标签样式;
根据所述标签样式在标签栏中创建包括所述标签内容的标签。
本公开的实施例提供的技术方案可以包括以下有益效果:
通过接收标签创建请求,该标签创建请求中携带有标签内容和应用程序的主题标识,该主题标识是应用程序当前使用的主题的标识;从主题标识所指示的主题信息中读取标签属性信息;根据标签属性信息确定主题所定义的标签样式;根据标签样式在标签栏中创建包括标签内容的标签,可以根据不同的主题样式定义不同的标签样式,使得标签与主题的样式统一,解决了固定的标签样式使得标签样式无法适应应用程序的主题变化需求,导致标签与主题的样式不统一的问题,达到了统一标签和主题的样式的效果。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性的,并不能限制本公开。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本发明的实施例,并于说明书一起用于解释本发明的原理。
图1是根据一示例性实施例示出的一种标签创建方法的流程图。
图2A是根据另一示例性实施例示出的一种标签创建方法的流程图。
图2B是根据本实施例示出的第一种标签栏的示意图。
图2C是根据本实施例示出的第二种标签栏的示意图。
图2D是根据本实施例示出的第三种标签栏的示意图。
图2E是根据本实施例示出的第四种标签栏的示意图。
图3是根据一示例性实施例示出的一种标签创建装置的框图。
图4是根据一示例性实施例示出的一种标签创建装置的框图。
图5是根据一示例性实施例示出的一种用于标签创建装置的框图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本发明相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本发明的一些方面相一致的装置和方法的例子。
图1是根据一示例性实施例示出的一种标签创建方法的流程图,如图1所示,标签创建方法应用于终端中,包括以下步骤。
在步骤101中,接收标签创建请求,该标签创建请求中携带有标签内容和应用程序的主题标识,该主题标识是应用程序当前使用的主题的标识。
标签用来标识应用程序的应用界面,标签内容则用于指示该应用界面所包括的内容。
应用程序的主题标识用于标识该应用程序当前使用的主题。
在步骤102中,从主题标识所指示的主题信息中读取标签属性信息。
为了使创建的标签样式与应用程序的主题样式统一,开发人员可以预先根据主题的主题样式设置标签样式,将用于定义标签样式的标签属性信息添加到主题信息中,在终端根据标签创建请求中携带的主题标识确定当前使用的主题后,从该主题的主题信息中读取标签属性信息。
在步骤103中,根据标签属性信息确定主题所定义的标签样式。
终端根据标签属性信息所定义的各个参数确定标签样式。
在步骤104中,根据标签样式在标签栏中创建包括标签内容的标签。
终端根据确定的标签样式在标签栏中创建标签,并将标签创建请求中携带的标签内容添加到创建的标签中。
综上所述,本公开提供的标签创建方法,通过接收标签创建请求,该标签创建请求中携带有标签内容和应用程序的主题标识,该主题标识是应用程序当前使用的主题的标识;从主题标识所指示的主题信息中读取标签属性信息;根据标签属性信息确定主题所定义的标签样式;根据标签样式在标签栏中创建包括标签内容的标签,可以根据不同的主题样式定义不同的标签样式,使得标签与主题的样式统一,解决了固定的标签样式使得标签样式无法适应应用程序的主题变化需求,导致标签与主题的样式不统一的问题,达到了统一标签和主题的样式的效果。
图2A是根据另一示例性实施例示出的一种标签创建方法的流程图,如图2A所示,标签创建方法应用于终端中,包括如下步骤。
在步骤201中,接收标签创建请求,该标签创建请求中携带有标签内容和应用程序的主题标识,该主题标识是应用程序当前使用的主题的标识。
标签用来标识应用程序的应用界面,标签内容则用于指示该应用界面所包括的内容。比如,应用程序包括两个应用界面,一个应用界面包括该应用程序所推荐的其他应用程序,另一个应用界面包括该应用程序所存储的短信,则终端可以为这两个应用界面创建两个标签,将第一个应用界面的标签内容设置为推荐应用,将第二个应用界面的标签内容设置为短信。
请参考图2B所示的第一种标签栏的示意图,图2B中应用程序的标签栏210包括标签211和标签212,其中,标签211的标签内容是“短信”,标签212的标签内容是“推荐应用”。若用户点击了标签212,则展示与标签212对应的应用界面213,应用界面213 中展示了该应用程序推荐的5个应用的图标。
应用程序的主题标识用于标识该应用程序当前使用的主题。
标签创建请求可以是终端将内容添加到新建的应用界面后发送的,也可以是终端将内容添加到新建的应用界面前发送的,本实施例不限定标签创建请求的发送时机。
在步骤202中,从应用程序预存的至少一个主题信息中查找主题标识所指示的主题信息,从查找到的主题信息中读取标签属性信息,该标签属性信息包括标签的宽度确定规则和标签在标签栏中的排列方式。
为了使标签的标签样式与应用程序的主题样式统一,开发人员可以预先根据主题的主题样式设置标签样式,将用于定义标签样式的标签属性信息添加到主题信息中,则终端从标签创建请求中读取到当前使用主题的主题标识后,在该应用程序所包括的至少一个主题信息中查找该主题标识所指示的主题信息,从该主题信息中读取标签属性信息。
通常,标签样式包括标签的宽度、排列方式、字体、字体大小、字体颜色和背景色等,而字体、字体大小、字体颜色和背景色是主题所定义的,因此,本实施例中的标签样式包括标签的宽度和标签在标签栏中的排列方式,本实施例中的标签属性信息包括标签的宽度确定规则和标签在标签栏中的排列方式。
其中,宽度确定规则是根据标签内容所占用的宽度确定标签宽度、将预定宽度确定为标签宽度中的一种,排列方式是左对齐排列方式、右对齐排列方式、居中排列方式中的一种;或,宽度确定规则是将标签栏的最大可用宽度确定为标签宽度,排列方式是分散排列方式。
宽度确定规则用于确定标签宽度。宽度确定规则可以有很多种,本实施例以其中三种为例进行说明,具体如下:
①根据标签内容所占用的宽度确定标签宽度:
由于标签内容用于指示应用界面所包括的内容,因此,为了使用户明确标签所对应的应用界面,终端需要将标签所包括的所有标签内容进行展示,此时,终端可以根据标签内容所占用的宽度确定标签宽度。
根据标签内容所占用的宽度确定的标签宽度可以对应于多种排列方式。比如,左对齐排列方式、右对齐排列方式和居中排列方式。
②将预定宽度确定为标签宽度:
终端可以预先设置一个预定宽度,将该预定宽度确定为标签宽度。由于不需要进行计算,因此,这种宽度确定规则既可以节省终端的处理资源,也可以提高标签创建速度。
根据预定宽度确定的标签宽度可以对应于多种排列方式。比如,左对齐排列方式、右对齐排列方式和居中排列方式。
③将标签栏的最大可用宽度确定为标签宽度:
最大可用宽度是指标签栏可以提供给创建的标签的最大宽度。根据标签栏的最大可用宽度确定的标签宽度可以对应于分散排列方式。
比如,标签栏未包括已经创建的标签时,标签宽度即为标签栏宽度;标签栏包括两个已经创建的标签时,标签宽度是标签栏宽度被三等分后得到的宽度。请参考图2B所示的第一种标签栏的示意图和2C所示的第二种标签栏的示意图,图2B中标签栏210包括标签211和标签212,标签211和标签212根据分散排列方式二等分标签栏210,此时,标签211和标签212的标签宽度均等于标签栏宽度的二分之一;图2C中标签栏210包括标签211、标签212和标签214,标签211、标签212和标签214根据分散排列方式三等分标签栏210,此时,标签211、标签212和标签214的标签宽度均等于标签栏宽度的三分之一。
当宽度确定规则为至少两个时,开发人员可以从至少两个宽度确定规则中选择一个与主题样式相统一的宽度确定规则。同理,当排列方式为至少两个时,开发人员可以从至少两个排列方式中选择一个与主题样式相统一的排列方式。这样,通过提供不同的宽度确定规则和不同的排列方式,使得宽度确定规则和排列方式之间可以任意组合,达到了丰富标签样式的效果。
在步骤203中,根据标签属性信息确定主题所定义的标签样式。
终端可以读取标签属性信息中所定义的宽度确定规则和排列方式,根据该宽度确定规则确定标签宽度,从而根据标签宽度和排列方式确定标签样式。
在读取标签属性信息中的宽度确定规则时,若标签属性信息包括宽度确定规则,则直接读取;若标签属性信息包括的是宽度确定规则的索引,则在预设的对应关系中查找与该索引对应的宽度确定规则;若标签属性信息不包括宽度确定规则,则获取默认的宽度确定规则。同样的,终端可以读取标签属性信息中的排列方式。
第一,根据标签属性信息确定主题所定义的标签样式,包括:
1)若宽度确定规则是根据标签内容所占用的宽度确定标签宽度,则根据标签内容计算标签宽度;
2)根据该标签宽度和排列方式确定标签样式。
若宽度确定规则是根据标签内容所占用的宽度确定标签宽度,则终端可以从标签创建请求中读取标签内容,根据该标签内容计算标签宽度,根据计算出的标签宽度和排列方式确定标签样式。
其中,根据标签内容计算标签宽度,包括:
1)计算标签内容所占用的内容宽度;
2)将内容宽度确定为标签宽度;或,检测内容宽度是否大于预设的最小宽度且小于预设的最大宽度,若检测出内容宽度大于最小宽度且小于最大宽度,则将内容宽度确定为标签宽度,若检测出内容宽度小于最小宽度或大于最大宽度,则将最小宽度或最大宽度确定为标签宽度。
标签内容可以包括文字和图片中的至少一种,因此,终端可以分别计算每个文字和每个图片的宽度,根据所有文字和图片的宽度总和确定标签宽度。其中,终端计算标签内容 所占用的宽度的方法可以依据各种成熟的方法,此处不作赘述。
在确定出标签内容所占用的内容宽度后,终端可以直接将内容宽度确定为标签宽度;或,终端还可以设置标签宽度的最小宽度和最大宽度,根据内容宽度从最小宽度和最大宽度所确定的宽度范围中确定标签宽度。
在根据内容宽度从最小宽度和最大宽度所确定的宽度范围中确定标签宽度时,终端可以检测内容宽度是否大于最小宽度且小于最大宽度,若检测出内容宽度大于最小宽度且小于最大宽度,则将该内容宽度确定为标签宽度;若检测出内容宽度小于最小宽度或大于最大宽度,则将最小宽度和最大宽度中与内容宽度最接近的宽度确定为标签宽度。
其中,将最小宽度或最大宽度确定为标签宽度,包括:
1)比较第一差值的绝对值和第二差值的绝对值,第一差值由最小宽度减去内容宽度得到,第二差值由最大宽度减去内容宽度得到;
2)若第一差值的绝对值大于第二差值的绝对值,则将最大宽度确定为标签宽度;
3)若第一差值的绝对值小于第二差值的绝对值,则将最小宽度确定为标签宽度。
终端将最小宽度减去内容宽度得到第一差值,将最大宽度减去内容宽度得到第二差值,比较第一差值的绝对值和第二差值的绝对值的大小。若比较出第一差值的绝对值大于第二差值的绝对值,则确定内容宽度更接近最大宽度,将最大宽度确定为标签宽度;若比较出第一差值的绝对值小于第二差值的绝对值,则确定内容宽度更接近于最小宽度,将最小宽度确定为标签宽度。
综上,标签宽度与标签内容所占用的宽度呈正相关关系。请参考图2D所示的第三种标签栏的示意图,标签211的标签内容是“短信”,标签212的标签内容是“推荐应用”,由于“推荐应用”的字数多于“短信”的字数,因此,标签212所占用的宽度大于标签211所占用的宽度,即标签212的标签宽度大于标签211的标签宽度。
第二,根据标签属性信息确定主题所定义的标签样式,包括:
1)若宽度确定规则是将标签栏的最大可用宽度确定为标签宽度,则将标签栏所包括的至少一个标签和正在创建的标签等分标签栏宽度,将等分得到的宽度确定为标签宽度;
2)根据该标签宽度和排列方式确定标签样式。
若宽度确定规则是将标签栏的最大可用宽度确定为标签宽度,则终端根据标签栏已经包括的标签个数和标签栏宽度计算标签宽度,根据计算出的标签宽度和排列方式确定标签样式。
在计算标签宽度时,终端将标签栏已经包括的标签个数加1,得到总标签个数;将标签栏宽度除以总标签个数得到每个标签的标签宽度,根据计算出的标签宽度和排列方式确定标签样式。
在步骤204中,根据标签样式在标签栏中创建包括标签内容的标签。
终端根据确定的标签样式在标签栏中创建标签,并将标签创建请求中携带的标签内容添加到创建的标签中。其中,当创建的标签不影响标签栏中的其它标签时,可以直接将创 建完成的标签添加到标签栏中进行展示;当创建的标签影响到标签栏中的其它标签时,还需要对其它标签进行调整。
为了便于理解,本实施例以在标签栏210中创建标签内容是“收藏”的标签214为例对标签创建过程进行说明,标签栏210还包括标签211和标签212,标签211的标签内容是“短信”,标签212的标签内容是“推荐应用”,具体如下:
1)在应用程序的一种主题信息中,若标签属性信息定义了宽度确定规则是将标签栏的最大可用宽度确定为标签宽度,排列方式是分散排列方式:
请参考图2B所示的第一种标签栏的示意图,创建标签214之前的标签栏210包括标签211和标签212,标签211和标签212二等分标签栏210。
请参考图2C所示的第二种标签栏的示意图,创建标签214之后的标签栏210中包括标签211、“标签212和标签214,标签211、“标签212和标签214三等分标签栏210。
2)在应用程序的另一种主题信息中,若标签属性信息定义了宽度确定规则是根据标签内容所占用的宽度确定标签宽度,排列方式是左对齐排列方式:
请参考图2D所示的第三种标签栏的示意图,创建标签214之前的标签栏210包括标签211和标签212,由于标签211的文字内容少于标签212的文字内容,因此,标签211的标签宽度小于标签212的标签宽度。标签211和标签212以左对齐方式排列在标签栏210中。
请参考图2E所示的第四种标签栏的示意图,创建标签214之后的标签栏210包括标签211、标签212和标签214,由于标签214的文字内容等于标签211的文字内容且小于标签212的文字内容,因此,标签214的标签宽度等于标签211的标签宽度且小于标签212的标签宽度。标签211、标签212和标签214以左对齐方式排列在标签栏210中。
综上所述,本公开提供的标签创建方法,通过接收标签创建请求,该标签创建请求中携带有标签内容和应用程序的主题标识,该主题标识是应用程序当前使用的主题的标识;从主题标识所指示的主题信息中读取标签属性信息;根据标签属性信息确定主题所定义的标签样式;根据标签样式在标签栏中创建包括标签内容的标签,可以根据不同的主题样式定义不同的标签样式,使得标签与主题的样式统一,解决了固定的标签样式使得标签样式无法适应应用程序的主题变化需求,导致标签与主题的样式不统一的问题,达到了统一标签和主题的样式的效果。
另外,宽度确定规则是根据标签内容所占用的宽度确定标签宽度、将预定宽度确定为标签宽度中的一种,排列方式是左对齐排列方式、右对齐排列方式、居中排列方式中的一种;或,宽度确定规则是将标签栏的最大可用宽度确定为标签宽度,排列方式是分散排列方式,通过提供不同的宽度确定规则和不同的排列方式,使得宽度确定规则和排列方式之间可以任意组合,达到了丰富标签样式的效果。
图3是根据一示例性实施例示出的一种标签创建装置的框图,如图3所示,标签创建装置应用于终端中,包括:请求接收模块310、信息读取模块320、样式确定模块330和 标签创建模块340。
该请求接收模块310被配置为,用于接收标签创建请求,标签创建请求中携带有标签内容和应用程序的主题标识,主题标识是应用程序当前使用的主题的标识;
该信息读取模块320被配置为,用于从主题标识所指示的主题信息中读取标签属性信息;
该样式确定模块330被配置为,用于根据信息读取模块320读取到的标签属性信息确定主题所定义的标签样式;
该标签创建模块340被配置为,用于根据样式确定模块330确定的标签样式在标签栏中创建包括标签内容的标签。
综上所述,本公开提供的标签创建装置,通过接收标签创建请求,该标签创建请求中携带有标签内容和应用程序的主题标识,该主题标识是应用程序当前使用的主题的标识;从主题标识所指示的主题信息中读取标签属性信息;根据标签属性信息确定主题所定义的标签样式;根据标签样式在标签栏中创建包括标签内容的标签,可以根据不同的主题样式定义不同的标签样式,使得标签与主题的样式统一,解决了固定的标签样式使得标签样式无法适应应用程序的主题变化需求,导致标签与主题的样式不统一的问题,达到了统一标签和主题的样式的效果。
图4是根据一示例性实施例示出的一种标签创建装置的框图,如图4所示,标签创建装置应用于终端中,包括:请求接收模块310、信息读取模块320、样式确定模块330和标签创建模块340。
该请求接收模块310被配置为,用于接收标签创建请求,标签创建请求中携带有标签内容和应用程序的主题标识,该主题标识是应用程序当前使用的主题的标识;
该信息读取模块320被配置为,用于从主题标识所指示的主题信息中读取标签属性信息;
该样式确定模块330被配置为,用于根据信息读取模块320读取到的标签属性信息确定主题所定义的标签样式;
该标签创建模块340被配置为,用于根据样式确定模块330确定的标签样式在标签栏中创建包括标签内容的标签。
可选的,信息读取模块320,包括:信息查找单元321和信息读取单元322;
该信息查找单元321被配置为,用于从应用程序预存的至少一个主题信息中查找主题标识所指示的主题信息;
该信息读取单元322被配置为,用于从信息查找单元321查找到的主题信息中读取标签属性信息,标签属性信息包括标签的宽度确定规则和标签在标签栏中的排列方式。
可选的,宽度确定规则是根据标签内容所占用的宽度确定标签宽度、将预定宽度确定为标签宽度中的一种,排列方式是左对齐排列方式、右对齐排列方式、居中排列方式中的一种;或,
宽度确定规则是将标签栏的最大可用宽度确定为标签宽度,排列方式是分散排列方式。
可选的,样式确定模块330,包括:宽度计算单元331和第一确定单元332;
该宽度计算单元331被配置为,用于在宽度确定规则是根据标签内容所占用的宽度确定标签宽度时,根据标签内容计算标签宽度;
该第一确定单元332被配置为,用于根据宽度计算单元331计算得到的标签宽度和排列方式确定标签样式。
可选的,宽度计算单元331,包括:宽度计算子单元3311和宽度确定子单元3312;
该宽度计算子单元3311被配置为,用于计算标签内容所占用的内容宽度;
该宽度确定子单元3312被配置为,用于将宽度计算子单元3311计算得到的内容宽度确定为标签宽度;或,检测宽度计算子单元3311计算得到的内容宽度是否大于预设的最小宽度且小于预设的最大宽度,若检测出内容宽度大于最小宽度且小于最大宽度,则将内容宽度确定为标签宽度,若检测出内容宽度小于最小宽度或大于最大宽度,则将最小宽度或最大宽度确定为标签宽度。
可选的,该宽度确定子单元3312被配置为,用于比较第一差值的绝对值和第二差值的绝对值,第一差值由最小宽度减去内容宽度得到,第二差值由最大宽度减去内容宽度得到;若第一差值的绝对值大于第二差值的绝对值,则将最大宽度确定为标签宽度;若第一差值的绝对值小于第二差值的绝对值,则将最小宽度确定为标签宽度。
可选的,样式确定模块330,包括:宽度确定单元333和第二确定单元334;
该宽度确定单元333被配置为,用于在宽度确定规则是将标签栏的最大可用宽度确定为标签宽度时,将标签栏所包括的至少一个标签和正在创建的标签等分标签栏宽度,将等分得到的宽度确定为标签宽度;
该第二确定单元334被配置为,用于根据宽度确定单元333确定的标签宽度和排列方式确定标签样式。
综上所述,本公开提供的标签创建装置,通过接收标签创建请求,该标签创建请求中携带有标签内容和应用程序的主题标识,该主题标识是应用程序当前使用的主题的标识;从主题标识所指示的主题信息中读取标签属性信息;根据标签属性信息确定主题所定义的标签样式;根据标签样式在标签栏中创建包括标签内容的标签,可以根据不同的主题样式定义不同的标签样式,使得标签与主题的样式统一,解决了固定的标签样式使得标签样式无法适应应用程序的主题变化需求,导致标签与主题的样式不统一的问题,达到了统一标签和主题的样式的效果。
另外,宽度确定规则是根据标签内容所占用的宽度确定标签宽度、将预定宽度确定为标签宽度中的一种,排列方式是左对齐排列方式、右对齐排列方式、居中排列方式中的一种;或,宽度确定规则是将标签栏的最大可用宽度确定为标签宽度,排列方式是分散排列方式,通过提供不同的宽度确定规则和不同的排列方式,使得宽度确定规则和排列方式之 间可以任意组合,达到了丰富标签样式的效果。
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
图5是根据一示例性实施例示出的一种用于标签创建装置500的框图。例如,装置500可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。
参照图5,装置500可以包括以下一个或多个组件:处理组件502,存储器504,电源组件506,多媒体组件508,音频组件510,输入/输出(I/O)的接口512,传感器组件514,以及通信组件516。
处理组件502通常控制装置500的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件502可以包括一个或多个处理器518来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件502可以包括一个或多个模块,便于处理组件502和其他组件之间的交互。例如,处理组件502可以包括多媒体模块,以方便多媒体组件508和处理组件502之间的交互。
存储器504被配置为存储各种类型的数据以支持在装置500的操作。这些数据的示例包括用于在装置500上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器504可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件506为装置500的各种组件提供电力。电源组件506可以包括电源管理系统,一个或多个电源,及其他与为装置500生成、管理和分配电力相关联的组件。
多媒体组件508包括在所述装置500和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件508包括一个前置摄像头和/或后置摄像头。当装置500处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。
音频组件510被配置为输出和/或输入音频信号。例如,音频组件510包括一个麦克风(MIC),当装置500处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器504或经由通信组件516发送。在一些实施例中,音频组件510还包括一个扬声器,用于输出音频信号。
I/O接口512为处理组件502和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件514包括一个或多个传感器,用于为装置500提供各个方面的状态评估。例如,传感器组件514可以检测到装置500的打开/关闭状态,组件的相对定位,例如所述组件为装置500的显示器和小键盘,传感器组件514还可以检测装置500或装置500一个组件的位置改变,用户与装置500接触的存在或不存在,装置500方位或加速/减速和装置500的温度变化。传感器组件514可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件514还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件514还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件516被配置为便于装置500和其他设备之间有线或无线方式的通信。装置500可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件516经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件516还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。
在示例性实施例中,装置500可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器504,上述指令可由装置500的处理器518执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本发明的其它实施方案。本申请旨在涵盖本发明的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本发明的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本发明的真正范围和精神由下面的权利要求指出。
应当理解的是,本发明并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本发明的范围仅由所附的权利要求来限制。

Claims (15)

  1. 一种标签创建方法,其特征在于,包括:
    接收标签创建请求,所述标签创建请求中携带有标签内容和应用程序的主题标识,所述主题标识是所述应用程序当前使用的主题的标识;
    从所述主题标识所指示的主题信息中读取标签属性信息;
    根据所述标签属性信息确定所述主题所定义的标签样式;
    根据所述标签样式在标签栏中创建包括所述标签内容的标签。
  2. 根据权利要求1所述的方法,其特征在于,所述从所述主题标识所指示的主题信息中读取标签属性信息,包括:
    从所述应用程序预存的至少一个主题信息中查找所述主题标识所指示的主题信息;
    从查找到的所述主题信息中读取所述标签属性信息,所述标签属性信息包括所述标签的宽度确定规则和所述标签在所述标签栏中的排列方式。
  3. 根据权利要求2所述的方法,其特征在于,
    所述宽度确定规则是根据标签内容所占用的宽度确定标签宽度、将预定宽度确定为标签宽度中的一种,所述排列方式是左对齐排列方式、右对齐排列方式、居中排列方式中的一种;或,
    所述宽度确定规则是将标签栏的最大可用宽度确定为标签宽度,所述排列方式是分散排列方式。
  4. 根据权利要求3所述的方法,其特征在于,所述根据所述标签属性信息确定所述主题所定义的标签样式,包括:
    若所述宽度确定规则是根据标签内容所占用的宽度确定标签宽度,则根据所述标签内容计算所述标签宽度;
    根据所述标签宽度和所述排列方式确定所述标签样式。
  5. 根据权利要求4所述的方法,其特征在于,所述根据所述标签内容计算所述标签宽度,包括:
    计算所述标签内容所占用的内容宽度;
    将所述内容宽度确定为所述标签宽度;或,检测所述内容宽度是否大于预设的最小宽度且小于预设的最大宽度,若检测出所述内容宽度大于所述最小宽度且小于所述最大宽度,则将所述内容宽度确定为所述标签宽度,若检测出所述内容宽度小于所述最小宽度或大于所述最大宽度,则将所述最小宽度或所述最大宽度确定为所述标签宽度。
  6. 根据权利要求5所述的方法,其特征在于,所述将所述最小宽度或所述最大宽度确定为所述标签宽度,包括:
    比较第一差值的绝对值和第二差值的绝对值,所述第一差值由所述最小宽度减去所述内容宽度得到,所述第二差值由所述最大宽度减去所述内容宽度得到;
    若所述第一差值的绝对值大于所述第二差值的绝对值,则将所述最大宽度确定为所述 标签宽度;
    若所述第一差值的绝对值小于所述第二差值的绝对值,则将所述最小宽度确定为所述标签宽度。
  7. 根据权利要求3所述的方法,其特征在于,所述根据所述标签属性信息确定所述主题所定义的标签样式,包括:
    若所述宽度确定规则是将标签栏的最大可用宽度确定为标签宽度,则将所述标签栏所包括的至少一个标签和正在创建的所述标签等分标签栏宽度,将等分得到的宽度确定为所述标签宽度;
    根据所述标签宽度和所述排列方式确定所述标签样式。
  8. 一种标签创建装置,其特征在于,包括:
    请求接收模块,用于接收标签创建请求,所述标签创建请求中携带有标签内容和应用程序的主题标识,所述主题标识是所述应用程序当前使用的主题的标识;
    信息读取模块,用于从所述主题标识所指示的主题信息中读取标签属性信息;
    样式确定模块,用于根据所述信息读取模块读取到的所述标签属性信息确定所述主题所定义的标签样式;
    标签创建模块,用于根据所述样式确定模块确定的所述标签样式在标签栏中创建包括所述标签内容的标签。
  9. 根据权利要求8所述的装置,其特征在于,所述信息读取模块,包括:
    信息查找单元,用于从所述应用程序预存的至少一个主题信息中查找所述主题标识所指示的主题信息;
    信息读取单元,用于从所述信息查找单元查找到的所述主题信息中读取所述标签属性信息,所述标签属性信息包括所述标签的宽度确定规则和所述标签在所述标签栏中的排列方式。
  10. 根据权利要求9所述的装置,其特征在于,
    所述宽度确定规则是根据标签内容所占用的宽度确定标签宽度、将预定宽度确定为标签宽度中的一种,所述排列方式是左对齐排列方式、右对齐排列方式、居中排列方式中的一种;或,
    所述宽度确定规则是将标签栏的最大可用宽度确定为标签宽度,所述排列方式是分散排列方式。
  11. 根据权利要求10所述的装置,其特征在于,所述样式确定模块,包括:
    宽度计算单元,用于在所述宽度确定规则是根据标签内容所占用的宽度确定标签宽度时,根据所述标签内容计算所述标签宽度;
    第一确定单元,用于根据所述宽度计算单元计算得到的所述标签宽度和所述排列方式确定所述标签样式。
  12. 根据权利要求11所述的装置,其特征在于,所述宽度计算单元,包括:
    宽度计算子单元,用于计算所述标签内容所占用的内容宽度;
    宽度确定子单元,用于将所述宽度计算子单元计算得到的所述内容宽度确定为所述标签宽度;或,检测所述宽度计算子单元计算得到的所述内容宽度是否大于预设的最小宽度且小于预设的最大宽度,若检测出所述内容宽度大于所述最小宽度且小于所述最大宽度,则将所述内容宽度确定为所述标签宽度,若检测出所述内容宽度小于所述最小宽度或大于所述最大宽度,则将所述最小宽度或所述最大宽度确定为所述标签宽度。
  13. 根据权利要求12所述的装置,其特征在于,所述宽度确定子单元,用于比较第一差值的绝对值和第二差值的绝对值,所述第一差值由所述最小宽度减去所述内容宽度得到,所述第二差值由所述最大宽度减去所述内容宽度得到;若所述第一差值的绝对值大于所述第二差值的绝对值,则将所述最大宽度确定为所述标签宽度;若所述第一差值的绝对值小于所述第二差值的绝对值,则将所述最小宽度确定为所述标签宽度。
  14. 根据权利要求10所述的装置,其特征在于,所述样式确定模块,包括:
    宽度确定单元,用于在所述宽度确定规则是将标签栏的最大可用宽度确定为标签宽度时,将所述标签栏所包括的至少一个标签和正在创建的所述标签等分标签栏宽度,将等分得到的宽度确定为所述标签宽度;
    第二确定单元,用于根据所述宽度确定单元确定的所述标签宽度和所述排列方式确定所述标签样式。
  15. 一种终端,其特征在于,包括:
    处理器;
    用于存储处理器可执行指令的存储器;
    其中,所述处理器被配置为:
    接收标签创建请求,所述标签创建请求中携带有标签内容和应用程序的主题标识,所述主题标识是所述应用程序当前使用的主题的标识;
    从所述主题标识所指示的主题信息中读取标签属性信息;
    根据所述标签属性信息确定所述主题所定义的标签样式;
    根据所述标签样式在标签栏中创建包括所述标签内容的标签。
PCT/CN2014/089198 2014-05-21 2014-10-22 标签创建方法、装置及终端 WO2015176483A1 (zh)

Priority Applications (6)

Application Number Priority Date Filing Date Title
JP2016520273A JP2016524763A (ja) 2014-05-21 2014-10-22 タグ作成方法、装置、端末、プログラム、及び記録媒体
BR112015000217A BR112015000217A2 (pt) 2014-05-21 2014-10-22 método, dispositivo e terminal de criação de rótulos
KR1020147035987A KR20150144264A (ko) 2014-05-21 2014-10-22 태그 작성 방법, 장치, 단말기, 프로그램 및 저장매체
RU2014153979/08A RU2603538C2 (ru) 2014-05-21 2014-10-22 Способ создания надписи, устройство и терминал
MX2014015638A MX354880B (es) 2014-05-21 2014-10-22 Metodo, dispositivo y terminal de creacion de etiqueta.
US14/585,796 US20150339016A1 (en) 2014-05-21 2014-12-30 Tab creation method, device, and terminal

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410216429.4 2014-05-21
CN201410216429.4A CN104020924B (zh) 2014-05-21 2014-05-21 标签创建方法、装置及终端

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/585,796 Continuation US20150339016A1 (en) 2014-05-21 2014-12-30 Tab creation method, device, and terminal

Publications (1)

Publication Number Publication Date
WO2015176483A1 true WO2015176483A1 (zh) 2015-11-26

Family

ID=51437710

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/089198 WO2015176483A1 (zh) 2014-05-21 2014-10-22 标签创建方法、装置及终端

Country Status (9)

Country Link
US (1) US20150339016A1 (zh)
EP (1) EP2947567A1 (zh)
JP (1) JP2016524763A (zh)
KR (1) KR20150144264A (zh)
CN (1) CN104020924B (zh)
BR (1) BR112015000217A2 (zh)
MX (1) MX354880B (zh)
RU (1) RU2603538C2 (zh)
WO (1) WO2015176483A1 (zh)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104020924B (zh) * 2014-05-21 2016-08-31 小米科技有限责任公司 标签创建方法、装置及终端
CN106162302B (zh) * 2015-04-22 2020-08-18 Tcl科技集团股份有限公司 一种Launcher主界面的编排方法、装置及智能电视
CN105631025B (zh) * 2015-12-29 2021-09-28 腾讯科技(深圳)有限公司 一种查询标签的归一化处理方法和装置
CN107025210B (zh) * 2016-02-02 2021-01-22 珠海金山办公软件有限公司 一种用于wps的文档标签显示方法及装置
CN108108364A (zh) * 2016-11-23 2018-06-01 珠海金山办公软件有限公司 一种标签显示方法及装置
CN106682964B (zh) * 2016-12-29 2021-08-10 努比亚技术有限公司 一种确定应用标签的方法和装置
KR20200016253A (ko) 2017-06-16 2020-02-14 광동 오포 모바일 텔레커뮤니케이션즈 코포레이션 리미티드 무선 통신 방법 및 장치
JP6724960B2 (ja) * 2018-09-14 2020-07-15 株式会社安川電機 リソース監視システム、リソース監視方法、及びプログラム
CN112000849B (zh) * 2020-08-21 2024-08-09 河南中原消费金融股份有限公司 统一标签库管理方法、装置、设备及存储介质
CN112559109A (zh) * 2020-12-28 2021-03-26 携程旅游网络技术(上海)有限公司 基于组件库的显示界面的生成方法及系统、设备及介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101278252A (zh) * 2005-09-07 2008-10-01 微软公司 数据库应用程序中用于显示可选功能控件的命令用户界面
US20120030627A1 (en) * 2010-07-30 2012-02-02 Nokia Corporation Execution and display of applications
CN102929603A (zh) * 2012-09-28 2013-02-13 用友软件股份有限公司 界面控件布局装置和界面控件布局方法
CN104020924A (zh) * 2014-05-21 2014-09-03 小米科技有限责任公司 标签创建方法、装置及终端

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5991802A (en) * 1996-11-27 1999-11-23 Microsoft Corporation Method and system for invoking methods of objects over the internet
US7197702B2 (en) * 2003-06-13 2007-03-27 Microsoft Corporation Web page rendering mechanism using external programmatic themes
JP2007080050A (ja) * 2005-09-15 2007-03-29 Nec Corp 通信システム、対話履歴閲覧方法、履歴管理装置および通信端末
US8001482B2 (en) * 2007-12-21 2011-08-16 International Business Machines Corporation Method of displaying tab titles
JP2010054871A (ja) * 2008-08-29 2010-03-11 Hitachi Displays Ltd 表示装置
CN101561748A (zh) * 2009-05-21 2009-10-21 阿里巴巴集团控股有限公司 Im软件中标签内容展现方法及展现装置
US9378297B2 (en) * 2011-03-07 2016-06-28 Microsoft Technology Licensing, Llc Task-based address bar and tabs scaling
CN103294692B (zh) * 2012-02-24 2017-10-17 北京搜狗信息服务有限公司 一种信息推荐方法及系统
CN103577167B (zh) * 2012-07-26 2017-10-27 腾讯科技(深圳)有限公司 实现动画显示页面标签的方法和装置
CN102929997B (zh) * 2012-10-24 2016-07-13 北京奇虎科技有限公司 浏览器标签的显示方法及装置
US20140282231A1 (en) * 2013-03-15 2014-09-18 Vectorform, LLC Dynamically reconfigurable multiframe user interface for a computing device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101278252A (zh) * 2005-09-07 2008-10-01 微软公司 数据库应用程序中用于显示可选功能控件的命令用户界面
US20120030627A1 (en) * 2010-07-30 2012-02-02 Nokia Corporation Execution and display of applications
CN102929603A (zh) * 2012-09-28 2013-02-13 用友软件股份有限公司 界面控件布局装置和界面控件布局方法
CN104020924A (zh) * 2014-05-21 2014-09-03 小米科技有限责任公司 标签创建方法、装置及终端

Also Published As

Publication number Publication date
CN104020924A (zh) 2014-09-03
CN104020924B (zh) 2016-08-31
BR112015000217A2 (pt) 2017-06-27
US20150339016A1 (en) 2015-11-26
EP2947567A1 (en) 2015-11-25
RU2014153979A (ru) 2016-07-20
JP2016524763A (ja) 2016-08-18
MX354880B (es) 2018-03-23
RU2603538C2 (ru) 2016-11-27
MX2014015638A (es) 2016-06-28
KR20150144264A (ko) 2015-12-24

Similar Documents

Publication Publication Date Title
WO2015176483A1 (zh) 标签创建方法、装置及终端
EP3454192B1 (en) Method and device for displaying page
US10324682B2 (en) Method, apparatus, and storage medium for controlling audio playing based on playing environment
US10296201B2 (en) Method and apparatus for text selection
US11416112B2 (en) Method and device for displaying an application interface
US11086482B2 (en) Method and device for displaying history pages in application program and computer-readable medium
CN104166689B (zh) 电子书籍的呈现方法及装置
US10509540B2 (en) Method and device for displaying a message
US11281363B2 (en) Method and device for setting identity image
WO2017113666A1 (zh) 应用界面切换方法及装置
US10078422B2 (en) Method and device for updating a list
WO2017016172A1 (zh) 图标的角标显示方法及装置
US9959487B2 (en) Method and device for adding font
CN108804179B (zh) 显示通知栏消息的方法、装置、终端及存储介质
EP3012725A1 (en) Method, device and electronic device for displaying descriptive icon information
WO2016065814A1 (zh) 信息选取方法及装置
WO2016065760A1 (zh) 设备连接的提示方法及装置
CN107229403B (zh) 一种信息内容选择方法及装置
US20170090684A1 (en) Method and apparatus for processing information
WO2016206295A1 (zh) 字符确定方法及装置
WO2016197549A1 (zh) 一种进行搜索的方法和装置
WO2015172523A1 (zh) 背景显示方法、装置及电子设备
CN106060253B (zh) 信息呈现的方法及装置
CN104317480B (zh) 字符按键显示方法、装置及终端
CN106383915A (zh) 标签处理方法、装置及终端

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: MX/A/2014/015638

Country of ref document: MX

ENP Entry into the national phase

Ref document number: 2016520273

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 20147035987

Country of ref document: KR

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2014153979

Country of ref document: RU

Kind code of ref document: A

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

Ref document number: 14892561

Country of ref document: EP

Kind code of ref document: A1

REG Reference to national code

Ref country code: BR

Ref legal event code: B01A

Ref document number: 112015000217

Country of ref document: BR

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14892561

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 112015000217

Country of ref document: BR

Kind code of ref document: A2

Effective date: 20150106