CN106980507A - Self-defined retrogressing treating method and apparatus - Google Patents

Self-defined retrogressing treating method and apparatus Download PDF

Info

Publication number
CN106980507A
CN106980507A CN201710211163.8A CN201710211163A CN106980507A CN 106980507 A CN106980507 A CN 106980507A CN 201710211163 A CN201710211163 A CN 201710211163A CN 106980507 A CN106980507 A CN 106980507A
Authority
CN
China
Prior art keywords
retrogressing
interface
rule
current application
application interface
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
CN201710211163.8A
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.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology 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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201710211163.8A priority Critical patent/CN106980507A/en
Publication of CN106980507A publication Critical patent/CN106980507A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

Self-defined retrogressing treating method and apparatus provided in an embodiment of the present invention, applied to Android development field.The self-defined retrogressing processing method includes:Whether the back for monitoring current application interface is triggered, when the back for listening to current application interface is triggered, and obtains the retrogressing rule at the correspondence current application interface.Perform the back operation based on the retrogressing rule.According to the specific demand of user, the default different processing rules for different application interface, when user triggers the back of target interface, default special retreat can be performed according to default program and handles rule, different disposal demand of the user to the back at different interfaces is met, user experience is improved.

Description

Self-defined retrogressing treating method and apparatus
Technical field
The present invention relates to Android development field, in particular to self-defined retrogressing treating method and apparatus.
Background technology
React Native:(abbreviation RN) is the cross-platform Mobile solution exploitation frame that Facebook increases income in April, 2015 Frame, is derivative products of the UI frameworks React that increase income previously of Facebook in primary mobile solution platform, support at present iOS and The large platform of Android two.RN uses Javascript language, and Mobile solution is developed similar to HTML JSX.
It is that back is handled on no mobile phone because React Native give tacit consent in Android platform, so clicking on Back app can directly return to desktop.The design method of current main flow is to monitor back, when clicking on back Wait progress interface and exit operation, return to last layer interface.But this mode can only meet very simple return last layer interface Logical process.Need to do the scene of different operating for back for some interfaces, if according to conventional retrogressing logic Processing, cannot meet the particular/special requirement of user.
The content of the invention
The self-defined retrogressing treating method and apparatus that the present invention is provided, it is intended to improve above mentioned problem.
In a first aspect, a kind of self-defined retrogressing processing method provided in an embodiment of the present invention, applied to mobile terminal Android Application interface in platform.Methods described includes:Whether the back for monitoring current application interface is triggered, listening to When the back for stating current application interface is triggered, the retrogressing rule at the correspondence current application interface is obtained.Execution is based on The back operation of the retrogressing rule.
Second aspect, a kind of self-defined retrogressing processing unit provided in an embodiment of the present invention, applied to mobile terminal Android Application interface in platform.Methods described includes:Triggering state monitoring module, the back for monitoring current application interface Whether it is triggered.Retrogressing rule acquisition module, during for being triggered in the back for listening to the current application interface, is obtained Take the retrogressing rule at the correspondence current application interface.Back operation performing module, for performing based on the retrogressing rule Back operation.
Self-defined retrogressing treating method and apparatus provided in an embodiment of the present invention, applied to answering for mobile terminal Android platform Use interface.Mobile terminal monitors the triggering state of the back at Android platform current application interface, is listening to back When being triggered, the retrogressing rule at current application interface is obtained.Based on acquired retrogressing rule, whether current application interface is judged There is specially treated rule, if performing special retrogressing handling process according to default specially treated rule in the presence of if, if not depositing The conventional retrogressing rule at current application interface is then being performed according to conventional retrogressing rule.According to the specific demand of user, preset For the different processing rules at different interfaces, when user triggers the back of target interface, you can according to default journey Sequence performs default special retreat and handles rule, meets different disposal demand of the user to the back at different interfaces, improves User experience.
Brief description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be attached to what is used required in embodiment Figure is briefly described, it will be appreciated that the following drawings illustrate only certain embodiments of the present invention, therefore is not construed as pair The restriction of scope, for those of ordinary skill in the art, on the premise of not paying creative work, can also be according to this A little accompanying drawings obtain other related accompanying drawings.
Fig. 1 is the self-defined hardware for retreating the mobile terminal that treating method and apparatus is applied provided in an embodiment of the present invention Structure chart;
Fig. 2 is the step flow chart for the self-defined retrogressing processing method that first embodiment of the invention is provided;
Fig. 3 is the step flow chart for the self-defined retrogressing processing method that second embodiment of the invention is provided;
Fig. 4 is the functional block diagram for the self-defined retrogressing processing unit that third embodiment of the invention is provided.
Embodiment
In consideration of it, the designer of the present invention is by long-term exploration and trial, and multiple experiment and effort, constantly Reform and innovation, draw the self-defined retrogressing treating method and apparatus shown in this programme and apply response method and device.
As shown in figure 1, being the mobile end that self-defined retrogressing treating method and apparatus provided in an embodiment of the present invention is applied The block diagram at end 100.The mobile terminal 1 00 includes self-defined retrogressing processing unit 101, memory 102, storage control Device 103, processor 104, Peripheral Interface 105, input-output unit 106, display unit 107.
It is the memory 102, storage control 103, processor 104, Peripheral Interface 105, input-output unit 106, aobvious Show unit 107, each element is directly or indirectly electrically connected with each other, to realize the transmission or interaction of data.For example, these Element can be realized by one or more communication bus or signal wire be electrically connected with each other.Self-defined retreat handles dress Put 101 include at least one can be stored in the memory or be solidificated in the form of software or firmware (firmware) it is described Software function module in the operating system (operating system, OS) of mobile terminal 1 00.The processor 104 is used for Perform the executable module stored in memory 102, such as the software function mould that described self-defined retrogressing processing unit 101 includes Block or computer program.
Wherein, memory 102 may be, but not limited to, random access memory (Random Access Memory, RAM), read-only storage (Read Only Memory, ROM), programmable read only memory (Programmable Read- Only Memory, PROM), erasable read-only memory (Erasable Programmable Read-Only Memory, EPROM), electricallyerasable ROM (EEROM) (Electric Erasable Programmable Read-Only Memory, EEPROM) etc..Wherein, memory 102 is used for storage program, and the processor 104 is performed described after execute instruction is received Program, the method performed by mobile terminal 1 01 that the process that foregoing any embodiment of the embodiment of the present invention is disclosed is defined can be answered Realized in processor 104, or by processor 104.
Processor 104 is probably a kind of IC chip, the disposal ability with signal.Above-mentioned processor can be General processor, including central processing unit (Central Processing Unit, abbreviation CPU), network processing unit (Network Processor, abbreviation NP) etc.;Can also be digital signal processor (DSP), it is application specific integrated circuit (ASIC), ready-made programmable Gate array (FPGA) or other PLDs, discrete gate or transistor logic, discrete hardware components.Can be with Realize or perform disclosed each method, step and the logic diagram in the embodiment of the present invention.General processor 104 can be micro- Processor or the processor can also be any conventional processors etc..
Various input-output units 106 are coupled to processor 104 and memory 102 by the Peripheral Interface 105.One In a little embodiments, Peripheral Interface, processor and storage control can be realized in one single chip.In some other example In, they can be realized by independent chip respectively.
Input-output unit 106 is used to be supplied to user input data to realize interacting for user and data collection station.Institute State input-output unit may be, but not limited to, mouse and keyboard etc..
Display unit 107 provides an interactive interface between the mobile terminal and user, such as user interface, Or referred to for display image data to user.In the present embodiment, the display unit can be liquid crystal display or touch-control Display.If touch control display, it can be support single-point and the capacitance type touch control screen or electric resistance touch-control of multi-point touch operation Screen etc..Support single-point and multi-point touch operation refer to that touch control display can be sensed one or more on the touch control display The touch control operation produced simultaneously at position, and transfer to processor to be calculated and handled the touch control operation that this is sensed.
Fig. 2 is referred to, the step flow chart of the self-defined retrogressing processing method provided for first embodiment of the invention, application In mobile terminal 1 00, the processing for the application interface back of the Android platform of self-defined setting mobile terminal 1 00 is patrolled Volume.Specific explanations will be carried out to the step shown in Fig. 2 below.
Whether step S201, the back for monitoring current application interface is triggered.
By way of the triggering state of back of the mobile terminal monitoring Android platform, specific interface is realized Self-defined processing operation, especially the RN interfaces of retreating handles operation in the self-defined retrogressing of Android platform.The mobile terminal prison The triggering state of the back at the current application interface of the Android platform is listened, the retrogressing on the current application interface is monitored Whether button is triggered, and whether the back of especially some target interfaces for needing the special self-defined retrogressing of progress to handle It is triggered.
Step S202, when the back for listening to the current application interface is triggered, obtains correspondence described current The retrogressing rule of application interface.
The oracle listener of back is added in the navigation interface of the Android platform, current application interface is being listened to The triggering state of back changes, and when the back at as described current application interface is triggered, obtains the current application The retrogressing rule at interface, the retrogressing rule is used to indicate the back operation indicated by the back at current application interface. In a kind of embodiment, back operation can include routine operation and special operational, and the routine operation can include:It is retracted into The desktop of system or last layer interface, the special operational can for minimize current application interface, return to list interface, it is hidden Hide current application interface etc..Back operation type and concrete operations corresponding to different interfaces can be different.
Step S203, performs the back operation based on the retrogressing rule.
When the back for listening to current application interface is triggered, the retrogressing rule of the current application interface is obtained, And perform the acquired corresponding back operation of retrogressing rule.If current application interface needs to carry out special retrogressing processing Target interface, then the retrogressing rule of the target interface is regular, it is necessary to based on the customized processing rule for customized processing Corresponding back operation is performed, the special back operation can be minimum current application interface etc..If current application Interface is not need the special conventional interface for retreating processing, then the retrogressing rule of the conventional interface is conventional retrogressing processing rule Then, it is necessary to carry out conventional retrogressing processing operation, the conventional retrogressing processing operation can be to retract main interface, return to upper one The routine operations such as layer.
On the basis of above-described embodiment, the interface of the Android platform is React Native interfaces.Above-mentioned step, When the back for listening to the current application interface is triggered, the retrogressing rule at the correspondence current application interface are obtained Then, its embodiment can be:
The triggering state of the back at the React Native interfaces is monitored, touching for the back is being monitored Control state is whether when having triggered, it is target interface to judge current application interface.Wherein, the target interface is to preset , it is necessary to carry out it is self-defined retreat processing interface.Whether be target interface, as judge currently should if judging current application interface Whether needed to carry out special retrogressing processing operation with the back at interface.
If current application interface is target interface, the retrogressing rule at the correspondence current application interface is obtained;
If the current application interface is not target interface, conventional retreat at the React Native interfaces is advised Then as the retrogressing rule at current application interface.
The self-defined retrogressing processing method that above-mentioned the present embodiment is provided, without being respectively provided with retrogressing rule for each interface, Only need to set the retrogressing rule for needing to carry out the special target interface for retreating processing, it is not necessary to set and retreat the interface handled only The conventional retrogressing rule of Auto-matching is needed, program is saved and resource is set, the setting efficiency and operation for improving Android system are imitated Rate.
In the above-described embodiments, whether judge current application interface is that the mode of target interface can be:
The interface routing object at the current application interface is obtained, according to the interface at current application interface route pair As judging whether self-defined retrogressing function.
If there is self-defined retrogressing function in the interface routing object at the current application interface, judge described current Application interface is target interface;
If self-defined retrogressing function is not present in the interface routing object at the current application interface, described work as is judged Preceding application interface is not target interface.
In needing to carry out the retrogressing logic of target interface of specially treated, the interface route pair at current application interface is obtained As the self-defined retrogressing function of the self-defined back operation at write-in correspondence current application interface.Needing to judge current application circle Whether face is when needing special self-defined retrogressing processing, to obtain the interface routing object of the target interface, judge acquired The interface routing object whether there is self-defined retrogressing function, and then be inferred to whether current application interface is target circle Face.In one embodiment, the self-defined function that retreats being used for for each self-defined setting of target interface of correspondence The function of retrogressing processing is indicated, then the self-defined retrogressing function at different interfaces is different, each self-defined function that retreats is with currently should It is corresponding with the default self-defined retrogressing processing operation in interface.In other embodiments, the self-defined retrogressing function can be with For indicating current application interface to need target interface to be processed, the special retrogressing processing behaviour carried out required for it is not indicated that The particular content of work.In the case, the self-defined retrogressing function at different interfaces can be identical, be served only for judging currently should Whether it is target interface with interface.And after target interface is determined as, after each target interface of correspondence is obtained according to flow Move back rule.
The self-defined retrogressing processing method that the embodiments of the present invention are provided, mobile terminal is monitored behind Android platform interface The triggering state of button is moved back, when listening to back and being triggered, the retrogressing rule at current application interface is obtained.Based on being obtained The retrogressing rule taken, judge current application interface with the presence or absence of specially treated rule, if in the presence of if according to default specially treated Rule performs special retrogressing handling process, if the routine for performing current application interface according to conventional retrogressing rule in the absence of if Retrogressing rule.According to the specific demand of user, the different processing rules for different application interface are preset, mesh is triggered in user Demarcate face back when, you can according to default program perform it is default it is special retreat processing rule, meet user to not With the different disposal demand of the back at interface, user experience is improved.
Fig. 3 is referred to, the step flow chart of the self-defined retrogressing processing method provided for second embodiment of the invention.Upper State on the basis of embodiment, the embodiment of the present invention is also additionally arranged the setting up procedure of self-defined back operation.Below in conjunction with Fig. 3, The self-defined program setting up procedure for retreating processing method provided in an embodiment of the present invention is specifically described.
Step S301, manages the React Native interfaces by navigation controls and redirects.
The self-defined retrogressing processing unit manages the React Native interfaces by navigation controls, and adds retrogressing Button monitors module.First, the React Native interfaces are managed by navigation controls so that the React Redirecting with controllability between Native interfaces.Realize that the process for redirecting control between the React Native interfaces can With including:The interface to be placed for including the navigation controls is searched, the loading caller and note at the interface to be placed is reset Sell caller to reset the loading caller at the interface to be placed and nullify caller, that is, reset React Native circle The life cycle in face.
Step S302, adds back oracle listener.
After the life cycle that the React Native interfaces are reset according to above-mentioned steps, added in caller is reset Back oracle listener.The loading caller that React Native interfaces are called when firm loading is completed is obtained, described Back is added in the loading caller at interface to be placed and monitors startup program.Obtain the React Native interfaces note The cancellation caller called during pin, back is added in the cancellation caller at the interface to be placed and monitors cancellation journey Sequence, that is, realize the setting of back oracle listener.
In one embodiment, Navigator navigation controls are quoted, the React Native interfaces are managed so that Redirecting between the React Native interfaces is controllable.Rewritten in comprising Navigator controls ComponentWillMount () and componentWillUnmount () method.Wherein, the componentWillMount It is the setting function of the life cycle at React Native interfaces with componentWillUnmount, it is described ComponentWillMount be when interface control has just loaded the loading call function called when completion, it is described ComponentWillUnmount is the cancellation call function called when interface is nullified.
The monitoring setting up procedure of back is as follows:Added in componentWillMount BackAndroid.addEventListener (' hardwareBackPress ',
This.onBackPress) increase back is monitored, and is added in componentWillUnmount BackAndroid.removeEventListener (' hardWareBackPress ', this.onBackPress), which is nullified, to be retreated Button is monitored.Wherein, addEventListener is the method for adding snoop-operations, and hardwareBackPress is to monitor letter Several marks, this.onBackPress is the method specifically performed when back is clicked, RemoveEventListener is to nullify monitor method, by monitoring the mark of function, i.e. hardwareBackPress, is nullified Fall the monitoring registered before.It is to add in the start-stop call function for may be implemented in the React Native interfaces by said process Plus back oracle listener.
Step S303, sets the retrogressing rule of at least one target interface of correspondence.
The call function at the React Native interfaces is reset according to above-mentioned steps, increases the snoop-operations of back Afterwards, set to the retrogressing rule in requisition for the target interface for carrying out special retrogressing processing operation.The target interface can be many It is individual, set each target interface can corresponding retrogressing rule, several target interfaces can also share one and retreat rule Then.
In one embodiment, realized in onBackPress methods after this.navigator.pop (), Ke Yi The method for increasing by one layer of customized processing function handleBack in pop () method allows different target interfaces to perform difference Back back operation.Const handleBack=top.handleBack, wherein top is set to represent last layer circle The interface routing object that face is returned, top.handleBack represents the handleBack functions at last layer interface, can be construed to The self-defined retrogressing function that the embodiment of the present invention is set.If (handle) { return handleBack } is added, handle is judged It whether there is, that is, judge that the handleBack functions at last layer interface whether there is particular content, and then judge last layer Whether interface is the target interface for needing to carry out specially treated.If it does, it is concluded that being that current application interface is target Interface, returns to this handleBack processing logic, that is, handle for the Reverse keys of specific interface.If do not deposited , it is possible to it is not target interface to be inferred as current application interface, it is not necessary to special back operation.It can continue executing with This.navigator.pop (), that is, back operation processing in the usual way.Usually, the retrogressing behaviour of usual manner Deal with to return to last layer interface.
Step S304, the corresponding target interface is added to by the retrogressing rule.
According to above-mentioned steps, after adding hanleBack methods after back monitoring, handleBack is passed through Navigator is delivered to each interface of React Native.Its implementation process can be:Generation is added in Navigator controls Code < Component navigator={ navigator } handleBack={ handleBack }/>.Navigator is used for Navigator is delivered to next bed boundary, next bed boundary is redirected by navigator come operation interface, handleBack It is that customized retreat handles function, for handling specific retrogressing logic.
Set according to above-mentioned steps after the processing mode of self-defined retrogressing rule of the Android platform, in application process In, each interface gets correspondence hanleBack, carries out different disposal when listening to back and being triggered.Needing place Reason retreats the interface of processing, by being added in componentDidMount functions This.props.navigator.getCurrentRoutes () obtains current navigator all routes, passes through let Top=routers [routers.length-1] obtains current route, top.handleBack=this.handleBack. The handleBack currently routeing is set to the handleBack functions at current application interface, so will in main interface before Judgement, which obtains current application interface, handleBack.When listening to back, processing current application interface HandleBack functions.According to the handleBack functions at current application interface, default Reverse keys logic is handled.
For example, in a kind of some broadcast interface of application program, the conventional treatment of the back of the broadcast interface is operated Can be room list interface to be returned directly to last layer interface.But in actual applications, the back of user's request Corresponding processing operation is returns to room interface, and room interface is same interface with currently playing interface, is equal to room circle The played in full screen in face is shown.Therefore, user expects the processing logic of the back at the currently playing interface set to exit entirely Screen is played.During pre-setting, currently playing interface is set to the target interface for needing to carry out specially treated, the target The retrogressing rule at interface is to exit played in full screen.Correspondingly, in use, the retrogressing at the currently playing interface of user's triggering is pressed Button, you can that realizes current application interface exits full frame operation, that is, be switched to the desired room interface of user.
The self-defined retrogressing processing method that the embodiments of the present invention are provided, sets up the setting of self-defined fallback function Journey.By redirecting between navigation controls administration interface, the snoop-operations of back are set up, and for needing special retreat to grasp The target interface of work sets corresponding retrogressing rule, and the trigger action of the back of target interface is monitored in use When, you can realize the specific retrogressing logic of the target interface.The autgmentability of code is improved, after realizing between the different interfaces of processing Move back button logic.
Fig. 4 is referred to, the functional block diagram of the self-defined retrogressing processing unit 400 provided for third embodiment of the invention, The self-defined processing unit 400 that retreats is applied to the application interface in mobile terminal Android platform.The embodiment of the present invention is provided Self-defined retrogressing processing unit 400 can with above-described embodiment provide self-defined retrogressing processing unit 101.It is described self-defined Retreating processing unit includes:Trigger monitoring module 401, retrogressing rule acquisition module 402 and back operation performing module 403.
Whether triggering state monitoring module 401, the back for monitoring current application interface is triggered;
Retrogressing rule acquisition module 402, during for being triggered in the back for listening to the current application interface, is obtained Take the retrogressing rule at the correspondence current application interface;
Back operation performing module 403, for performing the back operation based on the retrogressing rule.
On the basis of above-described embodiment, the current application interface is React Native interfaces, the retrogressing rule Acquisition module 402 is used for:
Whether judge the current application interface is target interface;
If so, then obtaining the retrogressing rule at the correspondence current application interface;
If it is not, then using the conventional retrogressing rule at the React Native interfaces as the current application interface retrogressing Rule.
On the basis of above-described embodiment, the self-defined retrogressing processing unit 400 also includes retrogressing rule setup module 404, the retrogressing rule setup module 404 is used for:
The React Native interfaces are managed by navigation controls to redirect;
Add back oracle listener;
The retrogressing rule for corresponding at least one target interface is set, wherein, the retrogressing rule is used to indicate the target Back operation corresponding to the back at interface;
The retrogressing rule is added to the corresponding target interface.
In summary, self-defined retrogressing processing unit provided in an embodiment of the present invention, mobile terminal monitors Android platform circle The triggering state of the back in face, when listening to back and being triggered, obtains the retrogressing rule at current application interface.Base In acquired retrogressing rule, judge current application interface with the presence or absence of specially treated rule, if in the presence of if according to default spy Different processing rule performs special retrogressing handling process, if performing current application interface according to conventional retrogressing rule in the absence of if Conventional retrogressing rule.According to the specific demand of user, the different processing rules for different interfaces are preset, in user's triggering During the back of target interface, you can perform default special retreat according to default program and handle rule, meet user couple The different disposal demand of the back at different interfaces, improves user experience.It is provided in an embodiment of the present invention it is self-defined after The specific implementation process for moving back processing unit refers to above method embodiment, and this is no longer going to repeat them.
The preferred embodiments of the present invention are these are only, the limitation present invention are not used in, for those skilled in the art For, there can be various modifications and variations.Within the spirit and principles of the invention, any modification for being made, equivalent substitution, Improve etc., it should be included in the scope of the protection.

Claims (10)

1. a kind of self-defined retrogressing processing method, it is characterised in that applied to the application interface in mobile terminal Android platform, institute The method of stating includes:
Whether the back for monitoring current application interface is triggered;
When the back for listening to the current application interface is triggered, the retrogressing at the correspondence current application interface is obtained Rule;
Perform the back operation based on the retrogressing rule.
2. according to the method described in claim 1, it is characterised in that the current application interface is React Native interfaces, When the back for listening to the current application interface is triggered, the retrogressing rule at the correspondence current application interface is obtained The step of include:
Whether judge current application interface is target interface;
If so, then obtaining the retrogressing rule at the correspondence current application interface;
If it is not, then the retrogressing at the conventional retrogressing rule at the React Native interfaces as the current application interface is advised Then.
3. method according to claim 2, it is characterised in that whether judge the current application interface is target interface Step includes:
Obtain the interface routing object at the current application interface;
According to the interface routing object at the current application interface, judge whether self-defined retrogressing function, wherein, it is described from Definition retreats the function that is used to indicate retreat processing of the function for each self-defined setting of target interface of correspondence;
If so, then judging that the current application interface is target interface;
If it is not, then judging that the current application interface is not target interface.
4. method according to claim 2, it is characterised in that whether the back for monitoring current application interface is triggered Before, methods described also includes:
The React Native interfaces are managed by navigation controls to redirect;
Add back oracle listener;
The retrogressing rule for corresponding at least one target interface is set, wherein, the retrogressing rule is used to indicate the target interface Back corresponding to back operation;
The retrogressing rule is added to the corresponding target interface.
5. method according to claim 4, it is characterised in that manage React Native interfaces by navigation controls and jump Turn, the step of addition back supervises program includes:
Search the interface to be placed for including the navigation controls;
Reset the loading caller at the interface to be placed and nullify caller;
Back is added in the loading caller at the interface to be placed and monitors startup program;
Back is added in the cancellation caller at the interface to be placed and monitors deregistration procedure.
6. according to the method described in claim 1, it is characterised in that the step of performing the back operation based on the retrogressing rule Including:
Perform the current application interface exits full frame operation.
7. method according to claim 2, it is characterised in that by the conventional retrogressing rule at the React Native interfaces As the current application interface retrogressing rule the step of include:
The retrogressing rule at last layer interface will be returned as the retrogressing rule at current application interface.
8. a kind of self-defined retrogressing processing unit, it is characterised in that applied to the application interface in mobile terminal Android platform, institute Stating self-defined retrogressing processing unit includes:
Monitoring module is triggered, whether the back for monitoring current application interface is triggered;
Retrogressing rule acquisition module, during for being triggered in the back for listening to the current application interface, obtains correspondence The retrogressing rule at the current application interface;
Back operation performing module, for performing the back operation based on the retrogressing rule.
9. device according to claim 8, it is characterised in that the current application interface is React Native interfaces, The retrogressing rule acquisition module is used for:
Whether judge the current application interface is target interface;
If so, then obtaining the retrogressing rule at the correspondence current application interface;
If it is not, then the retrogressing at the conventional retrogressing rule at the React Native interfaces as the current application interface is advised Then.
10. device according to claim 9, it is characterised in that the self-defined retrogressing processing unit also includes retreating rule Then setup module, the retrogressing rule setup module is used for:
The React Native interfaces are managed by navigation controls to redirect;
Add back oracle listener;
The retrogressing rule for corresponding at least one target interface is set, wherein, the retrogressing rule is used to indicate the target interface Back corresponding to back operation;
The retrogressing rule is added to the corresponding target interface.
CN201710211163.8A 2017-03-31 2017-03-31 Self-defined retrogressing treating method and apparatus Pending CN106980507A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710211163.8A CN106980507A (en) 2017-03-31 2017-03-31 Self-defined retrogressing treating method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710211163.8A CN106980507A (en) 2017-03-31 2017-03-31 Self-defined retrogressing treating method and apparatus

Publications (1)

Publication Number Publication Date
CN106980507A true CN106980507A (en) 2017-07-25

Family

ID=59343650

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710211163.8A Pending CN106980507A (en) 2017-03-31 2017-03-31 Self-defined retrogressing treating method and apparatus

Country Status (1)

Country Link
CN (1) CN106980507A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110968226A (en) * 2018-09-30 2020-04-07 北京奇虎科技有限公司 Navigation bar control method and device, mobile terminal and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104850406A (en) * 2015-05-26 2015-08-19 广州华多网络科技有限公司 Page switching method and device
CN106021549A (en) * 2016-05-27 2016-10-12 青岛海信传媒网络技术有限公司 Page control method and device of web application program and terminal device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104850406A (en) * 2015-05-26 2015-08-19 广州华多网络科技有限公司 Page switching method and device
CN106021549A (en) * 2016-05-27 2016-10-12 青岛海信传媒网络技术有限公司 Page control method and device of web application program and terminal device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
TDZL2003 等: "《安卓Back键的处理•基本+高级篇》", 《HTTP://BBS.REACTNATIVE.CN/TOPIC/480/安卓BACK键的处理-基本-高级篇》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110968226A (en) * 2018-09-30 2020-04-07 北京奇虎科技有限公司 Navigation bar control method and device, mobile terminal and storage medium

Similar Documents

Publication Publication Date Title
RU2605919C2 (en) Method and apparatus for displaying push messages
CN106970735B (en) Information processing method and electronic equipment
CN104881313B (en) Method and device for starting functions in terminal application
CN106951335B (en) Process daemon method and mobile terminal
CN110333918B (en) Method and equipment for managing boarder programs
CN103793176A (en) Method and device for fast switching between application programs
WO2018119905A1 (en) Control method and control device for multisystem mobile terminal, and electronic device
CN105630497A (en) Switching method and switching device of application program
CN107832113A (en) A kind of interface display method and device of android system application program
CN111708471B (en) Control processing method and related device
WO2014183295A1 (en) Device control method and touch apparatus
CN107220052A (en) The application process and device of a kind of basic input output system
CN113568534A (en) Application icon display method and device and electronic equipment
CN106528163A (en) Page switching method and device
CN109542320B (en) Display method, terminal and computer storage medium
CN114124697A (en) Network switching method, network switching device and storage medium
CN106980507A (en) Self-defined retrogressing treating method and apparatus
JP6317433B2 (en) Interface function analysis and display method, apparatus, and computer storage medium
CN105740012A (en) Method for updating BIOS (Basic Input Output System) program of computer
CN107291235B (en) Control method and device
CN104219385B (en) A kind of keypress function control method
CN104461354B (en) A kind of terminal
CN104881222B (en) Man-machine interaction method and device
CN112905072B (en) Application processing method and device and electronic equipment
CN107015874B (en) Data transmission control method, device and terminal

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: 20170725