CN109117222A - A kind of implementation method for the interactive button prompting network load progress - Google Patents
A kind of implementation method for the interactive button prompting network load progress Download PDFInfo
- Publication number
- CN109117222A CN109117222A CN201810821833.2A CN201810821833A CN109117222A CN 109117222 A CN109117222 A CN 109117222A CN 201810821833 A CN201810821833 A CN 201810821833A CN 109117222 A CN109117222 A CN 109117222A
- Authority
- CN
- China
- Prior art keywords
- button
- control
- network load
- progress
- presented
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
Abstract
The present invention relates to a kind of implementation methods of interactive button for prompting network load progress, include the following steps: the interactive button class SubmitView of customized prompt network load progress;Set paintbrush paint class and color;It sets different submission states and submits the corresponding prompt text of result;Set the rendering parameter of the button of default;Defined variable, for the interaction response of control button;OnLayout method is rewritten, the wide high level of control is obtained, calculates the chamfer angle of control, obtain the width of paintbrush;Defining interface, for monitoring the operation after readjustment loads successfully, for monitoring the process that readjustment starts load;OnDraw method is rewritten, according to current different status indicator graphing.The present invention, custom button control, the process and result that network can be prompted to load, it is avoided that caused by user repeatedly clicks and sends repeatedly submission request, mitigate overhead, promote interaction effect, the management and experience for enhancing network interaction, improve the development efficiency of App.
Description
Technical field
The present invention relates to Interactive interface designing technical field, specifically a kind of interactive button for prompting network load progress
Implementation method.
Background technique
Existing interactive interface (such as the interactive interface in App, the interactive interface, etc. in webpage), to distally mentioning
Intersection number according to when, require at least one button for issue submit request.
It submits data to need by network to distal end, therefore is typically necessary the regular hour to wait, obtain return letter
It ceases and (submits result), need to shield user during this period and continue to click in order to avoid sending repeatedly submission request.
In android system, provides Button and click button control, but cannot be according to different conditions when submitting
It carries out UI to update accordingly, user can not be avoided repeatedly to click well.It needs further to optimize button control.
Summary of the invention
In view of the deficiencies in the prior art, the purpose of the present invention is to provide a kind of friendships for prompting network load progress
The implementation method of mutual button, custom button control can prompt the process of network load and as a result, being avoided that user repeatedly clicks
Request is repeatedly submitted in caused transmission, mitigates overhead, is promoted interaction effect, is enhanced the management and experience of network interaction, mention
The high development efficiency of App.
To achieve the above objectives, the technical solution adopted by the present invention is that:
A kind of implementation method for the interactive button prompting network load progress, which comprises the steps of:
The interactive button class SubmitView of customized prompt network load progress, for drawing button and net being presented in button
Network load process and as a result,
The process of network load is used to that submission state to be presented to user,
The result of network load, which is used to present to user, submits result;
Set paintbrush paint class and color;
It sets different submission states and submits the corresponding prompt text of result;
The rendering parameter for setting the button of default, includes at least:
Background,
The wide high level of control,
The chamfer angle of control;
Following variable is defined, for the interaction response of control button:
Variable mCanClick, for the click event of control button,
Defined variable mIfReset, for the resetting event of control button;
OnLayout method is rewritten, the wide high level of control is obtained, calculates the chamfer angle of control, obtain the width of paintbrush;
Defining interface OnProgressDone and abstract method progressDown therein, for monitor readjustment load successfully after
Operation,
Defining interface OnProgressStart and abstract method progressStart therein, starts to load for monitoring readjustment
Process;
Round rectangle button is presented for drawing the state of initial control in definition method drawInit;
Round progress bar is presented for changing the color of background and font in definition method drawFirst;
Definition method onClick, for handling click event;
Definition method drawCorrectSign is presented for drawing the state for successfully submitting control with the round rectangle checked the number;
OnDraw method is rewritten, according to current different status indicator graphing, is specifically included:
Original state draws round rectangle button, and the text that prompt is clicked is presented in button,
Network stress state draws round progress bar, the process of network load is presented,
Success status is submitted, is drawn with the round rectangle checked the number, is presented and check the number in round rectangle, submit successfully.
Based on the above technical solution, the rendering parameter of button further include:
Frame inset spacing, for controlling the gap of text and frame,
When rewriteeing onLayout method, the wide high level of control subtracts frame inset spacing, the as width and height of content area.
Based on the above technical solution, AniState is enumerated in definition, for the interaction mode of control button, enumerated value
Include:
INIT, original state,
FIRST_START, background and font color start to change,
FIRST_STOP, background and font color change terminate,
SECOND_START, font size start to change,
SECOND_STOP, font size change terminate,
THIRD_START, round rectangle button change round progress bar,
The round progress bar of transformation is completed in THIRD_STOP,
Progress is presented in FOURTH_START, round progress bar,
Presentation progress is completed in FOURTH_STOP,
FIFTH_START, the round rectangle that round progress bar Transition Zone is checked the number,
FIFTH_STOP, the round rectangle that round rectangle button Transition Zone is checked the number.
Based on the above technical solution, in method onClick, pass through the variable of Boolean data type
MCanClick judges whether to click, and after clicking primary, then mCanClick is set as to click,
Control is repainted by the method invalidate in the View class of android system offer.
The implementation method of the interactive button of prompt network load progress of the present invention, custom button control can mention
Show the process and send repeatedly submission request as a result, being avoided that caused by user repeatedly clicks that network loads, mitigate overhead,
Interaction effect is promoted, enhances the management and experience of network interaction, improves the development efficiency of App.
Detailed description of the invention
The present invention has following attached drawing:
Flow chart Fig. 1 of the invention.
Specific embodiment
Below in conjunction with attached drawing, invention is further described in detail.
As shown in Figure 1, the implementation method of the interactive button of prompt network load progress of the present invention, including walk as follows
It is rapid:
The interactive button class SubmitView of customized prompt network load progress, for drawing button and net being presented in button
Network load process and as a result,
The process of network load is used to that submission state to be presented to user,
The result of network load, which is used to present to user, submits result;
Set paintbrush paint class and color;
It sets different submission states and submits the corresponding prompt text of result;
The rendering parameter for setting the button of default, includes at least:
Background,
The wide high level of control,
The chamfer angle of control;
Following variable is defined, for the interaction response of control button:
Variable mCanClick, for the click event of control button,
Defined variable mIfReset, for the resetting event of control button;
OnLayout method is rewritten, the wide high level of control is obtained, calculates the chamfer angle of control, obtain the width of paintbrush;
Defining interface OnProgressDone and abstract method progressDown therein, for monitor readjustment load successfully after
Operation,
Defining interface OnProgressStart and abstract method progressStart therein, starts to load for monitoring readjustment
Process;
Round rectangle button is presented for drawing the state of initial control in definition method drawInit;
Round progress bar is presented for changing the color of background and font in definition method drawFirst;
Definition method onClick, for handling click event;
Definition method drawCorrectSign is presented for drawing the state for successfully submitting control with the round rectangle checked the number;
OnDraw method is rewritten, according to current different status indicator graphing, is specifically included:
Original state draws round rectangle button, and the text that prompt is clicked is presented in button,
Network stress state draws round progress bar, the process of network load is presented,
Success status is submitted, is drawn with the round rectangle checked the number, is presented and check the number in round rectangle, submit successfully.
Based on the above technical solution, the rendering parameter of button further include:
Frame inset spacing, for controlling the gap of text and frame,
When rewriteeing onLayout method, the wide high level of control subtracts frame inset spacing, the as width and height of content area.
Based on the above technical solution, AniState is enumerated in definition, for the interaction mode of control button, enumerated value
Include:
INIT, original state,
FIRST_START, background and font color start to change,
FIRST_STOP, background and font color change terminate,
SECOND_START, font size start to change,
SECOND_STOP, font size change terminate,
THIRD_START, round rectangle button change round progress bar,
The round progress bar of transformation is completed in THIRD_STOP,
Progress is presented in FOURTH_START, round progress bar,
Presentation progress is completed in FOURTH_STOP,
FIFTH_START, the round rectangle that round progress bar Transition Zone is checked the number,
FIFTH_STOP, the round rectangle that round rectangle button Transition Zone is checked the number.
Based on the above technical solution, in method onClick, pass through the variable of Boolean data type
MCanClick judges whether to click, and after clicking primary, then mCanClick is set as to click,
Control is repainted by the method invalidate in the View class of android system offer.
The content being not described in detail in this specification belongs to the prior art well known to professional and technical personnel in the field.
Claims (6)
1. a kind of implementation method for the interactive button for prompting network load progress, which comprises the steps of:
The interactive button class SubmitView of customized prompt network load progress, for drawing button and net being presented in button
Network load process and as a result,
The process of network load is used to that submission state to be presented to user,
The result of network load, which is used to present to user, submits result;
Set paintbrush paint class and color;
It sets different submission states and submits the corresponding prompt text of result;
The rendering parameter for setting the button of default, includes at least:
Background,
The wide high level of control,
The chamfer angle of control;
Following variable is defined, for the interaction response of control button:
Variable mCanClick, for the click event of control button,
Defined variable mIfReset, for the resetting event of control button;
OnLayout method is rewritten, the wide high level of control is obtained, calculates the chamfer angle of control, obtain the width of paintbrush;
Defining interface, for monitoring the operation after readjustment loads successfully, and for monitoring the process that readjustment starts load;
Round rectangle button is presented for drawing the state of initial control in definition method drawInit;
Round progress bar is presented for changing the color of background and font in definition method drawFirst;
Definition method onClick, for handling click event;
Definition method drawCorrectSign is presented for drawing the state for successfully submitting control with the round rectangle checked the number;
OnDraw method is rewritten, according to current different status indicator graphing.
2. the implementation method of the interactive button of prompt network load progress as described in claim 1, it is characterised in that: button
Rendering parameter further include:
Frame inset spacing, for controlling the gap of text and frame,
When rewriteeing onLayout method, the wide high level of control subtracts frame inset spacing, the as width and height of content area.
3. the implementation method of the interactive button of prompt network load progress as described in claim 1, it is characterised in that: definition piece
AniState is lifted, for the interaction mode of control button, enumerated value includes:
INIT, original state,
FIRST_START, background and font color start to change,
FIRST_STOP, background and font color change terminate,
SECOND_START, font size start to change,
SECOND_STOP, font size change terminate,
THIRD_START, round rectangle button change round progress bar,
The round progress bar of transformation is completed in THIRD_STOP,
Progress is presented in FOURTH_START, round progress bar,
Presentation progress is completed in FOURTH_STOP,
FIFTH_START, the round rectangle that round progress bar Transition Zone is checked the number,
FIFTH_STOP, the round rectangle that round rectangle button Transition Zone is checked the number.
4. the implementation method of the interactive button of prompt network load progress as described in claim 1, it is characterised in that: in method
In onClick, by the variable mCanClick of Boolean data type, judge whether to click, after clicking primary, then
MCanClick is set as to click,
Control is repainted by the method invalidate in the View class of android system offer.
5. the implementation method of the interactive button of prompt network load progress as described in claim 1, it is characterised in that: described fixed
Adopted interface specifically includes:
Defining interface OnProgressDone and abstract method progressDown therein, for monitor readjustment load successfully after
Operation,
Defining interface OnProgressStart and abstract method progressStart therein, starts to load for monitoring readjustment
Process.
6. the implementation method of the interactive button of prompt network load progress as described in claim 1, it is characterised in that: described
According to current different status indicator graphing, specifically include:
Original state draws round rectangle button, and the text that prompt is clicked is presented in button,
Network stress state draws round progress bar, the process of network load is presented,
Success status is submitted, is drawn with the round rectangle checked the number, is presented and check the number in round rectangle, submit successfully.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810821833.2A CN109117222B (en) | 2018-07-24 | 2018-07-24 | Method for realizing interactive button for prompting network loading progress |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810821833.2A CN109117222B (en) | 2018-07-24 | 2018-07-24 | Method for realizing interactive button for prompting network loading progress |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109117222A true CN109117222A (en) | 2019-01-01 |
CN109117222B CN109117222B (en) | 2021-07-16 |
Family
ID=64863305
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810821833.2A Active CN109117222B (en) | 2018-07-24 | 2018-07-24 | Method for realizing interactive button for prompting network loading progress |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109117222B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111078220A (en) * | 2019-12-19 | 2020-04-28 | 浪潮云信息技术有限公司 | Method and system for implementing front-end state change management |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020156799A1 (en) * | 2001-04-24 | 2002-10-24 | Stephen Markel | System and method for verifying and correcting websites |
CN107833260A (en) * | 2017-11-28 | 2018-03-23 | 福建中金在线信息科技有限公司 | The method for drafting and system of animation progress bar |
-
2018
- 2018-07-24 CN CN201810821833.2A patent/CN109117222B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020156799A1 (en) * | 2001-04-24 | 2002-10-24 | Stephen Markel | System and method for verifying and correcting websites |
CN107833260A (en) * | 2017-11-28 | 2018-03-23 | 福建中金在线信息科技有限公司 | The method for drafting and system of animation progress bar |
Non-Patent Citations (1)
Title |
---|
赵薇: "基于用户心智模型的Android系统UI库的研究与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111078220A (en) * | 2019-12-19 | 2020-04-28 | 浪潮云信息技术有限公司 | Method and system for implementing front-end state change management |
CN111078220B (en) * | 2019-12-19 | 2023-04-21 | 浪潮云信息技术股份公司 | Method and system for realizing front-end state change management |
Also Published As
Publication number | Publication date |
---|---|
CN109117222B (en) | 2021-07-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20210216339A1 (en) | Generation of bots based on observed behavior | |
CN113272825A (en) | Reinforcement learning model training by simulation | |
CN109510842B (en) | Method and device for configuring forced access control strategy of industrial control network file | |
CN104881273B (en) | A kind of analysis method and terminal device of webpage rendering | |
CN103914375A (en) | Method and device for testing owner-drawing interface software | |
CN107908793A (en) | The method and system of web page popup window | |
JP2009032187A5 (en) | ||
CN106406851A (en) | Webpage image capture method and system | |
CN104714532A (en) | Quality control method and device | |
CN102521027A (en) | Window interface transmission method in virtual desktop system | |
CN104809663A (en) | Power professional technique service assurance surveillance system and method | |
CN109117222A (en) | A kind of implementation method for the interactive button prompting network load progress | |
CN106161521A (en) | The processing method and processing device of hypertext transfer protocol requests | |
CN112069490B (en) | Method and device for providing applet capability, electronic equipment and storage medium | |
US20210192004A1 (en) | Method and apparatus for processing webpage, device, and storage mediem | |
CN108376369A (en) | Finance and money management Products Show method, equipment, system and storage medium | |
CN108289077B (en) | Method and device for carrying out fuzzy detection analysis on WEB server security | |
CN109117223A (en) | A kind of interactive algorithm for submitting solicited status prompt | |
CN107678815A (en) | A kind of page mask display methods and web page server | |
US11784969B2 (en) | System for securely monitoring and extracting data through a private network | |
CN103870268A (en) | Defining Object Groups in 3D | |
CN109871232A (en) | A kind of method of APP Android new version gray scale publication | |
Ph | Jharko,“ | |
KR102492443B1 (en) | Method for building human-machine interface for scada system and apparatus thereof | |
CN115186216B (en) | Page rendering method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |