CN107092481A - A kind of session prompting frame realization method and system for network interaction - Google Patents
A kind of session prompting frame realization method and system for network interaction Download PDFInfo
- Publication number
- CN107092481A CN107092481A CN201710178872.0A CN201710178872A CN107092481A CN 107092481 A CN107092481 A CN 107092481A CN 201710178872 A CN201710178872 A CN 201710178872A CN 107092481 A CN107092481 A CN 107092481A
- Authority
- CN
- China
- Prior art keywords
- prompting frame
- word
- session
- topology file
- control
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The invention discloses a kind of session prompting frame realization method and system for network interaction, it is related to network interaction prompting frame field.Steps of the method are:Session prompting frame topology file is created, picture presentation layer, word presentation layer and dialog events trigger layer are added to session prompting frame topology file;Picture presentation control is provided with picture presentation layer;Session prompting frame topology file is loaded, the click event and response events of control button control, the flow of the click event of control button control is:Prompting frame topology file after the ID in button space and loading is bound.The present invention is while the functional diversities of session prompting frame are caused, the establishment process of session prompting frame is fairly simple, can not only be multiplexed, and life cycle is longer, and then has been obviously improved Consumer's Experience, is very suitable for promoting.
Description
Technical field
The present invention relates to network interaction prompting frame field, and in particular to a kind of session prompting frame for network interaction is realized
Method and system.
Background technology
Function session prompting frame in existing APP applications is used to guide user to go (for example to supplement work(with money using corresponding function
Energy prompting frame prompting user is supplemented with money), existing function session prompting frame is typically created using Dialog, creates function session
Need to input substantial amounts of code during prompting frame, establishment process is more complicated, and the code of input is difficult to be multiplexed, and then cause work(
The effect of energy session prompting frame is relatively simple, and life cycle is shorter.
The content of the invention
For defect present in prior art, present invention solves the technical problem that being:How to be created that functional diversities,
The session prompting frame that can be multiplexed.
To achieve the above objectives, provided by the present invention for the session prompting frame implementation method of network interaction, including it is following
Step:
Step A:Session prompting frame topology file is created, picture presentation layer, word are added to session prompting frame topology file
Presentation layer and dialog events trigger layer;Picture presentation control is provided with picture presentation layer, picture presentation control is used to show extremely
Few 1 width picture;Word presentation layer includes being provided with text control, text at least 1 layer word displaying sublayer, word displaying sublayer
Control is used to show at least five character, and the size of all characters of word displaying sublayer displaying is identical with color;Dialog events are touched
Button control is provided with hair layer, triggering session event when button control is used to click on button goes to step B;
Step B:Session prompting frame topology file is loaded, the click event and response events of control button control,
The flow of the click event of control button control is:Prompting frame topology file after the ID in button space and loading is tied up
It is fixed.
System, including topology file creation module and cloth are realized provided by the present invention for the session prompting frame of network interaction
Module is monitored in office file loading;
Topology file creation module is used for:Session prompting frame topology file is created, session prompting frame topology file is added
Picture presentation layer, word presentation layer and dialog events trigger layer;Picture presentation control, picture presentation are provided with picture presentation layer
Control is used to show at least 1 width picture;Word presentation layer includes setting at least 1 layer word displaying sublayer, word displaying sublayer
There is text control, text control is used to show at least five character, the size and color of all characters of word displaying sublayer displaying
It is identical;Button control, triggering session event when button control is used to click on button, to layout are provided with dialog events trigger layer
File loading monitors module and sends topology file loading monitoring signal;
Module is monitored in topology file loading to be used for:Receive after topology file loading monitoring signal, it will words prompting frame layout
File is loaded, the click event and response events of control button control, and the flow of the click event of control button control is:
Prompting frame topology file after the ID in button space and loading is bound.
Compared with prior art, the advantage of the invention is that:
(1) it can be seen from step A, session prompting frame of the invention includes picture presentation layer and word presentation layer, photo exhibition
Show the word in the picture and word presentation layer of layer, self-defined setting can be carried out according to the function of different sessions prompting frame,
And then while the functional diversities of session prompting frame are caused, the establishment process of session prompting frame is fairly simple, additionally it is possible to multiple
With, be very suitable for promote.
At the same time, when the function of session prompting frame changes, it is only necessary to which the session for instantiating the present invention again is carried
Show that frame can add the word and picture after changing, therefore, life cycle of the invention is longer.
(2) it can be seen from step A, word, picture and trigger button in session prompting frame of the invention are single
Logic, and then cause the clear layer of session prompting frame.On this basis, for reasonable and attractive in appearance displaying session prompting frame cloth
Office file, it is ensured that the reading logic of session prompting frame topology file, picture presentation layer of the present invention, the first word presentation layer a, second
Word presentation layer b and dialog events trigger layer, are arranged according to order from top to bottom, and then cause user to consult prompting frame layout
During file, viewing picture that can be from top to bottom, word, session trigger button, viewing logic is is understanding picture and word
Information after, then decide whether click on session trigger button;Above-mentioned put in order has been obviously improved Consumer's Experience.
Brief description of the drawings
Fig. 1 be the embodiment of the present invention in be used for network interaction session prompting frame implementation method flow chart.
Embodiment
The present invention is described in further detail below in conjunction with drawings and Examples.
It is shown in Figure 1, the session prompting frame implementation method for network interaction in the embodiment of the present invention, including it is following
Step:
S1:Session prompting frame topology file is created according to DialogFragment, this document is XML (Extensible
Markup Language, extensible markup language) file, session prompting frame is laid out by LinearLayout linear placements
File addition picture presentation layer, word presentation layer and dialog events trigger layer, go to S2.
ImageView controls (picture presentation control) realization is provided with picture presentation layer, picture presentation control is used to open up
Show at least 1 width picture.
TextView controls (text control) are provided with word presentation layer, text control is used to show character, for reality
Word presentation layer is divided into the first word displaying sublayer a and the second word exhibition by the diversified displaying of existing word, the embodiment of the present invention
Show that sublayer b, a and b are used to show at least five character.In order to ensure the unified layout of word presentation layer, all words of a displayings
The size of symbol is identical with color, and the size of all characters of b displayings is identical with color.In order to be carried out to different literals displaying sublayer
Distinguishing hierarchy, the size and color of the character of a displayings are different from the character that b is shown.
The character (i.e. text attributes) that a is shown in the present embodiment is " hair barrage is too tiredConnect wheat zero distance!", wherein character
Size pass through android:TextSize=" 14sp " attribute is configured, and the color of character passes through android:
TextColor="@color/intro_noble_red " attribute is configured (red).The character of b displayings is " to connect wheat, noble
The size of exclusive privilege ", wherein character passes through android:TextSize=" 12sp " attribute is configured, and the color of character is led to
Cross android:TextColor="@color/text_color_grey " attribute is configured (grey).
Button control (button control) is provided with dialog events trigger layer, button control is used to trigger when clicking on button
Dialog events.In order to which the id of event sniffer and button control is bound, the embodiment of the present invention passes through android:Id="@+
Id/btn_open_noble " sets the id of button control.
For reasonable and attractive in appearance displaying session prompting frame topology file, it is ensured that the reading of session prompting frame topology file is patrolled
Volume, the picture presentation layer of the embodiment of the present invention, the first word presentation layer a, the second word presentation layer b and dialog events trigger layer,
According to order arrangement from top to bottom, and then when make it that user consults prompting frame topology file, viewing picture, text from top to bottom
Word, session trigger button, viewing logic be after the information of picture and word has been understood, then decide whether click on session triggering by
Button.
S2:Because the session prompting frame topology file in S1 does not have a header information, but the session in the embodiment of the present invention
Prompting frame topology file needs to be showed by DialogFragment, and DialogFragment acquiescence shows form is
Show the file for possessing header information, therefore the embodiment of the present invention needs the first row in onCreateView functions, passes through
GetDialog () .requestWindowFeature (Window.FEATURE_NO_TITLE) function, sets session prompting frame
The header information of topology file is sky, i.e., temporarily hide by the header information in DialogFragment, go to S3.
S3:By the LayoutInflater inflate parameters in onCreateView functions, (inflate is a cloth
Office's loader, is responsible for specially loading topology file), it is empty session prompting frame topology file that header information will be set in S2, plus
Installed System Memory is loaded onto, concrete implementation mode is View view=inflater.inflate (R.layout.view_open_
noble).So far, the embodiment of the present invention can be beaten by the view and system relationship of session prompting frame topology file, such system
When opening dialog box, you can open session prompting frame topology file, go to S4.
S4:In order to which the normal button control using in session prompting frame topology file (is such as jumped to when clicking on button
Supplement interface with money), it is necessary to the click event and response events of control button control.
The flow of the click event of control button control is:Pass through Button mBtnOpenNoble=(Button)
FindViewById (R.id.btn_open_noble), the id of button control and session prompting frame topology file are bound;Wherein
What findViewById was returned is an Object object.In order to make Object corresponding with button, the embodiment of the present invention need by
The Object of return is converted into button object, and the button object after conversion is carried out into reference pass using mBtnOpenNoble
Connection.Can be by the monitor in mBtnOpenNoble settings buttons space after association.
The flow of the response events of control button control is:By in mBtnOpenNoble
SetOnClickListener (listener) functions set the response events of mBtnOpenNoble buttons.Listen to response
Need to set a corresponding monitoring function for the response events after event, the embodiment of the present invention is by way of instantiation come real
The above-mentioned listener of exampleization, particular by calling new View.OnClickListener () {@Override public
void onClick(View v){startNoblePurchaseActivity()}}.So far the meeting when button space is clicked
Trigger above-mentioned customized function startNoblePurchaseActivity ().
The function of the function supplements the page with money to start purchase, and starting the function needs the intention object of instantiation system
Intent (class that will start the page is transferred to Intent), calls startActivty methods to be started by Intent.
The intention object Intent of instantiation system concrete mode is:Pass through Intent mIntent=new Intent
(this,NoblePurchaseActivity.class);Mode is instantiated, finally by the object tag of instantiation
For mIntent.
The concrete mode for calling startActivty methods by Intent is:It is delivered to mIntent as parameter
In startActivity functions, so far system can load out purchase and supplement the page with money.
The session prompting frame for network interaction in the embodiment of the present invention realizes that system, including topology file create mould
Module is monitored in block, topology file head setup module and topology file loading.
Topology file creation module is used for:Session prompting frame topology file is created according to DialogFragment, session is carried
It is XML file to show frame topology file;To session prompting frame topology file addition picture presentation layer, word presentation layer and dialog events
Trigger layer;Picture presentation control is provided with picture presentation layer, picture presentation control is used to show at least 1 width picture;Word exhibition
Show and text control is provided with layer, text control is used to show character;Button control, button are provided with dialog events trigger layer
Triggering session event when control is used to click on button, monitors module transmission topology file loading to topology file loading and monitors letter
Number.
The word presentation layer of topology file creation module addition includes the first word and shows sublayer a and the second word displaying
Layer b, a and b are used to show at least five character, and the size of all characters of a displayings is identical with color, all characters of b displayings
Size it is identical with color;The size and color of the character of a displayings are different from the character that b is shown.
Topology file head setup module is used for:After the completion of the work of topology file creation module, session prompting frame is set
The header information of topology file is sky.
Module is monitored in topology file loading to be used for:Receive after topology file loading monitoring signal, it will words prompting frame layout
File is loaded, the click event and response events of control button control, and the flow of the click event of control button control is:
Prompting frame topology file after the ID in button space and loading is bound.
It is so far, of the invention while the functional diversities of session prompting frame are caused by embodiments of the invention,
The establishment process of session prompting frame is fairly simple, additionally it is possible to be multiplexed;And when the function of session prompting frame changes, only need
Again to instantiate the session prompting frame of the present invention can add the word and picture after changing.Therefore the session prompting of the present invention
The life cycle of frame is longer, has been obviously improved Consumer's Experience, is very suitable for promoting.
Further, the present invention is not limited to the above-described embodiments, for those skilled in the art,
Without departing from the principles of the invention, some improvements and modifications can also be made, these improvements and modifications are also considered as the present invention
Protection domain within.The content not being described in detail in this specification belongs to existing skill known to professional and technical personnel in the field
Art.
Claims (10)
1. a kind of session prompting frame implementation method for network interaction, it is characterised in that this method comprises the following steps:
Step A:Session prompting frame topology file is created, picture presentation layer, word are added to session prompting frame topology file and is shown
Layer and dialog events trigger layer;Picture presentation control is provided with picture presentation layer, picture presentation control is used to show at least 1 width
Picture;Word presentation layer includes being provided with text control, text control at least 1 layer word displaying sublayer, word displaying sublayer
For showing at least five character, the size of all characters of word displaying sublayer displaying is identical with color;Dialog events trigger layer
In be provided with button control, triggering session event when button control is used to click on button goes to step B;
Step B:Session prompting frame topology file is loaded, the click event and response events of control button control, monitored
The flow of the click event of button control is:Prompting frame topology file after the ID in button space and loading is bound.
2. it is used for the session prompting frame implementation method of network interaction as claimed in claim 1, it is characterised in that:The word exhibition
Show that layer includes 2 layers of word displaying sublayer:First word shows sublayer and the second word displaying sublayer, the displaying sublayer exhibition of the first word
The size and color of the character shown, show that the character of sublayer displaying is different from the second word.
3. it is used for the session prompting frame implementation method of network interaction as claimed in claim 1 or 2, it is characterised in that:Step A it
It is further comprising the steps of afterwards:It is sky to set the header information of session prompting frame topology file.
4. it is used for the session prompting frame implementation method of network interaction as claimed in claim 1 or 2, it is characterised in that:In step A
The session prompting frame topology file is XML file.
5. it is used for the session prompting frame implementation method of network interaction as claimed in claim 1 or 2, it is characterised in that:In step A
The session prompting frame topology file is created according to DialogFragment.
6. a kind of session prompting frame for network interaction realizes system, it is characterised in that:The system is created including topology file
Module is monitored in module and topology file loading;
Topology file creation module is used for:Session prompting frame topology file is created, picture is added to session prompting frame topology file
Presentation layer, word presentation layer and dialog events trigger layer;Picture presentation control, picture presentation control are provided with picture presentation layer
For showing at least 1 width picture;Word presentation layer includes being provided with text at least 1 layer word displaying sublayer, word displaying sublayer
This control, text control is used to show at least five character, the size and color phase of all characters of word displaying sublayer displaying
Together;Button control, triggering session event when button control is used to click on button, to layout text are provided with dialog events trigger layer
Part loading monitors module and sends topology file loading monitoring signal;
Module is monitored in topology file loading to be used for:Receive after topology file loading monitoring signal, it will words prompting frame topology file
Loaded, the click event and response events of control button control, the flow of the click event of control button control is:Will be by
Prompting frame topology file after the ID in button space and loading is bound.
7. the session prompting frame for network interaction realizes system as claimed in claim 6, it is characterised in that:The layout text
Word presentation layer in part creation module includes 2 layers of word displaying sublayer:First word shows sublayer and the second word displaying
Layer, the size and color of the character of the first word displaying sublayer displaying, shows that the character of sublayer displaying is different from the second word.
8. the session prompting frame for network interaction as claimed in claims 6 or 7 realizes system, it is characterised in that:The system
Also include topology file head setup module, it is used for:After the completion of the work of topology file creation module, session prompting frame is set
The header information of topology file is sky.
9. the session prompting frame for network interaction as claimed in claims 6 or 7 realizes system, it is characterised in that:The cloth
The session prompting frame topology file that office file creation module is created is XML file.
10. the session prompting frame for network interaction as claimed in claims 6 or 7 realizes system, it is characterised in that:The cloth
Office file creation module is created according to DialogFragment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710178872.0A CN107092481A (en) | 2017-03-23 | 2017-03-23 | A kind of session prompting frame realization method and system for network interaction |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710178872.0A CN107092481A (en) | 2017-03-23 | 2017-03-23 | A kind of session prompting frame realization method and system for network interaction |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107092481A true CN107092481A (en) | 2017-08-25 |
Family
ID=59649024
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710178872.0A Pending CN107092481A (en) | 2017-03-23 | 2017-03-23 | A kind of session prompting frame realization method and system for network interaction |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107092481A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107643934A (en) * | 2017-09-29 | 2018-01-30 | 上海爱优威软件开发有限公司 | A kind of application message methods of exhibiting, system and terminal based on message bullet frame |
CN109299424A (en) * | 2018-11-29 | 2019-02-01 | 北京字节跳动网络技术有限公司 | It is a kind of to provide the method, apparatus and computer readable medium of response events based on rich text |
WO2019041669A1 (en) * | 2017-08-31 | 2019-03-07 | 武汉斗鱼网络科技有限公司 | Method for realizing report function in video friend making, storage medium, device and system |
CN112114724A (en) * | 2020-09-28 | 2020-12-22 | 深圳软牛科技有限公司 | Dialog box notification display method, dialog box notification display device, dialog box notification equipment and storage medium |
CN112596829A (en) * | 2020-12-15 | 2021-04-02 | 平安普惠企业管理有限公司 | Lottie-based prompt box generation method and device, electronic equipment and storage medium |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106484509A (en) * | 2016-09-27 | 2017-03-08 | 腾讯科技(深圳)有限公司 | A kind of output intent of pop-up, device and terminal |
-
2017
- 2017-03-23 CN CN201710178872.0A patent/CN107092481A/en active Pending
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106484509A (en) * | 2016-09-27 | 2017-03-08 | 腾讯科技(深圳)有限公司 | A kind of output intent of pop-up, device and terminal |
Non-Patent Citations (2)
Title |
---|
匿名: "DialogFragment详解", 《博客园网站》 * |
匿名: "传统的Dialog对话框", 《CSDN网站》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019041669A1 (en) * | 2017-08-31 | 2019-03-07 | 武汉斗鱼网络科技有限公司 | Method for realizing report function in video friend making, storage medium, device and system |
CN107643934A (en) * | 2017-09-29 | 2018-01-30 | 上海爱优威软件开发有限公司 | A kind of application message methods of exhibiting, system and terminal based on message bullet frame |
CN109299424A (en) * | 2018-11-29 | 2019-02-01 | 北京字节跳动网络技术有限公司 | It is a kind of to provide the method, apparatus and computer readable medium of response events based on rich text |
CN112114724A (en) * | 2020-09-28 | 2020-12-22 | 深圳软牛科技有限公司 | Dialog box notification display method, dialog box notification display device, dialog box notification equipment and storage medium |
CN112596829A (en) * | 2020-12-15 | 2021-04-02 | 平安普惠企业管理有限公司 | Lottie-based prompt box generation method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107092481A (en) | A kind of session prompting frame realization method and system for network interaction | |
CN103176789B (en) | A kind of method and system for realizing open platform Function Extension | |
CN104636139A (en) | Visualized cross-platform mobile application development and generation system | |
CN102156999B (en) | Generation method and device thereof for user interface | |
CN106569801A (en) | Complex parameter-based configuration display control system | |
CN109933760A (en) | List generation method, device, computer equipment and computer readable storage medium | |
WO2010091623A1 (en) | Apparatus and method for dynamically generating application program interface | |
CN110221859A (en) | Deployment online management method, device, equipment and storage medium of application | |
CN102193793B (en) | A kind of method and apparatus realizing software repeated usage | |
CN105446740A (en) | MVVM (Model-View-View Model) architecture based Web front-end presentation system | |
CN108024136A (en) | Load method, smart television and the computer-readable recording medium of user interface | |
CN108984172A (en) | A kind of generation method and device of interface file | |
CN112751692A (en) | Service opening method and device | |
CN107168715A (en) | A kind of intelligent terminal menu subject GUI engine implementation method | |
CN108196764A (en) | Application architecture dispositions method, device, system and cloud platform | |
CN102999305B (en) | Information processor and control method | |
CN106354748A (en) | Webpage generation method and device | |
CN106126244A (en) | A kind of document processing method and device | |
CN108600331A (en) | Interactive interface rendering method, client, terminal and system | |
CN101631262A (en) | VoiceXML business integrated development system and realizing method thereof | |
CN109992227A (en) | User interface display control method, device, terminal and computer storage medium | |
CN109977335A (en) | A kind of Web configuration method towards industrial equipment | |
US6735767B1 (en) | Installation planning window | |
CN101917573B (en) | Implementation method of Widget system and television using the system | |
CN114153442A (en) | Large-screen visualization page configuration method and system based on visualization component |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170825 |