CN115079897A - Flow indicator generation method, device and equipment based on android terminal - Google Patents

Flow indicator generation method, device and equipment based on android terminal Download PDF

Info

Publication number
CN115079897A
CN115079897A CN202210771960.2A CN202210771960A CN115079897A CN 115079897 A CN115079897 A CN 115079897A CN 202210771960 A CN202210771960 A CN 202210771960A CN 115079897 A CN115079897 A CN 115079897A
Authority
CN
China
Prior art keywords
flow
icon
iconx
flow indicator
component
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210771960.2A
Other languages
Chinese (zh)
Inventor
蒋晓龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Xinchao Media Group Co Ltd
Original Assignee
Chengdu Xinchao Media Group Co Ltd
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 Chengdu Xinchao Media Group Co Ltd filed Critical Chengdu Xinchao Media Group Co Ltd
Priority to CN202210771960.2A priority Critical patent/CN115079897A/en
Publication of CN115079897A publication Critical patent/CN115079897A/en
Pending legal-status Critical Current

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/04817Interaction 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 using icons
    • 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/04845Interaction 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 for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0633Workflow analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Human Resources & Organizations (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Strategic Management (AREA)
  • Educational Administration (AREA)
  • Tourism & Hospitality (AREA)
  • Quality & Reliability (AREA)
  • General Business, Economics & Management (AREA)
  • Operations Research (AREA)
  • Marketing (AREA)
  • Game Theory and Decision Science (AREA)
  • Development Economics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a method, a device and equipment for generating a flow indicator based on an android terminal, wherein the method comprises the following steps: initializing a flow indicator; calculating to obtain the size of a flow indicator and coordinate data of each flow component according to the equipment parameters of the android terminal and/or the pre-configured parameters of each flow component; drawing by using a graph drawing method of the android terminal to obtain a complete flow indicator; and setting a touch monitoring event of the flow indicator, judging whether the touch operation of the user on the icon is in the touch range of the icon, if so, triggering the touch monitoring event, and redrawing the flow indicator. According to the invention, the user can customize the icon according to the own requirement, and after the user touches the current target, the user can perform page jump according to the logic required by the user so as to perform custom processing on the current process node, namely, the user can perform independent processing on each process node, thereby realizing the customization of the personalized process indicator.

Description

Flow indicator generation method, device and equipment based on android terminal
Technical Field
The invention belongs to the technical field of data processing, and particularly relates to a flow indicator generating method, device and equipment based on an android terminal.
Background
The workflow refers to the sequence of the flow of the work items, including the working links, steps and procedures in the actual working process. In the traditional implementation mode of the business process, many enterprises adopt modes of paper forms, manual transmission and stage-by-stage approval, and the working efficiency is very low.
With the development and popularization of computer technology, network technology and database technology, various enterprises and personal informatization applications emerge endlessly, and workflows are generated at the same time. A workflow is a computational model of a workflow, i.e., the logic and rules of how the work in the workflow is organized in tandem are represented in a computer in an appropriate model and computed. The main problems to be solved by the workflow are: to achieve a business goal, documents, information or tasks are automatically transferred between multiple participants using computers according to certain predefined rules. By adopting the workflow software, a user only needs to fill in related expressions on a computer, tasks can be automatically performed downwards according to a defined flow, and a next-stage processor can perform operations such as modification, tracking, management, inquiry, statistics, printing and the like as required after receiving related data, so that the working efficiency is greatly improved.
The existing flow indication methods basically adopt fixed patterns, users cannot modify the flow patterns according to their own requirements, and when the users need to check specific information under different flows or need to perform custom operations on different flows, the methods cannot be effectively expanded according to their own requirements, for example: the user can define the flow by self, including ordering, filling user information and verifying identity information, but the user cannot set the style of each flow node, and the user cannot check the specific content of another flow node when the user is at a certain flow node, so that the existing flow indicating method cannot meet the user requirement, and the user experience is poor.
Therefore, how to provide an effective scheme to perform customized drawing on the flowchart so as to avoid the problem that the personalized requirements of the user cannot be met has become a difficult problem to be solved in the prior art.
Disclosure of Invention
The invention aims to provide a flow indicator generating method, a flow indicator generating device and flow indicator generating equipment based on an android terminal, which are used for solving the technical problem that a user cannot modify a flow style according to the requirement of the user in the prior art so as to customize and draw the flow indicator style according to the requirement of the user.
In order to achieve the purpose, the invention adopts the following technical scheme:
in a first aspect, the present invention provides a flow indicator generating method based on an android terminal, including:
initializing a flow indicator;
calculating to obtain the size of a flow indicator and coordinate data of each flow component according to equipment parameters of the android terminal and/or pre-configured parameters of each flow component, wherein each flow component at least comprises an icon, a flow name of the icon and a line connecting adjacent icons, and the parameters of the flow components at least comprise component styles and component quantity;
drawing by using a graph drawing method of an android terminal according to the size of the flow indicator and the coordinate data of each flow component to obtain a complete flow indicator;
and setting a touch monitoring event of the flow indicator, judging whether the touch operation of the user on the icon is in the touch range of the icon, if so, triggering the touch monitoring event, and redrawing the flow indicator.
Based on the above disclosure, the size of the flow indicator and the coordinate data of each flow component can be obtained by calculation according to the device parameters of the android terminal and/or according to the preset parameters of each flow component, and the complete flow indicator can be obtained by drawing by using the graph drawing method of the android terminal, so that the user can customize the icon according to the self-demand, and the technical defect that the existing flow indicator can be defined only based on the flow name, the line color and the text font size is overcome; by setting the touch monitoring event of the flow indicator, after the touch operation of the user on the icon is monitored, the user can process the current flow according to the self requirement and redraw the flow indicator, and then after the user touches the current target, page jump can be carried out according to the logic of the user requirement so as to carry out custom processing on the current flow node, namely, the user can carry out independent processing on each flow node, thereby overcoming the technical defect that the existing flow indicator can only mark the flow name or carry out simple information description on each flow and can not meet the requirement of the user for carrying out special processing on the current flow node.
In one possible design, the pre-configuration of the parameters of each process component includes:
and judging whether the user configures the process component parameters, if not, adopting default component parameters, and if so, replacing the default component parameters with the process component parameters configured by the user.
Based on the content disclosed above, the user can customize the parameters of each flow component according to the self-demand, so as to meet the self-customized demand and improve the user experience.
In one possible design, calculating the size of the flow indicator according to the device parameters of the android terminal and/or the pre-configured parameters of each flow component includes:
setting the width W of the flow indicator as the width of a display screen of the self-adaptive android terminal;
calculating the height H of the flow indicator according to the preset parameters of each flow component, wherein the calculation formula is as follows:
H=M1+M2+Dmax+textPadding+Htmax; (1)
wherein, M1 and M2 respectively represent the inner upper margin and the inner lower margin of the flow indicator, Dmax represents the maximum diameter of the icon, textPadding represents the space between the flow name and the corresponding icon, and Htmax represents the maximum height of all the flow name texts.
In one possible design, calculating coordinate data of an icon according to device parameters of an android terminal and/or pre-configured parameters of each process component to obtain coordinate data of the icon includes:
the Y-axis coordinate Y1 of the center point of each icon is calculated according to the following formula:
Y1=M1+Rmax; (2)
the Y-axis coordinates of the center points of all icons are equal, and Rmax represents the maximum radius of the icons;
calculating a one-dimensional array iconX [ ] of the X-axis coordinates of the center points of all icons Icon as follows:
A. the first X-axis coordinate data, iconX [0], of the one-dimensional array, iconX [ ] is calculated as follows:
iconX [0] ═ M3+ (maximum of textWidth [0]/2 and Rmax); (3)
wherein, M3 and M4 represent the inner left margin and the inner right margin of the flow indicator, respectively, textWidth [ ] represents a one-dimensional array of text widths of all flow names, textWidth [0] represents text width data of the first flow name;
B. the last X-axis coordinate data, iconX [ iconX. length-1 ], of the one-dimensional array, iconX [ ] is calculated as follows:
iconX [ iconX. length-1 ] ═ W-M4- (maximum of iconX [ iconX. length-1 ]/2 and Rmax); (4)
length represents the array length of a one-dimensional array iconX [ ];
C. calculating the space between the first X-axis coordinate data iconX [0] and the last X-axis coordinate data iconX [ iconX. length-1 ], wherein the calculation formula is as follows:
Space=iconX[iconX.lenth-1]-iconX[0]; (5)
D. and (3) calculating the distance Margin between the names of the adjacent processes, wherein the calculation formula is as follows:
Margin=space/(step.lenth-1); (6)
length represents the length of the flow name one-dimensional array;
E. circularly traversing the one-dimensional array iconX [ ] and sequentially overlapping margin to obtain a plurality of intermediate X-axis coordinate data iconX [ i ] in the one-dimensional array iconX [ ];
F. and combining the first X-axis coordinate data iconX [0], the last X-axis coordinate data iconX [ iconX.length-1 ] and a plurality of intermediate X-axis coordinate data to obtain an X-axis coordinate one-dimensional array iconX [ ] of the center points of all the icons Icon.
In one possible design, calculating to obtain coordinate data of a process name according to device parameters of an android terminal and/or pre-configured parameters of each process component, includes:
setting the X-axis coordinate of the center point of each process name as the X-axis coordinate equal to the icon according to the preset configuration;
and calculating the Y-axis coordinate Y2 of the center point of each process name, wherein the calculation formula is as follows:
Y2=Y1+Rmax+textPadding; (7)
wherein, the Y-axis coordinates of the center points of all the process names are equal.
In one possible design, calculating to obtain coordinate data of a line according to device parameters of an android terminal and/or pre-configured parameters of each process component, includes:
the length L1 of the start point coordinate array startLinesX [ ] and the length L2 of the end point coordinate array endLineX [ ] of the line are calculated by the following formula:
L1=steps.lenth-1,L2=steps.lenth-1; (8)
calculating the X-axis coordinate startLinesX [ j ] of the starting point of each line, wherein the calculation formula is as follows:
startLinesX[j]=iconX[j]+Rmax+linePadding; (9)
wherein iconX [ j ] represents the coordinate of the central point X axis of the icon before the current line is adjacent, and linelading represents the distance between the line and the icon;
calculating the X-axis coordinate endLineX [ j ] of each line end point, wherein the calculation formula is as follows:
endLineX[j]=iconX[j+1]-Rmax-linePadding; (10)
wherein iconX [ j +1] represents the center point X-axis coordinate of the next icon adjacent to the current line.
In one possible design, according to the size of the flow indicator and the coordinate data of each flow component, a complete flow indicator is obtained by drawing by using a graph drawing method of an android terminal, and the method comprises the following steps:
calculating the rectangular range of each icon, and drawing the icon in the rectangular range by using an API (application programming interface) method of the android terminal according to the current flow state of the icon, wherein the calculation formula of the rectangular range is as follows:
Left=iconX[i]-R,Top=iconY-R,Right=iconX[i]+R,Bottom=iconY+R; (11)
wherein Left represents the distance between the Left side of the rectangle and the Left side of the flow indicator, Top represents the distance between the upper side of the rectangle and the upper side of the flow indicator, Right represents the distance between the Right side of the rectangle and the Left side of the flow indicator, Bottom represents the distance between the lower side of the rectangle and the upper side of the flow indicator, and R represents the radius of the icon;
according to the current process state of each process name, circularly traversing the one-dimensional arrays steps of the process names, and drawing the process names by using an android terminal API method drawText according to the coordinate data of each process name;
and drawing the lines by using an API (application programming interface) method drawline of the android terminal according to the current flow state, the starting point X-axis coordinate and the end point X-axis coordinate of each line.
In one possible design, determining whether a touch operation of a user on an icon is in a touch range of the icon, if so, triggering a touch monitoring event, and redrawing a flow indicator, including:
and judging whether the touch operation of the user on the icon is in the rectangular range of the icon, if so, triggering a touch monitoring event, redrawing the styles of the process components, and setting a hollow circle on the current icon.
Based on the disclosure, whether the touch operation of the user on the icon is in the rectangular range of the icon is judged, if yes, a touch monitoring event is triggered, so that after the touch operation of the user is monitored, page skipping can be performed on the current icon, the user can process the current process node according to the requirement of the user, and the diversified requirements of the user are met; meanwhile, by redrawing the styles of the flow components and setting a hollow circle on the icon at present, a user can visually observe that the current flow node is being processed, so that the operation is more convenient and faster.
In a second aspect, the present invention provides an apparatus for generating a flow indicator based on an android terminal, including:
the initialization module is used for initializing the process indicator;
the computing module is used for computing the size of the flow indicator and the coordinate data of each flow component according to the equipment parameters of the android terminal and/or the pre-configured parameters of each flow component, wherein each flow component at least comprises an icon, the flow name of the icon and a line connecting adjacent icons, and the parameters of each flow component at least comprise a component style and a component number;
the drawing module is used for drawing by utilizing a graph drawing method of the android terminal according to the size of the flow indicator and the coordinate data of each flow component to obtain a complete flow indicator;
and the monitoring module is used for setting a touch monitoring event of the flow indicator, judging whether the touch operation of the user on the icon is in the touch range of the icon, if so, triggering the touch monitoring event, and redrawing the flow indicator.
In a third aspect, the present invention provides a computer device, including a memory, a processor, and a transceiver, which are sequentially connected in a communication manner, where the memory is used to store a computer program, the transceiver is used to transmit and receive a message, and the processor is used to read the computer program and execute the method for generating a flow indicator based on an android terminal as described in any one possible design of the first aspect.
In a fourth aspect, the present invention provides a computer-readable storage medium, where instructions are stored, and when the instructions are executed on a computer, the method for generating an android-based flow indicator as described in any one of the possible designs of the first aspect is performed.
In a fifth aspect, the present invention provides a computer program product containing instructions that, when executed on a computer, cause the computer to perform the method for generating an android-based flow indicator as described in any one of the possible designs of the first aspect.
Drawings
Fig. 1 is a flowchart of a flow indicator generation method based on an android terminal provided in the present invention;
FIG. 2 is another flowchart of a method for generating a flow indicator based on an android terminal according to the present invention;
fig. 3 is a schematic structural diagram of the flow indicator generating device based on the android terminal provided in the present invention.
Detailed Description
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the present invention will be briefly described below with reference to the accompanying drawings and the embodiments or the description in the prior art, it is obvious that the following description of the structure of the drawings is only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts. It should be noted that the description of the embodiments is provided to help understanding of the present invention, but the present invention is not limited thereto.
Examples
In order to enable a user to customize an icon according to the user's own requirements and overcome the technical defect that the conventional flow indicator can only be defined based on the flow name, the line color and the text font size, the embodiment of the application provides a flow indicator generating method and device based on an android terminal, which are used for enabling the user to customize the icon according to the user's own requirements, so that the customization requirements of the user on the design of the flow indicator are met, and the user experience is improved.
The method for generating the flow indicator based on the android terminal provided by the embodiment of the application is described in detail below.
It should be noted that the flow indicator generation method based on the android terminal provided in the embodiment of the present application may be applied to any terminal device using an android system to generate a transverse flow indicator, where the terminal device includes, but is not limited to, an android smartphone, an android personal computer, and the like, and is not limited herein; of course, it can be understood that the flow indicator generating method based on the android terminal in this embodiment may also be applied to any terminal device using the android system to generate a vertical flow indicator, which is the same as the generating principle of the horizontal flow indicator, except that the specifically set component parameters and the formula for calculating the component coordinates based on the component parameters are slightly adjusted.
For convenience of description, unless otherwise specified, the embodiments of the present application are described with an android computer as an implementation subject. It is to be understood that the execution subject does not constitute a limitation to the embodiments of the present application, and in some other embodiments, an android smartphone or other type of android terminal device may be used as the execution subject.
As shown in fig. 1-fig. 2, the flowchart of the flow indicator generation method based on the android terminal provided in the embodiment of the present application is shown, where the flow indicator generation method based on the android terminal includes, but is not limited to, steps S1 to S4:
s1, initializing a flow indicator;
in step S1, initializing the flow indicator mainly includes: the parameters of each flow component are set as default values, and the control of the flow indicator is set as a default state as preparation for editing and generating the flow indicator.
S2, calculating to obtain the size of a flow indicator and coordinate data of each flow component according to equipment parameters of the android terminal and/or preset flow component parameters, wherein the flow components at least comprise icons, flow names of the icons and lines connecting adjacent icons, and the flow component parameters at least comprise component styles and component quantity;
in step S2, the pre-configuration method of each process component parameter includes:
and judging whether the user configures the process component parameters, if not, adopting default component parameters, and if so, replacing the default component parameters with the process component parameters configured by the user.
Before calculating and drawing the flow indicator, firstly judging whether a user configures a style by self, if the user does not configure the style, using a system default configuration to enter a subsequent calculating and drawing flow, and if the user configures the style, replacing the default configuration with the style configured by the user, and then entering the subsequent calculating and drawing flow, so that the user can customize parameters of each flow component according to the self-requirement, thereby meeting the self-customized requirement and improving the user experience.
The method includes the steps of setting a plurality of process components in a flow table, wherein the process components are in a type including but not limited to an icon type, an icon radius type, a one-dimensional array steps type of all process names and a line type, the icon type includes a one-dimensional array of a completed icon type, a one-dimensional array of an unfinished icon type and a one-dimensional array of an ongoing icon type, the icon radius type includes a completed icon radius, an unfinished icon radius, an ongoing icon radius and an icon radius when clicking occurs, the one-dimensional array steps type of all process names includes a completed text color, an unfinished text color and an ongoing text color, and the line type includes a completed line color, an unfinished line color, a space between a process name and an icon and a space between a line and an icon. The completed, unfinished, in-process and clicked refer to the current state of the process node.
It should be noted that, in this embodiment, when the size of the flow indicator and the coordinate data of each flow component are calculated, the vertex at the upper left corner of the display screen of the terminal device is used as the origin of coordinates, so as to keep the reference origins of all parameters consistent, and avoid calculation errors.
In step S2, calculating a size of the flow indicator according to the device parameters of the android terminal and/or the preconfigured parameters of each flow component, including:
s21a, setting the width W of the flow indicator as the width of a display screen of the self-adaptive android terminal;
it should be noted that, the setting of the width W of the flow indicator as the width of the display screen of the adaptive android terminal is only one embodiment of the present application, and it can be understood that, in other embodiments, the left margin and the right margin of the flow indicator may also be configured in advance, and the width W of the flow indicator is obtained through calculation, and specifically, the width W of the flow indicator may be set according to a user requirement, which is not limited herein.
Step S22a, calculating the height H of the flow indicator according to the preset parameters of each flow component, wherein the calculation formula is as follows:
H=M1+M2+Dmax+textPadding+Htmax; (1)
wherein, M1 and M2 represent the inner upper margin and the inner lower margin of the flow indicator, respectively, Dmax represents the maximum diameter of the icon, textPadding represents the distance between the flow name and the corresponding icon, and Htmax represents the maximum height of all the flow name texts.
The upper edge distance M1 of the flow indicator refers to a distance between an upper boundary of the flow indicator and an upper boundary of a display screen of the android terminal; the lower margin M2 of the flow indicator refers to the distance between the lower boundary of the flow indicator and the lower boundary of the android terminal display screen; the maximum diameter of the icon refers to the maximum value of the radius clickeDConradius of the icon when clicking occurs, the radius currentIconradius of the icon in progress, the radius undoneIconradius of the icon not completed and the radius doneIconradius of the icon completed, and the maximum value is multiplied by 2; the maximum height Htmax of the text is determined by circularly traversing the flow name one-dimensional arrays steps and determining the maximum height according to the flow name line number, namely the maximum line number of the flow name is the maximum height of the text, wherein the line height and the line distance of the text are preset, so the maximum height of the text can be determined according to the line number.
In step S2, calculating to obtain coordinate data of the icon according to the device parameters of the android terminal and/or the pre-configured parameters of each process component, including:
step S21b, calculating a Y-axis coordinate Y1 of the center point of each icon, wherein the calculation formula is as follows:
Y1=M1+Rmax; (2)
the Y-axis coordinates of the center points of all icons are equal, and Rmax represents the maximum radius of the icons;
the Y-axis coordinates of all icon center points are equal, and the Y-axis coordinates of all icon center points can be obtained through the Y-axis coordinate of one icon center point; the maximum radius Rmax of the icon is the maximum value of the radius clickeDConradius of the clicked icon, the radius currentIconradius of the icon in progress, the radius undoneIconradius of the icon in unfinished and the radius done of the icon donIconradius.
Step S22b, calculating a one-dimensional array iconX of X-axis coordinates of center points of all icons Icon, wherein the calculation process is as follows:
A. the first X-axis coordinate data, iconX [0], of the one-dimensional array, iconX [ ] is calculated as follows:
iconX [0] ═ M3+ (maximum of textWidth [0]/2 and Rmax); (3)
wherein, M3 and M4 represent the inner left margin and the inner right margin of the flow indicator, respectively, textWidth [ ] represents a one-dimensional array of text widths of all flow names, textWidth [0] represents text width data of the first flow name;
B. the last X-axis coordinate data, iconX [ iconX. length-1 ], of the one-dimensional array, iconX [ ] is calculated as follows:
iconX [ iconX. length-1 ] ═ W-M4- (maximum of iconX [ iconX. length-1 ]/2 and Rmax); (4)
wherein, iconX.length represents the array length of a one-dimensional array iconX [ ];
C. calculating the space between the first X-axis coordinate data iconX [0] and the last X-axis coordinate data iconX [ iconX. length-1 ], wherein the calculation formula is as follows:
Space=iconX[iconX.lenth-1]-iconX[0]; (5)
D. and calculating the distance Margin between the names of the adjacent processes, wherein the calculation formula is as follows:
Margin=space/(step.lenth-1); (6)
length represents the length of the flow name one-dimensional array;
E. circularly traversing the one-dimensional array iconX [ ] and sequentially overlapping margin to obtain a plurality of intermediate X-axis coordinate data iconX [ i ] in the one-dimensional array iconX [ ];
F. and combining the first X-axis coordinate data iconX [0], the last X-axis coordinate data iconX [ iconX.length-1 ] and a plurality of intermediate X-axis coordinate data to obtain an X-axis coordinate one-dimensional array iconX [ ] of the center points of all the icons Icon.
In step S2, calculating to obtain coordinate data of the process name according to the device parameters of the android terminal and/or the preconfigured parameters of each process component, including:
setting the X-axis coordinate of the center point of each process name as the X-axis coordinate equal to the icon according to the preset configuration;
and calculating the Y-axis coordinate Y2 of the center point of each process name, wherein the calculation formula is as follows:
Y2=Y1+Rmax+textPadding; (7)
wherein, the Y-axis coordinates of the center points of all the process names are equal.
It should be noted that, since all the process name center points are on the same level, the Y-axis coordinates of all the icon center points are equal, and the Y-axis coordinates of all the process name center points can be obtained through the Y-axis coordinate of one of the process name center points; the maximum radius Rmax of the icon is the maximum value of the radius clickeDConradius of the icon when clicking occurs, the radius currentIconradius of the icon in progress, the radius undoneIconradius of the icon not completed and the radius done of the icon donIconradius; wherein, textPadding can be set according to user requirements, and the default value is 0.
In addition, it should be noted that, since the X-axis coordinate of the center point of each process name corresponds to the X-axis coordinate of the center point of the corresponding icon one to one, the X-axis coordinate of the center point of each process name is equal to the X-axis coordinate of the center point of the corresponding icon, and the one-dimensional array of the X-axis coordinates of the center points of the icon has been obtained through calculation, so that the one-dimensional array of the X-axis coordinates of the center points of all process names can be obtained.
In step S2, calculating to obtain coordinate data of the line according to the device parameters of the android terminal and/or the preconfigured parameters of the process components, including:
step S21c, calculating the length L1 of the starting point coordinate array startLinesX [ ] and the length L2 of the ending point coordinate array endLineX [ ] of the line, wherein the calculation formula is as follows:
L1=steps.lenth-1,L2=steps.lenth-1; (8)
it should be noted that the number of drawn lines of a line may be determined according to the length of the one-dimensional array of the flow name or the length of the one-dimensional array of the icon, and after the number of drawn lines is determined, the length L1 of the start coordinate array startLinesX [ ] and the length L2 of the end coordinate array endlinexx [ ] may be determined.
Step S22c, calculating the X-axis coordinate startLinesX [ j ] of the starting point of each line, wherein the calculation formula is as follows:
startLinesX[j]=iconX[j]+Rmax+linePadding; (9)
wherein iconX [ j ] represents the coordinate of the central point X axis of the icon before the current line is adjacent, and linelading represents the distance between the line and the icon;
s23c, calculating the X-axis coordinate endLineX [ j ] of each line end point, wherein the calculation formula is as follows:
endLineX[j]=iconX[j+1]-Rmax-linePadding; (10)
wherein iconX [ j +1] represents the center point X-axis coordinate of the next icon adjacent to the current line.
S3, drawing by using a graph drawing method of an android terminal according to the size of the flow indicator and the coordinate data of each flow component to obtain a complete flow indicator;
in step S3, according to the size of the flow indicator and the coordinate data of each flow component, a complete flow indicator is obtained by drawing using a graph drawing method of an android terminal, including:
s31, calculating a rectangular range of each icon, and drawing the icon in the rectangular range by using an API (application programming interface) method of the android terminal according to the current flow state of the icon, wherein the calculation formula of the rectangular range is as follows:
Left=iconX[i]-R,Top=iconY-R,Right=iconX[i]+R,Bottom=iconY+R; (11)
wherein Left represents the distance between the Left side of the rectangle and the Left side of the flow indicator, Top represents the distance between the upper side of the rectangle and the upper side of the flow indicator, Right represents the distance between the Right side of the rectangle and the Left side of the flow indicator, Bottom represents the distance between the lower side of the rectangle and the upper side of the flow indicator, and R represents the radius of the icon;
it should be noted that the current flow status of each icon includes completed, in-process, and not completed.
S32, circularly traversing the flow name one-dimensional arrays steps according to the current flow state of each flow name, and drawing the flow name by using an android terminal API method drawText according to the coordinate data of each flow name;
it should be noted that the current process state of each process name includes completed, neutralized and incomplete, and since the one-dimensional array iconX [ ] of the X-axis coordinates of the center points of all the icons Icon has been obtained by calculation, that is, the one-dimensional array of the X-axis coordinates of the center points of all the process names has been obtained by calculation, and the Y-axis coordinates of each process name has been obtained by calculation, the process name is sequentially drawn by using the API method drawText provided by the android terminal itself based on the pre-configured process name text according to the X-axis and Y-axis coordinates.
And S33, drawing the lines by using an API (application programming interface) method drawline of the android terminal according to the current flow state, the starting point X-axis coordinate and the end point X-axis coordinate of each line.
It should be noted that, the current flow state of each line includes completed, performed and uncompleted, and each state is configured with a corresponding line color in advance, and then based on the calculated X-axis coordinate endLineX [ j ] of each line end point and the calculated X-axis coordinate endLineX [ j ] of each line end point, the line can be drawn by using the API method drawline provided by the android terminal itself.
And S4, setting a touch monitoring event of the flow indicator, judging whether the touch operation of the user on the icon is in the touch range of the icon, if so, triggering the touch monitoring event, and redrawing the flow indicator.
In step S4, determining whether the touch operation of the user on the icon is within the touch range of the icon, if so, triggering a touch monitoring event, and redrawing the flow indicator, including:
judging whether the touch operation of the user on the icon is in the rectangular range of the icon, if so, triggering a touch monitoring event, redrawing the styles of all the process components, and setting a hollow circle on the current icon, so that after the touch operation of the user is monitored, page skipping can be performed on the current icon, the user can process the current process node according to the self requirement, and the diversified requirements of the user are met; meanwhile, by redrawing the styles of the flow components and setting a hollow circle on the icon at present, a user can visually observe that the current flow node is being processed, so that the operation is more convenient and faster.
Based on the above disclosure, the size of the flow indicator and the coordinate data of each flow component can be obtained by calculation according to the device parameters of the android terminal and/or according to the preset parameters of each flow component, and the complete flow indicator can be obtained by drawing by using the graph drawing method of the android terminal, so that the user can customize the icon according to the self-demand, and the technical defect that the existing flow indicator can only be defined based on the flow name, the line color and the text font size is overcome; by setting the touch monitoring event of the flow indicator, after the touch operation of the user on the icon is monitored, the user can process the current flow according to the self requirement and redraw the flow indicator, and then after the user touches the current target, page jump can be carried out according to the logic of the user requirement so as to carry out custom processing on the current flow node, namely, the user can carry out independent processing on each flow node, thereby overcoming the technical defect that the existing flow indicator can only mark the flow name or carry out simple information description on each flow and can not meet the requirement of the user for carrying out special processing on the current flow node.
As shown in fig. 3, in a second aspect, the present invention provides an apparatus for generating a flow indicator based on an android terminal, including:
the initialization module is used for initializing the process indicator;
the computing module is used for computing the size of the flow indicator and the coordinate data of each flow component according to the equipment parameters of the android terminal and/or the pre-configured parameters of each flow component, wherein each flow component at least comprises an icon, the flow name of the icon and a line connecting adjacent icons, and the parameters of each flow component at least comprise a component style and a component number;
the drawing module is used for drawing by utilizing a graph drawing method of the android terminal according to the size of the flow indicator and the coordinate data of each flow component to obtain a complete flow indicator;
and the monitoring module is used for setting a touch monitoring event of the flow indicator, judging whether the touch operation of the user on the icon is in the touch range of the icon, if so, triggering the touch monitoring event, and redrawing the flow indicator.
For the working process, working details and technical effects of the foregoing apparatus provided in the second aspect of this embodiment, reference may be made to the method described in any one of the first aspect or the first aspect, which is not described herein again.
In a third aspect, the present invention provides a computer device, including a memory, a processor, and a transceiver, which are sequentially connected in a communication manner, where the memory is used to store a computer program, the transceiver is used to transmit and receive a message, and the processor is used to read the computer program and execute the method for generating a flow indicator based on an android terminal as described in any one possible design of the first aspect.
For example, the Memory may include, but is not limited to, a Random-Access Memory (RAM), a Read-Only Memory (ROM), a Flash Memory (Flash Memory), a First-in First-out (FIFO), and/or a First-in Last-out (FILO), and the like; the processor may not be limited to the use of a microprocessor model number STM32F105 family; the transceiver may be, but is not limited to, a WiFi (wireless fidelity) wireless transceiver, a bluetooth wireless transceiver, a GPRS (General Packet Radio Service) wireless transceiver, and/or a ZigBee (ZigBee protocol, low power local area network protocol based on ieee802.15.4 standard) wireless transceiver, etc. In addition, the computer device may also include, but is not limited to, a power module, a display screen, and other necessary components.
For the working process, working details and technical effects of the foregoing computer device provided in the third aspect of this embodiment, reference may be made to the method described in the first aspect or any one of the possible designs of the first aspect, which is not described herein again.
In a fourth aspect, the present invention provides a computer-readable storage medium, where instructions are stored, and when the instructions are executed on a computer, the method for generating an android-based flow indicator as described in any one of the possible designs of the first aspect is performed.
The computer-readable storage medium refers to a carrier for storing data, and may include, but is not limited to, floppy disks, optical disks, hard disks, flash memories, flash disks and/or Memory sticks (Memory sticks), etc., and the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
For the working process, the working details and the technical effects of the foregoing computer-readable storage medium provided in the fourth aspect of this embodiment, reference may be made to the method in any one of the above first aspect or the possible designs of the first aspect, and details are not described herein again.
In a fifth aspect, the present invention provides a computer program product containing instructions that, when executed on a computer, cause the computer to perform the method for generating an android-based flow indicator as described in any one of the possible designs of the first aspect.
For the working process, the working details and the technical effects of the computer program product containing the instructions provided in the fifth aspect of the present embodiment, reference may be made to the method described in the first aspect or any one of the possible designs of the first aspect, and details are not described herein again.
Finally, it should be noted that: the above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A flow indicator generation method based on an android terminal is characterized by comprising the following steps:
initializing a flow indicator;
calculating to obtain the size of a flow indicator and coordinate data of each flow component according to equipment parameters of the android terminal and/or pre-configured parameters of each flow component, wherein each flow component at least comprises an icon, a flow name of the icon and a line connecting adjacent icons, and the parameters of the flow components at least comprise component styles and component quantity;
drawing by using a graph drawing method of an android terminal according to the size of the flow indicator and the coordinate data of each flow component to obtain a complete flow indicator;
and setting a touch monitoring event of the flow indicator, judging whether the touch operation of the user on the icon is in the touch range of the icon, if so, triggering the touch monitoring event, and redrawing the flow indicator.
2. The android-based process indicator generation method of claim 1, wherein the pre-configuration of each process component parameter comprises:
and judging whether the user configures the process component parameters, if not, adopting default component parameters, and if so, replacing the default component parameters with the process component parameters configured by the user.
3. The method of claim 1, wherein calculating the size of the flow indicator according to the device parameters of the android terminal and/or the pre-configured parameters of each flow component comprises:
setting the width W of the flow indicator as the width of a display screen of the self-adaptive android terminal;
calculating the height H of the flow indicator according to the preset parameters of each flow component, wherein the calculation formula is as follows:
H=M1+M2+Dmax+textPadding+Htmax; (1)
wherein, M1 and M2 represent the inner upper margin and the inner lower margin of the flow indicator, respectively, Dmax represents the maximum diameter of the icon, textPadding represents the distance between the flow name and the corresponding icon, and Htmax represents the maximum height of all the flow name texts.
4. The method according to claim 3, wherein the step of calculating the coordinate data of the icon according to the device parameters of the android terminal and/or the pre-configured parameters of each process component comprises:
the Y-axis coordinate Y1 of the center point of each icon is calculated according to the following formula:
Y1=M1+Rmax; (2)
the Y-axis coordinates of the center points of all icons are equal, and Rmax represents the maximum radius of the icons;
calculating a one-dimensional array iconX [ ] of the X-axis coordinates of the center points of all icons Icon as follows:
A. the first X-axis coordinate data, iconX [0], of the one-dimensional array, iconX [ ] is calculated as follows:
iconX [0] ═ M3+ (maximum of textWidth [0]/2 and Rmax); (3)
wherein, M3 and M4 represent the inner left margin and the inner right margin of the flow indicator, respectively, textWidth [ ] represents a one-dimensional array of text widths of all flow names, textWidth [0] represents text width data of the first flow name;
B. the last X-axis coordinate data, iconX [ iconX. length-1 ], of the one-dimensional array, iconX [ ] is calculated as follows:
iconX [ iconX. length-1 ] ═ W-M4- (maximum of iconX [ iconX. length-1 ]/2 and Rmax); (4)
length represents the array length of a one-dimensional array iconX [ ];
C. calculating the space between the first X-axis coordinate data iconX [0] and the last X-axis coordinate data iconX [ iconX. length-1 ], and the calculation formula is as follows:
Space=iconX[iconX.lenth-1]-iconX[0]; (5)
D. and calculating the distance Margin between the names of the adjacent processes, wherein the calculation formula is as follows:
Margin=space/(step.lenth-1); (6)
length represents the length of the flow name one-dimensional array;
E. circularly traversing the one-dimensional array iconX [ ] and sequentially overlapping margin to obtain a plurality of intermediate X-axis coordinate data iconX [ i ] in the one-dimensional array iconX [ ];
F. and combining the first X-axis coordinate data iconX [0], the last X-axis coordinate data iconX [ iconX.length-1 ] and a plurality of intermediate X-axis coordinate data to obtain an X-axis coordinate one-dimensional array iconX [ ] of the center points of all the icons Icon.
5. The method of claim 4, comprising: calculating to obtain coordinate data of the process name according to the device parameters of the android terminal and/or the pre-configured parameters of each process component, wherein the method comprises the following steps:
setting the X-axis coordinate of the center point of each process name as the X-axis coordinate equal to the icon according to the preset configuration;
and calculating the Y-axis coordinate Y2 of the center point of each process name, wherein the calculation formula is as follows:
Y2=Y1+Rmax+textPadding; (7)
wherein, the Y-axis coordinates of the center points of all the process names are equal.
6. The method according to claim 5, wherein the step of calculating the coordinate data of the line according to the device parameters of the android terminal and/or the pre-configured parameters of each process component comprises:
the length L1 of the start point coordinate array startLinesX [ ] and the length L2 of the end point coordinate array endLineX [ ] of the line are calculated by the following formula:
L1=steps.lenth-1,L2=steps.lenth-1; (8)
calculating the X-axis coordinate startLinesX [ j ] of the starting point of each line, wherein the calculation formula is as follows:
startLinesX[j]=iconX[j]+Rmax+linePadding; (9)
wherein iconX [ j ] represents the coordinate of the central point X axis of the icon before the current line is adjacent, and linelading represents the distance between the line and the icon;
calculating the X-axis coordinate endLineX [ j ] of each line end point, wherein the calculation formula is as follows:
endLineX[j]=iconX[j+1]-Rmax-linePadding; (10)
wherein iconX [ j +1] represents the center point X-axis coordinate of the next icon adjacent to the current line.
7. The method of claim 1, wherein the step of drawing the complete flow indicator by using a graph drawing method of an android terminal according to the size of the flow indicator and the coordinate data of each flow component comprises:
calculating the rectangular range of each icon, and drawing the icon in the rectangular range by using an API (application programming interface) method of the android terminal according to the current flow state of the icon, wherein the calculation formula of the rectangular range is as follows:
Left=iconX[i]-R,Top=iconY-R,Right=iconX[i]+R,Bottom=iconY+R; (11)
wherein Left represents the distance between the Left side of the rectangle and the Left side of the flow indicator, Top represents the distance between the upper side of the rectangle and the upper side of the flow indicator, Right represents the distance between the Right side of the rectangle and the Left side of the flow indicator, Bottom represents the distance between the lower side of the rectangle and the upper side of the flow indicator, and R represents the radius of the icon;
according to the current process state of each process name, circularly traversing the one-dimensional arrays steps of the process names, and drawing the process names by using an android terminal API method drawText according to the coordinate data of each process name;
and drawing the lines by using an API (application programming interface) method drawline of the android terminal according to the current flow state, the starting point X-axis coordinate and the end point X-axis coordinate of each line.
8. The method of claim 7, wherein determining whether the touch operation of the user on the icon is within the touch range of the icon, if so, triggering a touch listening event, and redrawing the flow indicator comprises:
and judging whether the touch operation of the user on the icon is in the rectangular range of the icon, if so, triggering a touch monitoring event, redrawing the styles of the process components, and setting a hollow circle on the current icon.
9. The utility model provides a flow indicator generates device based on tall and erect end of ann, its characterized in that includes:
the initialization module is used for initializing the process indicator;
the computing module is used for computing the size of the flow indicator and the coordinate data of each flow component according to the equipment parameters of the android terminal and/or the pre-configured parameters of each flow component, wherein each flow component at least comprises an icon, the flow name of the icon and a line connecting adjacent icons, and the parameters of each flow component at least comprise a component style and a component number;
the drawing module is used for drawing by utilizing a graph drawing method of the android terminal according to the size of the flow indicator and the coordinate data of each flow component to obtain a complete flow indicator;
and the monitoring module is used for setting a touch monitoring event of the flow indicator, judging whether the touch operation of the user on the icon is in the touch range of the icon, if so, triggering the touch monitoring event, and redrawing the flow indicator.
10. A computer device, comprising a memory, a processor and a transceiver, which are sequentially connected in communication, wherein the memory is used for storing a computer program, the transceiver is used for sending and receiving messages, and the processor is used for reading the computer program and executing the android-based flow indicator generating method according to any one of claims 1 to 8.
CN202210771960.2A 2022-06-30 2022-06-30 Flow indicator generation method, device and equipment based on android terminal Pending CN115079897A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210771960.2A CN115079897A (en) 2022-06-30 2022-06-30 Flow indicator generation method, device and equipment based on android terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210771960.2A CN115079897A (en) 2022-06-30 2022-06-30 Flow indicator generation method, device and equipment based on android terminal

Publications (1)

Publication Number Publication Date
CN115079897A true CN115079897A (en) 2022-09-20

Family

ID=83257313

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210771960.2A Pending CN115079897A (en) 2022-06-30 2022-06-30 Flow indicator generation method, device and equipment based on android terminal

Country Status (1)

Country Link
CN (1) CN115079897A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170269945A1 (en) * 2016-03-15 2017-09-21 Sundeep Harshadbhai Patel Systems and methods for guided live help
CN114444935A (en) * 2022-01-24 2022-05-06 深圳壹账通智能科技有限公司 Processing method, device and equipment for customizing online workflow and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170269945A1 (en) * 2016-03-15 2017-09-21 Sundeep Harshadbhai Patel Systems and methods for guided live help
CN114444935A (en) * 2022-01-24 2022-05-06 深圳壹账通智能科技有限公司 Processing method, device and equipment for customizing online workflow and storage medium

Similar Documents

Publication Publication Date Title
EP2509390B1 (en) Method and mobile terminal for processing contacts
JP5757035B2 (en) Organize charts with visual landmarks
CN109725901A (en) Development approach, device, equipment and the computer storage medium of front-end code
WO2017114116A1 (en) Method, apparatus and device for managing functional icon of application program of terminal
CN108628656A (en) Interface adaptation method, device, computer equipment and storage medium on ios device
CN110399583B (en) Page display method and device, electronic equipment and storage medium
EP2587371A1 (en) Improved configuration of a user interface for a mobile communications terminal
CN104281995B (en) The method and apparatus that picture adds watermark
CN103208046A (en) Workflow engine architecture method and system based on interactive dynamic flow diagram
CN109491743A (en) Visual Report Forms generation method, device, electronic equipment and storage medium
CN102999752A (en) Method and device for quickly identifying local characters in picture and terminal
CN105354022A (en) Generation method and device of page layout file
CN109753641A (en) A kind of method, apparatus, electronic equipment and storage medium for changing object's position
CN102023869A (en) Control input value checking method and system
CN110708235A (en) Message generation method and device, storage medium and computer equipment
CN102487362B (en) The display packing of IM message and device
CN115079897A (en) Flow indicator generation method, device and equipment based on android terminal
JP5899694B2 (en) Layout editing apparatus and layout editing program
CN107872483A (en) Method for pushing, the apparatus and system of media content
CN103049208A (en) Method, device and mobile terminal for customizing rapid touch operation
WO2023045412A1 (en) Page creation method, apparatus and system, computer device and storage medium
CN116450021A (en) Large screen building method, system, electronic equipment and storage medium
CN109684024A (en) Display methods, intelligent terminal and the computer readable storage medium of multiwindow
CN109086326B (en) Method and device for converting interface document into data model file
CN113543047A (en) Method, system and device for making 5G message

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination