Detailed description of the invention
For making the purpose of the application, technical scheme and advantage clearer, specifically real below in conjunction with the applicationExecute example and technical scheme is clearly and completely described by corresponding accompanying drawing.Obviously, describedEmbodiment is only some embodiments of the present application rather than whole embodiments.Based on the enforcement in the applicationExample, the every other enforcement that those of ordinary skill in the art are obtained under not making creative work premiseExample, broadly falls into the scope of the application protection.
The information that Fig. 1 provides for the embodiment of the present application shows process, and this process specifically includes following steps:
S101, monitoring is for the assigned operation of overlapping region in interface.
Wherein, described overlapping region includes the overlapping region between at least two ScrollView.
Interface described in the embodiment of the present application, includes but not limited to all kinds of containing at least two ScrollViewInterface.This interface can be the operation interface of terminal unit (such as: terminal, mobile terminal etc.),Can also be to operate in the interface (such as: Website page etc.) shown by the types of applications in described terminal unit.Here the restriction to the application it is not intended that.
Described assigned operation, includes but not limited to, rolling operation, zoom operations etc..Certainly, for differenceTerminal unit, the initiation mode of described rolling operation also differs, such as: for having the end of touch screen functionalityFor end equipment, described rolling operation can be that user uses finger contact screen to carry out sliding and the rolling that producesDynamic operation;For having the terminal unit of the input equipments such as mouse, described rolling operation can be userUse the rolling operation that mouse roller sends.
It should be noted that for the monitoring of described assigned operation, can use that terminal unit run isCorresponding monitoring process in system is monitored, it is also possible to by carry in applying accordingly shell script (such as:JavaScript) it is monitored, certainly, is not intended that the restriction to the application here.
S102, when monitoring described assigned operation, determines the performance characteristic of this assigned operation.
Different assigned operations, has different performance characteristices, and in the embodiment of the present application, described appointment is graspedThe performance characteristic made may refer to determine the persistent period of operation, displacement, speed of operation etc..
In the embodiment of the present application, different types of terminal unit is for the determination of the performance characteristic of assigned operationMode is different, specifically, for the terminal unit with touch screen functionality, it is intended that the behaviour of operationMake feature to be determined by the induction apparatus on terminal unit screen;Set for not having the terminal of touch screen functionalityFor Bei, it is intended that the performance characteristic of operation can be by the processor in this terminal unit, according to the behaviour of input equipmentDetermine (such as: processor receives the rolling speed of mouse roller, it is possible to determine rolling operation as stateCorresponding rolling speed).Certainly, for the determination mode of the performance characteristic of assigned operation, it is right to be not intended thatThe restriction of the application.
S103, according to the performance characteristic of described assigned operation, at the ScrollView corresponding to this assigned operationThis assigned operation of middle execution.
In the case of multiple ScrollView carry out nesting, when assigned operation acts on different ScrollViewOverlapping region in time, terminal unit or corresponding application cannot judge that this assigned operation is targetedScrollView.And owing to assigned operation has different performance characteristices, and different performance characteristices will impactDifferent ScrollView performs this assigned operation.Therefore in the embodiment of the present application, will come according to performance characteristicDetermine the ScrollView corresponding to this assigned operation, thus in corresponding ScrollView, perform this appointmentOperation.
Such as: if using the persistent period of rolling operation as performance characteristic, when this rolling operation acts on twoTime in the overlapping region formed in ScrollView, then, just can be according to the persistent period of this rolling operationLength, determine the ScrollView corresponding to this rolling operation, and make this ScrollView determinedThe content loaded rolls.
By above-mentioned steps, when assigned operation acts in the overlapping region of different ScrollView, will reallyThe performance characteristic of this assigned operation fixed, determines corresponding to this assigned operation further according to this performance characteristicScrollView, thus in this ScrollView, perform this assigned operation.So, though userAssigned operation acts on overlapping region, it is also possible to determine this appointment according to the performance characteristic in this assigned operationOperation wanted for ScrollView, be effectively improved the accuracy that assigned operation is responded.
In the embodiment of the present application, different performance characteristices is included due to assigned operation, then, in differenceIn the case of performance characteristic, determine the ScrollView corresponding to performance characteristic, and in this ScrollViewThe mode performing this assigned operation also differs, specifically, below with assigned operation as rolling operation, overlapRegion include a ScrollView and the 2nd ScrollView overlapping region (wherein, this secondScrollView is nested in a ScrollView) situation be specifically described:
Mode one
When user sends rolling operation on the terminal unit with touch screen functionality, each rolling operation contactsThe time of screen may differ, that is, in some cases, sends the position of rolling operation (such as: handsRefer to) can continuous contact screen (finger always fit screen), and in the enterprising line slip of screen, thus driveIn this terminal unit, corresponding interface rolls.And in other cases, send the position of rolling operationOnly carry out the touching of short time with screen, drive corresponding interface in terminal unit to roll.
Visible, in this mode, the performance characteristic of described rolling operation can be: the persistent period.Thus,In above-mentioned steps S102, determine the performance characteristic of this assigned operation, particularly as follows: record rolling operation is in instituteState the persistent period of overlapping region.
Rolling operation acts on the persistent period in this overlapping region, will start meter when this rolling operation triggersCalculate, and continue to this rolling operation to terminate, therefore record rolling operation is in the persistent period of described overlapping region,Namely record this rolling operation triggering moment in described overlapping region, and during the stopping of this rolling operationCarve, and determine the described time interval triggered between the moment to stop timing, then, just can be by this timeInterval is defined as the persistent period of this rolling operation.
It is nested in the scene in a ScrollView at the 2nd ScrollView, when rolling operation acts onDuring overlapping region between the oneth ScrollView and the 2nd ScrollView, just can be according to this rolling operationPersistent period determine the ScrollView that this rolling operation is corresponding, that is, judge holding of described rolling operationWhether the continuous time exceedes default standard duration, the most then the 2nd ScrollView performs described rolling and graspsMake, otherwise, then a described ScrollView is performed described rolling operation.This is because: for showingFor the 2nd ScrollView that area is less, the content wherein shown is more fine, and user is in order to clearlyBrowse the information shown in the 2nd ScrollView, generally, the persistent period sending rolling operation is longer.Therefore in the embodiment of the present application, when the persistent period of rolling operation is above standard duration, to secondScrollView performs rolling operation, otherwise, a ScrollView is performed rolling operation.
Certainly, determine that according to the persistent period of rolling operation the mode of the ScrollView of correspondence is not limited to this,In application scenes, it would however also be possible to employ the persistent period be above standard duration time, to a ScrollViewPerform this rolling operation, and during not less than standard duration, the 2nd ScrollView is performed this rolling operationMode, is not intended that the restriction to the application here.
Such as: user carries out rolling operation for Website page shown in panel computer.This Website pageSlide (now, this Website page is a ScrollView) can be carried out, it is assumed that this Website page also containsThere is the comment region (now, this comment region is the 2nd ScrollView) that can carry out rolling.Hands as userRefer to when the rolling operation sent acts in the overlapping region of this comment region and Website page, this panel computerBy triggering moment during record user's finger contacts screen, as the triggering moment of this rolling operation.Work as userThe dislocation of finger joint off screen curtain time, this panel computer also can record the disengaging moment of this finger, as this rolling operationStop timing.Thus the time span between this triggering moment to stop timing is exactly holding of this rolling operationThe continuous time.
It is now assumed that preset standard time a length of 0.3s, and the triggering moment of the contact screen of user's finger is to this handsRefer to that the time span between the stop timing frameed out is 1s, it is thus possible to determine that this rolling operation institute is rightShould comment region in the page, then, this rolling operation that this panel computer can send according to user, rightContent in comment region rolls.
Mode two
For the 2nd ScrollView is nested in the scene in a ScrollView, due to firstThe displaying area of ScrollView and the 2nd ScrollView varies in size, then, receiving same rollingIn the case of operation (such as: the finger of user is mobile same distance on screen), a ScrollViewIn can convert more content, and in the 2nd ScrollView, the content of conversion is less.It is to say, useFamily for the displaying content in the 2nd ScrollView carry out the movement of the rolling operation that rolling view is sent away fromFrom shorter.
Visible, in this mode, the performance characteristic of described rolling operation can be: displacement.Thus,In above-mentioned steps S102, determine the performance characteristic of this assigned operation, particularly as follows: record rolling operation is in instituteState the displacement in interface.
Described displacement initial position corresponding when this rolling operation triggers is started calculate, and continue toThis rolling operation terminate after end position.Therefore record rolling operation displacement in described interface, alsoIt is exactly to record initial coordinate when this rolling operation triggers in described interface, and after this rolling operation terminatesOffset coordinates, and determine that this initial coordinate is to the coordinate offset amount between offset coordinates, then, the most permissibleThis coordinate offset amount is defined as the displacement of this rolling operation.
It should be noted that for the terminal unit with touch screen functionality, when user sends rolling operation,Initial coordinate when this rolling operation triggers, it is simply that during finger contact screen, the coordinate position on screen,Along with the movement of finger, finger will change relative to the coordinate position of screen, then, when finger leavesThe moment of screen, the coordinate position on screen corresponding to this finger is exactly the offset coordinates of this rolling operation,It is thus possible to determine the distance that this finger moves, the namely displacement of rolling operation.Certainly, existHave on the terminal unit of touch screen functionality, can be by coordinate corresponding to sensor acquisition finger arranged on screen.
And for not having the terminal unit of touch screen functionality, the rolling operation that user sends is generally by MusThe input equipments such as mark send, then, when rolling operation sends, the coordinate position that light is marked on interface is exactlyInitial coordinate when this rolling operation triggers, after user sends rolling operation by mouse roller, interface is carried outRolling, at the end of rolling operation, the coordinate position that light is marked on interface is exactly the offset coordinates of this rolling operation,It is thus possible to determine light target displacement, the namely displacement of rolling operation.
It is nested in the scene in a ScrollView at the 2nd ScrollView, when rolling operation acts onDuring overlapping region between the oneth ScrollView and the 2nd ScrollView, just can be according to this rolling operationDisplacement determine the ScrollView that this rolling operation is corresponding, that is, judge the shifting of described rolling operationWhether dynamic distance exceedes default gauged distance, the most then a ScrollView performs described rolling and graspsMake, otherwise, then described 2nd ScrollView is performed described rolling operation.Former with aforesaid way oneBecause of similar, show that the content shown in the 2nd ScrollView that area is less is more fine, when user is clearLook at the content shown in the 2nd ScrollView time, the displacement of the rolling operation sent is the least,The most in the embodiment of the present application, when the displacement of rolling operation is above standard distance, to firstScrollView performs rolling operation, otherwise, the 2nd ScrollView is performed rolling operation.
Such as: user on the panel computer with touch screen functionality, Website page shown to this panel computerCarry out rolling operation.This Website page can carry out slide (now, this Website page is a ScrollView),Assume that in this Website page, (now, this comment region is second possibly together with the comment region that can carry out rollingScrollView).The rolling operation sent when the finger of user acts on this comment region and the weight of Website pageTime in folded region, when this panel computer will record user's finger contacts screen, initial coordinate on the screen,Assume that this initial coordinate is (500,700), at the end of rolling operation, it is assumed that user's finger is on screenOffset coordinates is (500,750), it is seen then that the finger of user is displacement on the vertical coordinate direction of screenIt is 50.Assume for vertical coordinate direction preset gauged distance be 40, it is clear that the movement of user's finger away fromFrom having exceeded the gauged distance preset, then, this rolling operation that user can be sent by this terminal unitIt is judged to the rolling operation carried out for a ScrollView, that is, this Website page will roll.
Mode three
Applying in reality, for having the terminal unit of touch screen functionality, user is for corresponding boundaryThe rolling speed of the rolling operation that face is sent, will affect the rolling condition at this interface, specifically, roll behaviourThe rolling speed made is the fastest, and the rolling speed at interface is the fastest, and the rolling distance at interface is the biggest, otherwise,The rolling speed at interface is the slowest, and rolling distance is the shortest.
Visible, in this mode, the performance characteristic of described rolling operation can be: rolling speed.Thus,In above-mentioned steps S102, determine the performance characteristic of this assigned operation, particularly as follows: remember according in the unit intervalThe rolling operation of record displacement in described interface, determines the rolling speed of this assigned operation.
The rolling speed of rolling operation, will start timing when this rolling operation is touched to screen, and setTiming time in measure rolling operation displacement.Therefore record rolling operation rolling in described interfaceSpeed, namely records this rolling operation triggering moment in described interface and initial coordinate, Jing GuosheAfter fixed timing duration, determine the offset coordinates of this rolling operation, according to initial coordinate and offset coordinates, reallyThe displacement of this rolling operation fixed, according to the timing duration of this displacement and setting, determines that this rolling is graspedThe rolling speed made.
It is nested in the scene in a ScrollView at the 2nd ScrollView, when rolling operation acts onDuring overlapping region between the oneth ScrollView and the 2nd ScrollView, just can be according to this rolling operationRolling speed determine the ScrollView that this rolling operation is corresponding, that is, judge the rolling of described rolling operationWhether dynamic speed exceedes default standard speed, the most then a ScrollView performs described rolling and graspsMake, otherwise, then described 2nd ScrollView is performed described rolling operation.With aforesaid way one and sideFormula two is similar, shows that the content shown in the 2nd ScrollView that area is less is more fine, works as userWhen browsing the content shown in the 2nd ScrollView, the rolling speed of the rolling operation sent is the most relativelyLittle, the most in the embodiment of the present application, when the rolling speed of rolling operation is above standard speed, to firstScrollView performs rolling operation, otherwise, the 2nd ScrollView is performed rolling operation.
Such as: user on the panel computer with touch screen functionality, Website page shown to this panel computerCarry out rolling operation.This Website page can carry out slide (now, this Website page is a ScrollView),Assume that in this Website page, (now, this comment region is second possibly together with the comment region that can carry out rollingScrollView).The rolling operation sent when the finger of user acts on this comment region and the weight of Website pageTime in folded region, when this panel computer will record user's finger contacts screen, initial coordinate on the screen,Assuming that this initial coordinate is (400,600), meanwhile, this panel computer starts timing, it is assumed that default meterThe most a length of 0.1s, then, when the moment that timing terminates, this panel computer will determine residing for user's fingerCoordinate position (that is, offset coordinates), it is assumed that user's finger offset coordinates on screen is (400,680),Just may determine that in timing duration, the finger of user displacement on the vertical coordinate direction of screen is 80,Such that it is able to further determine that out the rolling speed of this rolling operation, that is, rolling speed is 80/0.1=800Pixel/s.Assume that the standard speed preset is 400 pixels/s, it is clear that the displacement of user's finger exceedesThe standard speed preset, then, this rolling operation that user can be sent by this terminal unit is judged to pinThe rolling operation carrying out a ScrollView, that is, this Website page will roll.
Use the performance characteristic in above-mentioned three kinds of modes, can effectively determine corresponding to assigned operationScrollView, thus in corresponding ScrollView, perform this assigned operation, it is effectively improved appointmentOperation carries out the accuracy responded.
In actual applications, when using the performance characteristic that aforesaid way determines assigned operation, to different applicationAdaptability also differs, in some applications, due to adaptive application programming interface (ApplicationProgramming Interface, API) to the transducing signal sent of the sensor of corresponding terminal unitProcess and response there are differences, then, it is possible to occur in after receiving rolling operation, in interface notChaotic phenomenon is rolled with ScrollView.
Such as: in the Website page that browser as shown in Figure 1 is shown, two ScrollView are carried outNesting, when rolling operation acts in overlapping region, it is assumed that determine this rolling operation according to aforesaid wayPerformance characteristic, determine corresponding 2nd ScrollView of this rolling operation, then, this browser can be to thisDisplaying content in 2nd ScrollView rolls, but, owing in this browser, the process of API is prolongedTime, after causing the content shown in the 2nd ScrollView to roll, this browser judges firstScrollView also should roll, thus this browser can control in a ScrollView show interiorHold and roll.
Or, the API in browser is according to the rolling operation received, it is determined that a ScrollView shouldRoll, and the performance characteristic determined according to aforesaid way, finally determining should be by the 2nd ScrollViewRoll, then, will occur jumping screen phenomenon, that is, the displaying content in a ScrollView is firstFirst occur rolling sign, slight rolling occurs, and moment stops, and changes the displaying in the 2nd ScrollView intoContent rolls.
In order to avoid above-mentioned phenomenon occurs, in the embodiment of the present application, weight in rolling operation acts on interfaceIn the case of folded region, when the ScrollView corresponding at rolling operation performs this rolling operation, by rootAccording to the rolling distance of the displaying content in this ScrollView, other ScrollView in this interface are carried outAssociation rolls, that is, for the method described in above-mentioned steps S201~S203, also include: to ScrollViewAfter performing described assigned operation, determine the variable quantity showing in this ScrollView that the display location of content is corresponding,According to described variable quantity, regulate the display location showing content in described interface in other ScrollView.
It should be noted that in the case of assigned operation is rolling operation, in the displaying in ScrollViewThe variable quantity of the display location held, it is simply that show the rolling distance of content in this ScrollView;And specifyingIn the case of operation is for zoom operations, the variable quantity of the display location of the displaying content in ScrollView, justIt it is the coordinate offset amount showing content in this ScrollView.
Specifically, show with assigned operation as rolling operation, overlapping region includes a ScrollView and secondThe overlapping region (wherein, the 2nd ScrollView is nested in a ScrollView) of ScrollViewSituation be specifically described.
In this case, the rolling operation sent as user (is not made when acting in a ScrollViewBe used in overlapping region), now, the 2nd ScrollView using as the displaying content in a ScrollView,Other followed in a ScrollView show that content together rolls.Here the limit to the application it is not intended thatFixed.
Assume that scene is: in interface as shown in Figure 3, rolling operation that user is sent (in Fig. 3,The rotating direction of this rolling operation is for scrolling up) act in overlapping region, and true according to aforesaid wayMake this rolling operation corresponding to the 2nd ScrollView, then, the displaying content in the 2nd ScrollViewTo roll, that is, the display location of the displaying content in the 2nd ScrollView will change,Now, the variable quantity of the display location of content is shown, it is simply that show the rolling distance above interface of content.
While these show that content rolls, corresponding terminal unit or application are by record displayThe rolling distance held, and by this rolling distance real-time synchronization a to ScrollView, so that firstDisplaying content in ScrollView together scrolls up.
Assume that the rolling distance showing content in Fig. 3 in the 2nd ScrollView is 200 pixels, then, theDisplaying content (including the 2nd ScrollView) in one ScrollView also will roll 200 pixels, rollAfter interface as shown in Figure 4.In Fig. 4, the displaying content entirety in the 2nd ScrollView scrolls up,And in the 2nd ScrollView, show the displaying content " d. made new advancesxxxxxxxxxx", meanwhile, secondScrollView, as the displaying content in a ScrollView, also will follow in a ScrollViewOther show that content scrolls up in the lump.Thus, in Fig. 4, the 2nd ScrollView is at a ScrollViewIn display location, compared with Fig. 3, be more nearly the coboundary of a ScrollView.
It is to say, in above-mentioned scene, user the rolling operation sent makes in the 2nd ScrollViewWhile showing that content rolls, the displaying content in a ScrollView also will together roll,Thus, two ScrollView in this interface roll, and also would not occur jumping screen or rolling confusionPhenomenon.
Certainly, the above-mentioned association roll mode in the embodiment of the present application is not limited to this, it is also possible to be its other partyFormula, such as: the displaying content in a ScrollView rolls, and drives in the 2nd ScrollViewShow that content rolls.Here the restriction to the application it is not intended that.
The information displaying method provided for the embodiment of the present application above, based on same thinking, the application implementsExample also provides for a kind of device for displaying information, as shown in Figure 5.
Device for displaying information in Fig. 5, described device includes: monitoring modular 501, performance characteristic module 502And execution module 503, wherein,
Described monitoring modular 501, for monitoring for the assigned operation of overlapping region in interface.Wherein, instituteState overlapping region and include that at least two rolls the overlapping region of view ScrollView.
Described performance characteristic module 502, for when monitoring described assigned operation, determines this assigned operationPerformance characteristic.
Described execution module 503, for the performance characteristic according to described assigned operation, in this assigned operation instituteCorresponding ScrollView performs this assigned operation.
In the embodiment of the present application, described execution module 503 is additionally operable to: ScrollView is performed described fingerAfter fixed operation, determine the variable quantity showing in this ScrollView that the display location of content is corresponding, according to describedVariable quantity, regulates the display location showing content in described interface in other ScrollView.
It should be noted that include that rolling operation, described overlapping region include first at assigned operation(wherein, the 2nd ScrollView is nested in this in the overlapping region of ScrollView and the 2nd ScrollViewIn oneth ScrollView) in the case of:
When described performance characteristic includes the persistent period, described performance characteristic module 502, specifically for recordDescribed rolling operation is in the persistent period of described overlapping region.
Described execution module 503, specifically for judging whether the persistent period of described assigned operation exceedes defaultStandard duration, the most then to described 2nd ScrollView perform described rolling operation, otherwise, the most rightA described ScrollView performs described rolling operation.
When described performance characteristic includes displacement, described performance characteristic module 502, specifically for recordDescribed rolling operation displacement in described interface.
Described execution module 503, specifically for judging whether the displacement of described assigned operation exceedes defaultGauged distance, the most then to described oneth ScrollView perform described rolling operation, otherwise, the most rightDescribed 2nd ScrollView performs described rolling operation.
When described performance characteristic includes rolling speed, described performance characteristic module 502, specifically for basisIn unit interval, the rolling operation of record displacement in described interface, determines the rolling of this assigned operationSpeed.
Described execution module 503, specifically for judging whether the rolling speed of described assigned operation exceedes defaultStandard speed, the most then to described oneth ScrollView perform described rolling operation, otherwise, the most rightDescribed 2nd ScrollView performs described rolling operation.
In a typical configuration, calculating equipment includes one or more processor (CPU), input/defeatedOutgoing interface, network interface and internal memory.
Internal memory potentially includes the volatile memory in computer-readable medium, random access memory(RAM) and/or the form such as Nonvolatile memory, such as read only memory (ROM) or flash memory (flash RAM).Internal memory is the example of computer-readable medium.
Computer-readable medium includes that removable media permanent and non-permanent, removable and non-can be by appointingWhere method or technology realize information storage.Information can be computer-readable instruction, data structure, programModule or other data.The example of the storage medium of computer includes, but are not limited to phase transition internal memory(PRAM), static RAM (SRAM), dynamic random access memory (DRAM), itsThe random access memory (RAM) of his type, read only memory (ROM), electrically erasable are read-onlyMemorizer (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read only memory(CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tape, tape magneticDisk storage or other magnetic storage apparatus or any other non-transmission medium, can be used for storage can be calculatedThe information that equipment accesses.According to defining herein, computer-readable medium does not include temporary computer-readable matchmakerBody (transitory media), such as data signal and the carrier wave of modulation.
Also, it should be noted term " includes ", " comprising " or its any other variant are intended to non-rowComprising, so that include that the process of a series of key element, method, commodity or equipment not only include of his propertyThose key elements, but also include other key elements being not expressly set out, or also include for this process,The key element that method, commodity or equipment are intrinsic.In the case of there is no more restriction, statement " includeOne ... " key element that limits, it is not excluded that including the process of described key element, method, commodity or settingOther identical element is there is also in Bei.
It will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer journeySequence product.Therefore, the application can use complete hardware embodiment, complete software implementation or combine software andThe form of the embodiment of hardware aspect.And, the application can use and wherein include calculating one or moreThe computer-usable storage medium of machine usable program code (include but not limited to disk memory, CD-ROM,Optical memory etc.) form of the upper computer program implemented.
The foregoing is only embodiments herein, be not limited to the application.For this area skillFor art personnel, the application can have various modifications and variations.All institutes within spirit herein and principleAny modification, equivalent substitution and improvement etc. made, within the scope of should be included in claims hereof.