CN107256116B - Page switching processing method and device, user terminal and readable storage medium - Google Patents

Page switching processing method and device, user terminal and readable storage medium Download PDF

Info

Publication number
CN107256116B
CN107256116B CN201710442182.1A CN201710442182A CN107256116B CN 107256116 B CN107256116 B CN 107256116B CN 201710442182 A CN201710442182 A CN 201710442182A CN 107256116 B CN107256116 B CN 107256116B
Authority
CN
China
Prior art keywords
page
current
display area
distance
switching button
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.)
Expired - Fee Related
Application number
CN201710442182.1A
Other languages
Chinese (zh)
Other versions
CN107256116A (en
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.)
Alibaba China Co Ltd
Original Assignee
Guangzhou Shenma Mobile Information 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 Guangzhou Shenma Mobile Information Technology Co Ltd filed Critical Guangzhou Shenma Mobile Information Technology Co Ltd
Priority to CN201710442182.1A priority Critical patent/CN107256116B/en
Publication of CN107256116A publication Critical patent/CN107256116A/en
Priority to PCT/CN2018/090685 priority patent/WO2018228341A1/en
Application granted granted Critical
Publication of CN107256116B publication Critical patent/CN107256116B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0483Interaction with page-structured environments, e.g. book metaphor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/0485Scrolling or panning
    • G06F3/04855Interaction with scrollbars

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the invention provides a page switching processing method and device, a user terminal and a readable storage medium, and belongs to the field of data processing. The method comprises the following steps: acquiring a page switching instruction triggered by a page switching button in a current page; acquiring first position information of a current display area of a page switching button in the current page and a rolling distance of a scroll bar in the current page when the page switching button is triggered; switching the current page to a target page according to a page switching instruction; acquiring second position information of a page switching button of a current display area in a target page; adjusting the rolling distance of a rolling bar in the target page according to the first position information, the second position information and the rolling distance; the position of the page switching button relative to the finger of the user is not changed, so that the user does not need to move the finger when switching the page, and the convenience of the user in page switching operation is improved.

Description

Page switching processing method and device, user terminal and readable storage medium
Technical Field
The present invention relates to the field of data processing, and in particular, to a page switching processing method, an apparatus, a user terminal, and a readable storage medium.
Background
As the page content is carried more and more, the design form of switching the content by multi-page card multi-tab becomes a common design form, and the previous page, the next page or tab1, tab2 buttons are used to switch the content. When the contents of the plurality of page cards and the plurality of tabs are different in length, the position of the switching button may be changed due to the situation, so that if the user wants to continue to operate the switching button, the user still needs to move the finger position to reach a new button position to perform the operation, which affects the smoothness of the operation.
Disclosure of Invention
In view of the above, embodiments of the present invention provide a page switching processing method, a page switching processing apparatus, a user terminal and a readable storage medium to solve the above problem.
In a first aspect, an embodiment of the present invention provides a page switching processing method, where each page includes a page switching button, and the method includes: acquiring a page switching instruction triggered by a page switching button in a current page; acquiring first position information of a current display area of the page switching button in the current page and a rolling distance of a scroll bar in the current page when the page switching button is triggered; switching the current page to a target page according to the page switching instruction; acquiring second position information of a page switching button of a current display area in the target page; and adjusting the rolling distance of a rolling bar in the target page according to the first position information, the second position information and the rolling distance so as to enable the position of a page switching button of the current display area in the current page to be the same as the position of a page switching button of the current display area in the target page.
In a second aspect, an embodiment of the present invention provides a page switching processing method, where the method includes: acquiring a switching instruction triggered by a page switching button in a page; acquiring first position information of a current display area of the page switching button in the page and a rolling distance of a scroll bar in the page when the page switching button is triggered; updating the content of the corresponding display area in the page according to the switching instruction; acquiring second position information of the page switching button of the current display area in the page after the content of the display area is updated; and adjusting the scroll distance of a scroll bar in the page after switching according to the first position information, the second position information and the scroll distance so as to enable the position of a page switching button of the current display area in the page before switching to be the same as the position of a page switching button of the current display area in the page after switching.
In a third aspect, an embodiment of the present invention provides a page switching processing apparatus, where each page includes a page switching button, the apparatus including: the first acquisition module is used for acquiring a page switching instruction triggered by a page switching button in a current page; the second obtaining module is used for obtaining first position information of a current display area of the page switching button in the current page and a rolling distance of a scroll bar in the current page when the page switching button is triggered; the switching module is used for switching the current page to a target page according to the page switching instruction; the third acquisition module is used for acquiring second position information of a page switching button of a current display area in the target page; and the first adjusting module is used for adjusting the scrolling distance of the scroll bar in the target page according to the first position information, the second position information and the scrolling distance so as to enable the position of the page switching button of the current display area in the current page to be the same as the position of the page switching button of the current display area in the target page.
In a fourth aspect, an embodiment of the present invention provides a page switching processing apparatus, where the apparatus includes: the fourth acquisition module is used for acquiring a switching instruction triggered by a page switching button in a page; a fifth obtaining module, configured to obtain first position information of the page switching button in a current display area of the page when the page switching button is triggered, and a scroll distance of a scroll bar in the page; the updating module is used for updating the content of the corresponding display area in the page according to the switching instruction; a sixth obtaining module, configured to obtain second position information, in the page, of the page switching button in the current display area in the page after updating the content of the display area; and the second adjusting module is used for adjusting the scrolling distance of the scrolling bar in the page after switching according to the first position information, the second position information and the scrolling distance, so that the position of a page switching button in the current display area in the page before switching is the same as the position of a page switching button in the current display area in the page after switching.
In a fifth aspect, an embodiment of the present invention provides a user terminal, where the user terminal includes a processor and a memory, where the memory is coupled to the processor, the memory stores instructions adapted to perform a page switching processing method, each page includes a page switching button, and when the instructions are executed by the processor, the user terminal performs the following operations: acquiring a page switching instruction triggered by a page switching button in a current page; acquiring first position information of a current display area of the page switching button in the current page and a rolling distance of a scroll bar in the current page when the page switching button is triggered; switching the current page to a target page according to the page switching instruction; acquiring second position information of a page switching button of a current display area in the target page; and adjusting the rolling distance of a rolling bar in the target page according to the first position information, the second position information and the rolling distance so as to enable the position of a page switching button of the current display area in the current page to be the same as the position of a page switching button of the current display area in the target page.
In a sixth aspect, an embodiment of the present invention provides a user terminal, where the user terminal includes a processor and a memory, where the memory is coupled to the processor, and the memory stores instructions that, when executed by the processor, the user terminal performs the following: acquiring a switching instruction triggered by a page switching button in a page; acquiring first position information of a current display area of the page switching button in the page and a rolling distance of a scroll bar in the page when the page switching button is triggered; updating the content of the corresponding display area in the page according to the switching instruction; acquiring second position information of the page switching button of the current display area in the page after the content of the display area is updated; and adjusting the scroll distance of a scroll bar in the page after switching according to the first position information, the second position information and the scroll distance so as to enable the position of a page switching button of the current display area in the page before switching to be the same as the position of a page switching button of the current display area in the page after switching.
In a seventh aspect, an embodiment of the present invention provides a readable storage medium, where the readable storage medium is stored in a computer, and the readable storage medium includes a plurality of instructions configured to cause the computer to execute the page switching processing method.
The embodiment of the invention has the beneficial effects that:
the embodiment of the invention provides a page switching processing method, a device, a user terminal and a readable storage medium, which comprises the steps of firstly obtaining a page switching instruction triggered by a page switching button in a current page, then obtaining first position information of the current display area of the page switching button in the current page and a rolling distance of a rolling bar in the current page when the page switching button is triggered, then switching the current page to a target page according to the page switching instruction, then obtaining second position information of the page switching button in the current display area in the target page, and accordingly adjusting the rolling distance of the rolling bar in the target page according to the first position information, the second position information and the rolling distance so as to enable the position of the page switching button in the current display area in the current page to be the same as the position of the page switching button in the current display area in the target page, the position of the page switching button can not be changed, and the position of the page switching button relative to the finger of the user can not be changed, so that the user can not move the finger when switching the page, and the convenience of the user in page switching operation is improved.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the embodiments of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 shows a block diagram of a user terminal applicable to an embodiment of the present invention;
fig. 2 is a flowchart of a page switching processing method according to a first embodiment of the present invention;
fig. 3 is a first schematic view of a user terminal interaction interface of a page switching processing method according to a first embodiment of the present invention;
fig. 4 is a second schematic view of a user terminal interaction interface of a page switching processing method according to a first embodiment of the present invention;
fig. 5 is a flowchart of a page switching processing method according to a second embodiment of the present invention;
fig. 6 is a first schematic view of a user terminal interaction interface of a page switching processing method according to a second embodiment of the present invention;
fig. 7 is a second schematic view of a user terminal interaction interface of a page switching processing method according to a second embodiment of the present invention;
fig. 8 is a block diagram of a page switching processing apparatus according to a third embodiment of the present invention;
fig. 9 is a block diagram of a page switching processing apparatus according to a fourth embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
Fig. 1 shows a block diagram of a user terminal 100 applicable to an embodiment of the present invention. As shown in fig. 1, the user terminal 100 includes a memory 101, a memory controller 102, one or more (only one shown) processors 103, a peripheral interface 104, a radio frequency module 105, an audio module 106, a touch screen 107, and the like. These components communicate with each other via one or more communication buses/signal lines 108.
The memory 101 may be used to store software programs and modules, such as program instructions/modules corresponding to the page switching processing method and apparatus in the embodiments of the present invention, and the processor 103 executes various functional applications and data processing, such as the page switching processing method provided in the embodiments of the present invention, by running the software programs and modules stored in the memory 101.
Memory 101 may include high speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. Access to the memory 101 by the processor 103 and possibly other components may be under the control of the memory controller 102.
The peripheral interface 104 couples various input/output devices to the processor 103 as well as to the memory 101. In some embodiments, the peripheral interface 104, the processor 103, and the memory controller 102 may be implemented in a single chip. In other examples, they may be implemented separately from the individual chips.
The rf module 105 is used for receiving and transmitting electromagnetic waves, and implementing interconversion between the electromagnetic waves and electrical signals, so as to communicate with a communication network or other devices.
Audio module 106 provides an audio interface to a user that may include one or more microphones, one or more speakers, and audio circuitry.
The touch screen 107 provides both an output and an input interface between the user terminal 100 and the user. In particular, the touch screen 107 displays video output to the user, the content of which may include text, graphics, video, and any combination thereof.
It is to be understood that the structure shown in fig. 1 is merely illustrative, and that the user terminal 100 may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
In the embodiment of the present invention, the user terminal 100 is installed with a client, which may be a browser or a third-party application, and corresponds to a Server (Server) end, and provides a service, such as an e-book reading service, for playing a local document or an e-book for a user.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
First embodiment
Referring to fig. 2, fig. 2 is a flowchart of a page switching processing method according to a first embodiment of the present invention, where the method specifically includes the following steps:
step S110: and acquiring a page switching instruction triggered by a page switching button in the current page.
Referring to fig. 3, when a user browses a page, if page switching is required, for example, switching to a previous page or a next page, or skipping, the page switching may be performed by clicking a page switching button in the page, and the user terminal may obtain a page switching instruction triggered by the page switching button in a current page by the user, where the current page is a page currently browsed by the user.
Step S120: acquiring first position information of the page switching button in a current display area of the current page and a rolling distance of a scroll bar in the current page when the page switching button is triggered.
When a user clicks a page switching button in a current page to switch the page, a user terminal acquires first position information of a current display area of the page switching button in the current page when the page switching button is triggered by the user, wherein the current display area can be understood as an interface area which can be seen by the user in the current page. As a mode, the first position information includes a distance between a page switching button in the current page and a first side of a current display area in the current page and a distance between the page switching button in the current page and a second side of the current display area in the current page, where the first side is connected to the second side.
The first position information may be represented as pos1, and may be obtained through pos1 ═ domelement.getboudoundingclientrect (), a distance between the page switching button and a first side of the current display area in the current page may be represented as pos1.left, and a distance between the page switching button and a second side of the current display area in the current page may be represented as pos1. top. In the practical application process, if the page switch button is regarded as a rectangular element, the rectangular element includes four attributes: left, top, righr and bottom, which respectively represent the distance between each side of the rectangular element and two connected sides of the current display area, if the first side is the left side of the current display area in fig. 3, and the second side is the top side of the current display area in fig. 3, after the rectangular element is obtained through a var box ═ document.getelementbyid ('box'), pos1.left can be obtained through alert (box.getboudoundclentrect () left), which represents the distance between the left side of the rectangular element and the left side of the current display area; pos1.top can be obtained by alert (box) indicating the distance between the top side of the rectangular element and the top side of the current display area, so that the first position information of the current display area in the current page when the page switching button is triggered can be obtained by obtaining the distance between the page switching button and the two connected side edges of the current display area in the current page.
When a user triggers a page switching button, the user terminal also needs to acquire a scrolling distance of a scroll bar in a current page, wherein the scrolling distance includes a scrolling distance of the scroll bar in the current page in the horizontal direction of the page when the page switching button is triggered and a scrolling distance of the scroll bar in the current page in the vertical direction of the page when the page switching button is triggered. The scroll distance of the scroll bar in the current page in the horizontal direction of the page when the page switching button is triggered can be obtained through windows scroll xstart ═ document.
Step S130: and switching the current page to a target page according to the page switching instruction.
When the page switching instruction that the user triggers my page switching through the page switching button in the current page is obtained, the user terminal switches the current page to the target page according to the page switching instruction, namely, switching between an upper page and a lower page from the current page or switching between page jumps.
Step S140: and acquiring second position information of a page switching button of a current display area in the target page.
After the page switching is completed, the current display page is a target page, and second position information of a page switching button of a current display area in the target page is acquired, where the second position information includes a distance between the page switching button in the target page and a first side of the current display area in the target page and a distance between the page switching button in the target page and a second side of the current display area in the target page, where the first side is connected to the second side, and the second position information acquisition method refers to the first position information acquisition method in step S120, and is not described herein again for brevity of description.
Step S150: and adjusting the rolling distance of a rolling bar in the target page according to the first position information, the second position information and the rolling distance so as to enable the position of a page switching button of the current display area in the current page to be the same as the position of a page switching button of the current display area in the target page.
Through the steps, the first position information of the current display area of the page switching button in the current page, the second position information of the current display area of the page switching button in the target page, and the rolling distance of the scroll bar when the page switching button in the current page is triggered are obtained, and in order to realize that the position of the page switching button is not changed before and after switching, the rolling distance of the scroll bar in the target page needs to be adjusted, so that the positions of the page switching button in the current display area in the current page and the page switching button in the current display area in the target page are the same, as shown in fig. 3 and 4.
Wherein, the scrolling distance of the scroll bar in the target page in the page horizontal direction is adjusted according to the distance between the page switching button in the target page and the first side edge of the current display area in the target page and the difference between the distance between the page switching button in the current page and the first side edge of the current display area in the current page, that is, the scroll distance of the scroll bar in the target page in the horizontal direction of the page may be represented as document, document element, scroll left ═ windows scroll xstart + (pos2. left-pos 1.left), pos1.left is represented as the distance between the page switch button of the current display area in the current page and the first side of the current display area, the first side may be the left side of the current display area in the current page, pos2.left is represented as the distance between the page switch button of the current display area in the target page and the first side of the current display area, and the first side may be the left side of the current display area in the target page.
Adjusting the scrolling distance of the scroll bar in the target page in the page vertical direction according to the distance between the page switching button in the target page and the second side of the current display area in the target page and the difference between the distance between the page switching button in the current page and the second side of the current display area in the current page, that is, the scrolling distance of the scroll bar in the target page in the vertical direction of the page may be represented as document, document element, scroll top ═ windows scroll start + (pos2. top-pos 1.top), pos1.top is represented as the distance between the page switch button of the current display area in the current page and the first side of the current display area, the first side may be the top side of the current display area in the current page, pos2.top is represented as the distance between the page switch button of the current display area in the target page and the first side of the current display area, and the first side may be the first side of the current display area in the target page.
In the page switching processing method provided by the first embodiment of the present invention, after the current page is switched to the target page, the scrolling distance of the scroll bar in the target page is adjusted, so that the positions of the page switching button in the current display area in the current page and the page switching button in the current display area in the target page are the same, that is, the position of the page switching button is not changed, and the position of the page switching button relative to the finger of the user is not changed, so that the user does not need to move the finger when switching the page, and the convenience of the user in performing the page switching operation is improved.
Second embodiment
Referring to fig. 5, fig. 5 is a flowchart of a page switching processing method according to a second embodiment of the present invention, where the method specifically includes the following steps:
step S210: and acquiring a switching instruction triggered by a page switching button in the page.
Referring to fig. 6, when a user browses a page, if a page needs to be turned or skipped, the page can be switched by clicking a page switching button in the page, and the user terminal can obtain a page switching instruction triggered by the page switching button in the page by the user.
Step S220: acquiring first position information of the page switching button in a current display area of the page and a rolling distance of a scroll bar in the page when the page switching button is triggered.
The specific implementation manner of this step is the same as the specific implementation manner in step S120, and for brevity of description, please refer to the specific implementation manner in step S120, which is not described herein again.
Step S230: and updating the content of the corresponding display area in the page according to the switching instruction.
After the user terminal obtains the switching instruction, the content of the corresponding display area in the page may be updated according to the switching instruction, that is, the content of a certain area in the page is updated, for example, the content of a certain area in the page may be turned up or down or skipped by triggering the page switching button, such as updating the content shown in the content bar in fig. 6.
Step S240: and acquiring second position information of the page switching button of the current display area in the page after the content of the display area is updated.
After the content of the display area in the page is updated, the second position information of the page switching button in the updated page is acquired, the acquiring method of the second position information is consistent with the acquiring method of the first position information of the page switching button before the page is updated, and the specific implementation process of the method may refer to the specific description in step S120.
Step S250: and adjusting the scroll distance of a scroll bar in the page after switching according to the first position information, the second position information and the scroll distance so as to enable the position of a page switching button of the current display area in the page before switching to be the same as the position of a page switching button of the current display area in the page after switching.
The first position information of the page switching button of the page before switching, the second position information of the page switching button after switching, and the rolling distance of the scroll bar in the page when the page switching button is triggered are obtained through the above steps, and in order to realize that the position of the page switching button does not change before and after switching, the rolling distance of the scroll bar in the page after switching needs to be adjusted, so that the position of the page switching button in the current display area in the page before switching is the same as the position of the page switching button in the current display area in the page after switching, as shown in fig. 6 and 7.
The specific implementation manner of this step can refer to the specific description of step S150, which is not described herein in too much detail.
In the page switching processing method provided by the second embodiment of the present invention, the content of the corresponding display area in the page is updated by triggering the page switching button in the page, and the position of the page switching button in the current display area in the page before switching is the same as the position of the page switching button in the current display area in the page after switching by adjusting the scrolling distance of the scroll bar in the page after switching, that is, the position of the page switching button does not change, so that the position of the page switching button relative to the finger of the user does not change, and thus the user does not need to move the finger when switching, and the convenience of the user in performing the page switching operation is improved.
Third embodiment
Referring to fig. 8, fig. 8 is a block diagram of a page switching processing apparatus 200 according to a third embodiment of the present invention, configured to execute the page switching processing method according to the first embodiment, where the apparatus specifically includes:
the first obtaining module 210 is configured to obtain a page switching instruction triggered by a page switching button in a current page.
A second obtaining module 220, configured to obtain first position information of a current display area of the page switching button in the current page when the page switching button is triggered, and a scroll distance of a scroll bar in the current page.
A switching module 230, configured to switch the current page to a target page according to the page switching instruction.
A third obtaining module 240, configured to obtain second position information of the page switching button in the current display area of the target page in the target page.
A first adjusting module 250, configured to adjust a scrolling distance of a scroll bar in the target page according to the first position information, the second position information, and the scrolling distance, so that a position of a page switching button in a current display area in the current page is the same as a position of a page switching button in the current display area in the target page.
As an embodiment, the second obtaining module 220 includes: a first rolling distance acquisition submodule and a second rolling distance acquisition submodule.
And the first rolling distance acquisition submodule is used for acquiring the rolling distance of a scroll bar in the current page in the horizontal direction of the page when the page switching button is triggered.
And the second rolling distance acquisition submodule is used for acquiring the rolling distance of the scroll bar in the current page in the vertical direction of the page when the page switching button is triggered.
The first adjusting module 250 includes: a first scroll distance adjustment submodule and a second scroll distance adjustment submodule.
And the first rolling distance adjusting submodule is used for adjusting the rolling distance of the scroll bar in the target page in the page horizontal direction according to the difference between the distance between the page switching button in the target page and the first side edge of the current display area in the target page and the distance between the page switching button in the current page and the first side edge of the current display area in the current page.
And the second rolling distance adjusting submodule is used for adjusting the rolling distance of the scroll bar in the target page in the page vertical direction according to the difference between the distance between the page switching button in the target page and the second side edge of the current display area in the target page and the distance between the page switching button in the current page and the second side edge of the current display area in the current page.
In addition, the first position information includes a distance between a page switching button in the current page and a first side of a current display area in the current page and a distance between the page switching button in the current page and a second side of the current display area in the current page, where the first side is connected to the second side.
The second position information comprises a distance between a page switching button in the target page and a first side edge of a current display area in the target page and a distance between the page switching button in the target page and a second side edge of the current display area in the target page, wherein the first side edge is connected with the second side edge.
Fourth embodiment
Referring to fig. 9, fig. 9 is a block diagram of a page switching processing apparatus 300 according to a fourth embodiment of the present invention, configured to execute the page switching processing method according to the second embodiment, where the apparatus specifically includes:
a fourth obtaining module 310, configured to obtain a switching instruction triggered by a page switching button in a page.
A fifth obtaining module 320, configured to obtain first position information of a current display area of the page switching button in the page when the page switching button is triggered, and a scroll distance of a scroll bar in the page.
An updating module 330, configured to update the content of the corresponding display area in the page according to the switching instruction.
A sixth obtaining module 340, configured to obtain second position information of the page switching button in the current display area in the page after the content of the display area is updated.
A second adjusting module 350, configured to adjust a scrolling distance of a scrolling bar in the page after switching according to the first position information, the second position information, and the scrolling distance, so that a page switching button in a current display area of the page before switching is located at the same position as a page switching button in the current display area of the page after switching.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working process of the apparatus described above may refer to the corresponding process in the foregoing method, and will not be described in too much detail herein.
To sum up, embodiments of the present invention provide a page switching processing method, an apparatus, a user terminal, and a readable storage medium, where a page switching instruction triggered by a page switching button in a current page is first obtained, first position information of a current display area of the page switching button in the current page and a rolling distance of a scroll bar in the current page when the page switching button is triggered are then obtained, the current page is then switched to a target page according to the page switching instruction, and second position information of the page switching button in the current display area in the target page is then obtained, so that the rolling distance of the scroll bar in the target page is adjusted according to the first position information, the second position information, and the rolling distance, so that a page switching button in the current display area in the current page and a page switching button in the current display area in the target page are enabled to have different scrolling distances from each other The position is the same, namely the position of the page switching button can not be changed, so that the position of the page switching button relative to the finger of the user can not be changed, the user can not move the finger when switching the page, and the convenience of the user in page switching operation is improved.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes. It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (15)

1. A page switch processing method, wherein each page includes a page switch button, the method comprising:
acquiring a page switching instruction triggered by a page switching button in a current page;
acquiring first position information of a current display area of the page switching button in the current page and a rolling distance of a scroll bar in the current page when the page switching button is triggered;
switching the current page to a target page according to the page switching instruction;
acquiring second position information of a page switching button of a current display area in the target page;
and adjusting the rolling distance of a rolling bar in the target page according to the first position information, the second position information and the rolling distance so as to enable the position of a page switching button of the current display area in the current page to be the same as the position of a page switching button of the current display area in the target page.
2. The method of claim 1, wherein obtaining a scroll distance of a scroll bar in the current page when the page switch button is triggered comprises:
acquiring the scrolling distance of a scroll bar in the current page in the horizontal direction of the page when the page switching button is triggered;
and acquiring the scrolling distance of the scroll bar in the current page in the vertical direction of the page when the page switching button is triggered.
3. The method of claim 2, wherein the first position information comprises a distance between a page switch button in the current page and a first side of a current display area in the current page, and a distance between the page switch button in the current page and a second side of the current display area in the current page, wherein the first side is connected to the second side.
4. The method of claim 3, wherein the second position information comprises a distance between a page switch button in the destination page and a first side of a currently displayed area in the destination page, and a distance between the page switch button in the destination page and a second side of the currently displayed area in the destination page, wherein the first side is connected to the second side.
5. The method of claim 4, wherein adjusting the scroll distance of the scroll bar in the target page according to the first position information, the second position information and the scroll distance so that the page switch button of the current display area in the current page is located at the same position as the page switch button of the current display area in the target page comprises:
adjusting the scrolling distance of a scroll bar in the target page in the page horizontal direction according to the distance between a page switching button in the target page and the first side edge of the current display area in the target page and the difference between the distance between the page switching button in the current page and the first side edge of the current display area in the current page;
and adjusting the scrolling distance of the scroll bar in the target page in the page vertical direction according to the distance between the page switching button in the target page and the second side edge of the current display area in the target page and the difference between the distance between the page switching button in the current page and the second side edge of the current display area in the current page.
6. A page switching processing method is characterized by comprising the following steps:
acquiring a switching instruction triggered by a page switching button in a page;
acquiring first position information of a current display area of the page switching button in the page and a rolling distance of a scroll bar in the page when the page switching button is triggered;
updating the content of the corresponding display area in the page according to the switching instruction;
acquiring second position information of the page switching button of the current display area in the page after the content of the display area is updated;
and adjusting the scroll distance of a scroll bar in the page after switching according to the first position information, the second position information and the scroll distance so as to enable the position of a page switching button of the current display area in the page before switching to be the same as the position of a page switching button of the current display area in the page after switching.
7. A page switch processing apparatus, wherein each page includes a page switch button, the apparatus comprising:
the first acquisition module is used for acquiring a page switching instruction triggered by a page switching button in a current page;
the second obtaining module is used for obtaining first position information of a current display area of the page switching button in the current page and a rolling distance of a scroll bar in the current page when the page switching button is triggered;
the switching module is used for switching the current page to a target page according to the page switching instruction;
the third acquisition module is used for acquiring second position information of a page switching button of a current display area in the target page;
and the first adjusting module is used for adjusting the scrolling distance of the scroll bar in the target page according to the first position information, the second position information and the scrolling distance so as to enable the position of the page switching button of the current display area in the current page to be the same as the position of the page switching button of the current display area in the target page.
8. The apparatus of claim 7, wherein the second obtaining module comprises:
a first scroll distance obtaining sub-module, configured to obtain a scroll distance of a scroll bar in the current page in a page horizontal direction when the page switching button is triggered;
and the second rolling distance acquisition submodule is used for acquiring the rolling distance of the scroll bar in the current page in the vertical direction of the page when the page switching button is triggered.
9. The apparatus of claim 8, wherein the first position information comprises a distance between a page switch button in the current page and a first side of a current display area in the current page, and a distance between the page switch button in the current page and a second side of the current display area in the current page, wherein the first side is connected to the second side.
10. The apparatus of claim 9, wherein the second position information comprises a distance between a page switch button in the destination page and a first side of a current display area in the destination page, and a distance between the page switch button in the destination page and a second side of the current display area in the destination page, wherein the first side is connected to the second side.
11. The apparatus of claim 10, wherein the first adjusting module comprises:
a first scroll distance adjusting submodule, configured to adjust a scroll distance of a scroll bar in the target page in a page horizontal direction according to a difference between a distance between a page switching button in the target page and a first side of a current display area in the target page and a distance between the page switching button in the current page and the first side of the current display area in the current page;
and the second rolling distance adjusting submodule is used for adjusting the rolling distance of the scroll bar in the target page in the page vertical direction according to the difference between the distance between the page switching button in the target page and the second side edge of the current display area in the target page and the distance between the page switching button in the current page and the second side edge of the current display area in the current page.
12. A page switch processing apparatus, characterized in that the apparatus comprises:
the fourth acquisition module is used for acquiring a switching instruction triggered by a page switching button in a page;
a fifth obtaining module, configured to obtain first position information of the page switching button in a current display area of the page when the page switching button is triggered, and a scroll distance of a scroll bar in the page;
the updating module is used for updating the content of the corresponding display area in the page according to the switching instruction;
a sixth obtaining module, configured to obtain second position information, in the page, of the page switching button in the current display area in the page after updating the content of the display area;
and the second adjusting module is used for adjusting the scrolling distance of the scrolling bar in the page after switching according to the first position information, the second position information and the scrolling distance, so that the position of a page switching button in the current display area in the page before switching is the same as the position of a page switching button in the current display area in the page after switching.
13. A user terminal, characterized in that the user terminal comprises a processor and a memory coupled to the processor, the memory storing instructions adapted to perform a page-switching processing method, each page comprising a page-switching button, the user terminal performing the following when the instructions are executed by the processor:
acquiring a page switching instruction triggered by a page switching button in a current page;
acquiring first position information of a current display area of the page switching button in the current page and a rolling distance of a scroll bar in the current page when the page switching button is triggered;
switching the current page to a target page according to the page switching instruction;
acquiring second position information of a page switching button of a current display area in the target page;
and adjusting the rolling distance of a rolling bar in the target page according to the first position information, the second position information and the rolling distance so as to enable the position of a page switching button of the current display area in the current page to be the same as the position of a page switching button of the current display area in the target page.
14. A user terminal, characterized in that the user terminal comprises a processor and a memory coupled to the processor, the memory storing instructions that, when executed by the processor, the user terminal performs the following:
acquiring a switching instruction triggered by a page switching button in a page;
acquiring first position information of a current display area of the page switching button in the page and a rolling distance of a scroll bar in the page when the page switching button is triggered;
updating the content of the corresponding display area in the page according to the switching instruction;
acquiring second position information of the page switching button of the current display area in the page after the content of the display area is updated;
and adjusting the scroll distance of a scroll bar in the page after switching according to the first position information, the second position information and the scroll distance so as to enable the position of a page switching button of the current display area in the page before switching to be the same as the position of a page switching button of the current display area in the page after switching.
15. A readable storage medium stored in a computer, the readable storage medium comprising a plurality of instructions configured to cause the computer to perform the method of any one of claims 1-5.
CN201710442182.1A 2017-06-12 2017-06-12 Page switching processing method and device, user terminal and readable storage medium Expired - Fee Related CN107256116B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710442182.1A CN107256116B (en) 2017-06-12 2017-06-12 Page switching processing method and device, user terminal and readable storage medium
PCT/CN2018/090685 WO2018228341A1 (en) 2017-06-12 2018-06-11 Page switching processing method and apparatus, user terminal, and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710442182.1A CN107256116B (en) 2017-06-12 2017-06-12 Page switching processing method and device, user terminal and readable storage medium

Publications (2)

Publication Number Publication Date
CN107256116A CN107256116A (en) 2017-10-17
CN107256116B true CN107256116B (en) 2020-03-17

Family

ID=60024018

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710442182.1A Expired - Fee Related CN107256116B (en) 2017-06-12 2017-06-12 Page switching processing method and device, user terminal and readable storage medium

Country Status (2)

Country Link
CN (1) CN107256116B (en)
WO (1) WO2018228341A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107256116B (en) * 2017-06-12 2020-03-17 广州神马移动信息科技有限公司 Page switching processing method and device, user terminal and readable storage medium
CN108089804A (en) * 2017-12-26 2018-05-29 深圳市宝尔爱迪科技有限公司 A kind of electronic equipment and Android platform are across the method using page turning
CN111199136B (en) * 2018-10-30 2024-03-19 北京金山办公软件股份有限公司 Document content display method, device and equipment
CN111506842A (en) * 2019-01-31 2020-08-07 阿里巴巴集团控股有限公司 Page display method and device, electronic equipment and computer storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105843485A (en) * 2016-04-13 2016-08-10 珠海市魅族科技有限公司 Page display method and device
CN106201234A (en) * 2015-04-29 2016-12-07 阿里巴巴集团控股有限公司 The inspection method of content of pages and device
CN106610765A (en) * 2015-10-26 2017-05-03 网易(杭州)网络有限公司 Switching method and device for keeping button positions relatively fixed, mobile client and computer client

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100198697A1 (en) * 2006-07-21 2010-08-05 Videoegg, Inc. Fixed Position Interactive Advertising
CN106503041B (en) * 2016-09-19 2019-11-15 曙光信息产业(北京)有限公司 Page layout self-adaptive method and system
CN107256116B (en) * 2017-06-12 2020-03-17 广州神马移动信息科技有限公司 Page switching processing method and device, user terminal and readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106201234A (en) * 2015-04-29 2016-12-07 阿里巴巴集团控股有限公司 The inspection method of content of pages and device
CN106610765A (en) * 2015-10-26 2017-05-03 网易(杭州)网络有限公司 Switching method and device for keeping button positions relatively fixed, mobile client and computer client
CN105843485A (en) * 2016-04-13 2016-08-10 珠海市魅族科技有限公司 Page display method and device

Also Published As

Publication number Publication date
WO2018228341A1 (en) 2018-12-20
CN107256116A (en) 2017-10-17

Similar Documents

Publication Publication Date Title
CN107256116B (en) Page switching processing method and device, user terminal and readable storage medium
CN109753326B (en) Processing method, device, equipment and machine readable medium
CN107783714B (en) Page display method and device, electronic equipment and storage medium
CN107391117B (en) Split screen processing method and device for light application and electronic device
CN108628510B (en) Content display method and device, electronic equipment and readable storage medium
CN109062653B (en) Long image-text information display method, computer device and computer readable storage medium
EP3425581A1 (en) Information display method and device
CN109508128B (en) Search control display method, device and equipment and computer readable storage medium
US10228835B2 (en) Method for displaying information, and terminal equipment
WO2019085820A1 (en) Processing method, device, apparatus, and machine-readable medium
CN110825997B (en) Information flow page display method, device, terminal equipment and system
CN110769300B (en) Method and equipment for presenting horizontal screen video in information stream
US20120221969A1 (en) Scrollable list navigation using persistent headings
CN102855124A (en) Method and device for adjusting navigation bar in self-adaptive manner on browser and browser
US10757241B2 (en) Method and system for dynamically changing a header space in a graphical user interface
US20180275838A1 (en) Method, device and browser for presenting recommended news, and electronic device
CN103517149A (en) Homepage design method of smart television based on android platform
US20160196240A1 (en) Method of displaying content and electronic device implementing same
JP2017162212A (en) Information processing device, information processing method, and program
US20150234576A1 (en) Method and apparatus for displaying information and electronic device adapted to the method
CN110262749A (en) A kind of web page operation method, apparatus, container, equipment and medium
WO2019085810A1 (en) Processing method, device, apparatus, and machine-readable medium
US10747943B2 (en) Method, device, client apparatus, and electronic device for presenting webpages
CN107239212B (en) Method and device for presenting segmentation selection view and user terminal
CN110647704A (en) Page updating method, device and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20200422

Address after: 310052 room 508, floor 5, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Alibaba (China) Co.,Ltd.

Address before: 510627 Guangdong city of Guangzhou province Whampoa Tianhe District Road No. 163 Xiping Yun Lu Yun Ping square B radio tower 12 layer self unit 01

Patentee before: GUANGZHOU SHENMA MOBILE INFORMATION TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200317

Termination date: 20200612

CF01 Termination of patent right due to non-payment of annual fee