Summary of the invention
The embodiment of the present application provides a kind of method, apparatus and electronic equipment for controlling view control, can not to solve user
The problem of easily selecting desired information, influencing the operating efficiency of the page.
In order to solve the above technical problems, the embodiment of the present application adopts the following technical solutions:
In a first aspect, the embodiment of the present application provides a kind of method for controlling view control, comprising:
In response to the operation for moving the first view control on the page along target direction, the first view control is controlled
It is moved with the second view control on the page along the target direction, second view control is by the display before movement
Mode is the first display mode;
In the first view control and the moving process of second view control, if the second view control institute
Page location meet adaptive regularization condition, then the display mode of second view control is adjusted to the second display side
Formula, wherein second view control is under first display mode and second display mode, in the first direction
On length it is different.
Second aspect, the embodiment of the present application provide a kind of device for controlling view control, comprising:
Processing unit controls described the in response to the operation for moving the first view control on the page along target direction
The second view control in one view control and the page is moved along the target direction, and second view control is being moved
Display mode before dynamic is the first display mode;
Switch unit, in the first view control and the moving process of second view control, if described second
Page location where view control meets adaptive regularization condition, then is adjusted to the display mode of second view control
Second display mode, wherein second view control is under first display mode and second display mode, in institute
The length stated on first direction is different.
The third aspect, the embodiment of the present application provide a kind of electronic equipment, comprising:
Processor;And
It is arranged to the memory of storage computer executable instructions, the executable instruction makes the place when executed
It manages device and executes following operation:
In response to the operation for moving the first view control on the page along target direction, the first view control is controlled
It is moved with the second view control on the page along the target direction, second view control is by the display before movement
Mode is the first display mode;
In the first view control and the moving process of second view control, if the second view control institute
Page location meet adaptive regularization condition, then the display mode of second view control is adjusted to the second display side
Formula, wherein second view control is under first display mode and second display mode, in the first direction
On length it is different.
Fourth aspect, the embodiment of the present application provide a kind of computer readable storage medium, the computer-readable storage medium
Matter stores one or more programs, one or more of programs when the electronic equipment for being included multiple application programs executes,
So that the electronic equipment executes following operation:
In response to the operation for moving the first view control on the page along target direction, the first view control is controlled
It is moved with the second view control on the page along the target direction, second view control is by the display before movement
Mode is the first display mode;
In the first view control and the moving process of second view control, if the second view control institute
Page location meet adaptive regularization condition, then the display mode of second view control is adjusted to the second display side
Formula, wherein second view control is under first display mode and second display mode, in the first direction
On length it is different.
By the technical solution of above the application as it can be seen that the method for the control view control of the embodiment of the present application, in response to will
The operation that first view control on the page is moved along target direction controls first view control and the second view control along target
Direction is mobile, and the page in the moving process of first view direction and the second view control, where the second view control
When face position meets adaptive regularization condition, the display mode of the second view control is adjusted to second by the first display mode and is shown
Show mode, for the second view control under the first display mode and the second display mode, length in the target direction is different.Also
To say, the method for the control view control of the embodiment of the present application, can the second view control moving process it is total, be based on second
Page location where view control adaptively adjusts the display mode of the second view control, and family can be used and easily select
Navigation bar in two view controls improves the operating efficiency of the page.
Specific embodiment
To keep the purposes, technical schemes and advantages of the application clearer, below in conjunction with the application specific embodiment and
Technical scheme is clearly and completely described in corresponding attached drawing.Obviously, described embodiment is only the application one
Section Example, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not doing
Every other embodiment obtained under the premise of creative work out, shall fall in the protection scope of this application.
Fig. 1 is an application scenario diagram of the embodiment of the present application.It is as illustrated in FIG. 1, the shared vehicles, food and drink,
In the maps intermediate item such as navigator fix, it is contemplated that the operating efficiency of the page, usually in the case where sliding in list block, side is led
Model plane block can also move.During side navigation module is mobile, side navigation module is likely to be more than page top
Division header coordinate causes the information in side navigation bar to show incomplete, so that user can not easily select desired information, shadow
Ring the operating efficiency of the page.
In order to solve the above-mentioned technical problem, the embodiment of the present application provides a kind of method for controlling view control, Neng Gouji
In the moving process in view control, page location where view control, the display mode of adaptive switch view control,
Desired information is efficiently selected convenient for user, improves the operating efficiency of the page.
Below in conjunction with specific embodiment, the method for describing the control view control of the embodiment of the present application.
Fig. 2 shows the method for the control view control of the application one embodiment, the method for Fig. 2 can be by control view
The device of control executes.As illustrated in FIG. 2, method includes:
S102 controls first view in response to the operation for moving the first view control on the page along target direction
The second view control on figure control and the page is moved along the target direction, and second view control is before by movement
Display mode be the first display mode.
It along the operation that target direction moves include institute by the first view control on the page it should be noted that in S102
There is the operation that first view control and the second view control can be caused to move along target direction.For example, operation can be dragging
The operation of a line of first view control perhaps can be the operation for pulling entire first view control or can also be
Click the operation of " the expansion key " on first view control.
It is understood that in response to the operation for moving first view control along target direction, control first in S102
View control and the second view control are moved along target direction, actually, in response to by first view control along target direction
Mobile operation controls first view control and the second view control and links along target direction.Here first view control can
Think active control, the second view control can be impulsion control.
In S102, the first display mode for example can be longitudinal direction and show or be shown displayed across.
S104, in the first view control and the moving process of second view control, if second view
Page location where control meets adaptive regularization condition, then the display mode of second view control is adjusted to second
Display mode, wherein second view control is under first display mode and second display mode, in the mesh
The length marked on direction is different.
In S104, the page location where the second view control, which meets adaptive regularization condition, can be the second view control
Page location where part meets the coordinate of the coordinate of a line of the second view control and the top of the page or bottom certainly
Adapt to regularization condition.For example, target, which is reversed, moves up direction, if the page location where the second view control makes the second view
The difference of the coordinate at the top of the coordinate and page of the upper edge of control is less than or equal to preset difference value, then it is assumed that the second view control
Position where part meets adaptive regularization condition.Here preset difference value can be a preset value, be also possible to based on the
The value that the width of navigation bar in two view controls determines.
Alternatively, the page location where the second view control, which meets adaptive condition, can be the second view in S104
Control corresponding displacement at current page position meets adaptive regularization condition.For example, method shown in FIG. 1 further include:
If the displacement of the second view control is greater than or equal to displacement of targets amount, it is determined that the page location where the second view control is full
The adaptive regularization condition of foot.
Goal displacement can be preset displacement amount or displacement of targets amount and can be based on the second view control
It is determined by the difference of the initial distance of the predeterminated position on the mobile front distance page and pre-determined distance.For example, as illustrated in FIG. 3
, predeterminated position is in Fig. 3 with the position of this edge of x label, pre-determined distance A, and the second view control is moved front distance
Distance with this edge of x label is N, then displacement of targets amount is N-A.
In the embodiment of the present application, the second view control can be judged by detecting the coordinate position of the second view control
Displacement.Or further, the second view control and first view control synchronizing moving pass through detection first view control
Displacement of the displacement as the second view control.For example, first view control is keeping lower edge to be overlapped with the bottom of the page
On the basis of move up, in such a case, it is possible to by detection first view control upper edge changes in coordinates determine
The displacement of first view control, and the displacement of the second view control is identical as the displacement of first view control.
As an example, target direction is upper moving direction, height of second view control under the first display mode
Greater than its height under the second display mode.For example, the first display mode is longitudinal display (as shown by Fig. 4 left figure),
Second display mode is shown displayed across (as shown by Fig. 4 right figure).Under the first display mode, the height of the second view control
The sum of the height of two navigation bars can be greater than or equal to, width is the width of a navigation bar.Under the second display mode, the
The height of two view controls can be the height of a navigation bar, and width is greater than or equal to the sum of the width of two navigation bars.
In this example, further, the display mode of the second view control is adjusted to the second display mode, wrapped
It includes:
Second view control is moved to target pages position, and in target pages position by the display of the second view control
Mode is adjusted to the second display mode;When second view control is shown in a second display mode at target pages position, second
The difference of the top coordinate of the bottom coordinate and page of view control is greater than or equal to the first preset value and less than the second preset value.
For example, the second view control is page navigation view control, and first view control is the second view control
The corresponding displaying view control in the Present navigation column of part.Such as it is illustrated in fig. 5, the navigation bar in the second view control includes
" whole ", " trade company A ", " trade company B " and " trade company C " etc. is shown each in corresponding second view control in first view control
The information of vehicles of trade company.Display mode before second view control is moved is longitudinal display, in first view control and second
During view control moves up, when page location where the second view control meets adaptive regularization condition, by
The position (for example, being suspended in below top caption) that two view controls are moved to below the top caption of the page, and second is regarded
The display mode of figure is adjusted to be shown displayed across.It is possible thereby to make user by selecting the navigation bar being shown displayed across realization and the page
Interaction.
As another example, target direction is next direction, height of second view control under the first display mode
Less than its height under the second display mode.For example, the first display mode is to be shown displayed across (as shown by Fig. 6 left figure),
Second display mode is longitudinal display (as shown by Fig. 6 right figure).Under the first display mode, the height of the second view control
It can be the height of a navigation bar, width is greater than or equal to the sum of the width of two navigation bars.Under the second display mode, the
The height of two view controls can be greater than or equal to the sum of the height of two navigation bars, and width is the width of a navigation bar.
In this example, further, the display mode of the second view control is adjusted to the second display mode, wrapped
It includes: the second view control is moved to target pages position, and in target pages position by the display mode of the second view control
It is adjusted to the second display mode.And goal page location can be the left half-court or right half-court of the page.
It should be noted that above-mentioned the embodiment of the present application is to move up direction and move down direction to be retouched to target direction
It states, is merely possible to example, be not the restriction to technical solution.When target direction is to move to left direction or move to right direction, together
The method that sample can use the embodiment of the present application, to avoid repeating, details are not described herein.
Fig. 7 is the structural schematic diagram of one embodiment electronic equipment of the application.Referring to FIG. 7, in hardware view, the electricity
Sub- equipment includes processor, optionally further comprising internal bus, network interface, memory.Wherein, memory may be comprising interior
It deposits, such as high-speed random access memory (Random-Access Memory, RAM), it is also possible to further include non-volatile memories
Device (non-volatile memory), for example, at least 1 magnetic disk storage etc..Certainly, which is also possible that other
Hardware required for business.
Processor, network interface and memory can be connected with each other by internal bus, which can be ISA
(Industry Standard Architecture, industry standard architecture) bus, PCI (Peripheral
Component Interconnect, Peripheral Component Interconnect standard) bus or EISA (Extended Industry Standard
Architecture, expanding the industrial standard structure) bus etc..The bus can be divided into address bus, data/address bus, control always
Line etc..Only to be indicated with a four-headed arrow in Fig. 7, it is not intended that an only bus or a type of convenient for indicating
Bus.
Memory, for storing program.Specifically, program may include program code, and said program code includes calculating
Machine operational order.Memory may include memory and nonvolatile memory, and provide instruction and data to processor.
Processor is from the then operation into memory of corresponding computer program is read in nonvolatile memory, in logical layer
The device of control view control is formed on face.Processor executes the program that memory is stored, and is specifically used for executing following behaviour
Make:
In response to the operation for moving the first view control on the page along target direction, the first view control is controlled
It is moved with the second view control on the page along the target direction, second view control is by the display before movement
Mode is the first display mode;
In the first view control and the moving process of second view control, if the second view control institute
Page location meet adaptive regularization condition, then the display mode of second view control is adjusted to the second display side
Formula, wherein second view control is under first display mode and second display mode, in the target direction
On length it is different.
The method of control view control disclosed in the above-mentioned embodiment illustrated in fig. 2 such as the application can be applied in processor,
Or it is realized by processor.Processor may be a kind of IC chip, the processing capacity with signal.In the process of realization
In, each step of the above method can be complete by the integrated logic circuit of the hardware in processor or the instruction of software form
At.Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit, CPU),
Network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal
Processor, DSP), it is specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing
Field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device are divided
Vertical door or transistor logic, discrete hardware components.It may be implemented or execute and is in the embodiment of the present application disclosed each
Method, step and logic diagram.General processor can be microprocessor or the processor is also possible to any conventional place
Manage device etc..The step of method in conjunction with disclosed in the embodiment of the present application, can be embodied directly in hardware decoding processor and execute
At, or in decoding processor hardware and software module combination execute completion.Software module can be located at random access memory,
This fields such as flash memory, read-only memory, programmable read only memory or electrically erasable programmable memory, register maturation
In storage medium.The storage medium is located at memory, and processor reads the information in memory, completes above-mentioned side in conjunction with its hardware
The step of method.
Certainly, other than software realization mode, other implementations are not precluded in the electronic equipment of the application, for example patrol
Collect device or the mode of software and hardware combining etc., that is to say, that the executing subject of following process flow is not limited to each patrol
Unit is collected, hardware or logical device are also possible to.
The embodiment of the present application also proposed a kind of computer readable storage medium, the computer-readable recording medium storage one
A or multiple programs, the one or more program include instruction, which holds when by the electronic equipment including multiple application programs
When row, the electronic equipment can be made to execute the method for controlling view control in embodiment illustrated in fig. 2, and be specifically used for executing:
In response to the operation for moving the first view control on the page along target direction, the first view control is controlled
It is moved with the second view control on the page along the target direction, second view control is by the display before movement
Mode is the first display mode;
In the first view control and the moving process of second view control, if the second view control institute
Page location meet adaptive regularization condition, then the display mode of second view control is adjusted to the second display side
Formula, wherein second view control is under first display mode and second display mode, in the target direction
On length it is different.
Fig. 8 is the structural schematic diagram of the device of the control view control of one embodiment of the application.Referring to FIG. 8,
In a kind of Software Implementation, device 800 can include: processing unit 81 and switch unit 82, wherein
Processing unit 81, in response to the operation for moving the first view control on the page along target direction, described in control
The second view control on first view control and the page is moved along the target direction, and second view control is in quilt
Display mode before movement is the first display mode;
Switch unit 82, in the first view control and the moving process of second view control, if described
Page location where two view controls meets adaptive regularization condition, then adjusts the display mode of second view control
For the second display mode, wherein second view control under first display mode and second display mode,
Length on the first direction is different.
The device of the control view control of the embodiment of the present application, in response to by the first view control on the page along target side
To mobile operation, controls first view control and the second view control is moved along target direction, and in first view direction
In the moving process of the second view control, when the page location where the second view control meets adaptive regularization condition,
The display mode of second view control is adjusted to the second display mode by the first display mode, the second view control is aobvious first
Show under mode and the second display mode, length in the target direction is different.That is, the control view of the embodiment of the present application
The method of control, can the second view control moving process it is total, it is adaptive based on the page location where the second view control
The display mode that the second view control should be adjusted can be used family and easily select navigation bar in the second view control, improves
The operating efficiency of the page.
Optionally, as one embodiment, processing unit 81:
If the displacement of second view control is greater than or equal to displacement of targets amount, it is determined that second view control
The page location at place meets the adaptive regularization condition.
Optionally, as one embodiment, the displacement of targets amount be based on second view control by before mobile away from
The difference of initial distance and pre-determined distance from the predeterminated position on the page determines.
Optionally, as one embodiment, the target direction is upper moving direction, and second view control is described
Height under first display mode is greater than its height under second display mode.
Optionally, as one embodiment, switch unit 82:
Second view control is moved to target pages position, and is regarded in the target pages position by described second
The display mode of figure control is adjusted to second display mode;
Wherein, when second view control is shown at the target pages position with second display mode, institute
The difference for stating the bottom coordinate of the second view control and the top coordinate of the page is greater than or equal to the first preset value and is less than
Second preset value.
Optionally, as one embodiment.The target direction is lower moving direction, and second view control is described
Height under first display mode is less than its height under second display mode.
Optionally, as one embodiment, second view control is page navigation view control, the first view
Control is the corresponding displaying view control in Present navigation column of second view control.
The device that the device of the control view control of the embodiment of the present application can also carry out the control view control in Fig. 2 executes
Method, and realize control view control device embodiment shown in Fig. 2 function, details are not described herein.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more,
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces
The form of product.
The present invention is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present application
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net
Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap
Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want
There is also other identical elements in the process, method of element, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can provide as method, system or computer program product.
Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application
Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code
The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Formula.
The above description is only an example of the present application, is not intended to limit this application.For those skilled in the art
For, various changes and changes are possible in this application.All any modifications made within the spirit and principles of the present application are equal
Replacement, improvement etc., should be included within the scope of the claims of this application.