WO2018228341A1 - 页面切换处理方法、装置、用户终端及可读取存储介质 - Google Patents

页面切换处理方法、装置、用户终端及可读取存储介质 Download PDF

Info

Publication number
WO2018228341A1
WO2018228341A1 PCT/CN2018/090685 CN2018090685W WO2018228341A1 WO 2018228341 A1 WO2018228341 A1 WO 2018228341A1 CN 2018090685 W CN2018090685 W CN 2018090685W WO 2018228341 A1 WO2018228341 A1 WO 2018228341A1
Authority
WO
WIPO (PCT)
Prior art keywords
page
current
target
distance
switching button
Prior art date
Application number
PCT/CN2018/090685
Other languages
English (en)
French (fr)
Inventor
熊正祥
Original Assignee
广州神马移动信息科技有限公司
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 广州神马移动信息科技有限公司 filed Critical 广州神马移动信息科技有限公司
Publication of WO2018228341A1 publication Critical patent/WO2018228341A1/zh

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

Definitions

  • the present invention relates to the field of data processing, and in particular to a page switching processing method and apparatus, a user terminal, and a readable storage medium.
  • the design form of switching content with multiple pages and multiple tabs has become a common design method.
  • the previous page, the next page or the tab1 and tab2 buttons are used to switch the content.
  • this situation may cause the position of the toggle button to change, so that if the user wants to continue to operate the switch button, he has to move the finger position to reach the new one.
  • the position of the button can be operated to affect the smoothness of the operation.
  • an object of the embodiments of the present invention is to provide a page switching processing method, apparatus, user terminal, and readable storage medium to improve the above problem.
  • an embodiment of the present invention provides a page switching processing method, where the method includes: acquiring a page switching instruction triggered by a page switching button in a current page; and acquiring the page switching when the page switching button is triggered a first position information of the current display area of the button in the current page and a current scroll distance of the scroll bar in the current page; switching the current page to the target page according to the page switching instruction; acquiring the target page Adjusting the second position information of the page switching button of the current display area in the target page; adjusting the scroll bar in the target page according to the first location information, the second location information, and the current scrolling distance
  • the target scrolling distance is such that the position of the page switching button on the current display area of the target page is the same as the first location information.
  • 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; and acquiring the page switching button when the page switching button is triggered The first location information of the current display area in the page and the current scrolling distance of the scroll bar in the page; updating the content of the corresponding display area in the page according to the switching instruction; acquiring the display area The second location information of the page switching button of the current display area in the page after the content is updated in the page; according to the first location information, the second location information, and the current scrolling distance, Adjusting a target scrolling distance of the scroll bar in the page after the switching, so that the position of the page switching button of the current region in the page after the switching is the same as the first location information.
  • an embodiment of the present invention provides a page switching processing apparatus, where the apparatus includes: a first acquiring module, configured to acquire a page switching instruction triggered by a page switching button in a current page; and a second acquiring module, And acquiring, by the page switching button, first position information of a current display area in the current page and a current scrolling distance of a scroll bar in the current page when the page switching button is triggered; and a switching module, configured to The page switching instruction switches the current page to the target page; the third obtaining module is configured to acquire second location information of the page switching button of the current display area in the target page in the target page; the first adjustment module And adjusting a target scroll distance of the scroll bar in the target page according to the first location information, the second location information, and the current scroll distance, so that the page switch button is on the target page.
  • the position of the current display area is the same as the first location information.
  • the embodiment of the present invention provides a page switching processing apparatus, where the apparatus includes: a fourth acquiring module, configured to acquire a switching instruction triggered by a page switching button in a page; and a fifth acquiring module, configured to acquire The first position information of the current display area of the page switching button in the page and the current scrolling distance of the scroll bar in the page when the page switching button is triggered; the updating module is configured to be used according to the switching instruction The content of the corresponding display area in the page is updated; the sixth obtaining module is configured to acquire the page switching button of the current display area in the page after the content of the display area is updated in the page.
  • a second adjustment module configured to adjust, according to the first location information, the second location information, and the current scrolling distance, a target scrolling distance of the scroll bar in the page after the switching, The position of the page switching button of the current area in the page after the switching is made the same as the first location information.
  • an embodiment of the present invention provides a user terminal, where the user terminal includes a processor and a memory, and further includes a computer program; wherein the computer program is stored in the memory and configured to be configured by the processor Executing to implement the page switching processing method as described in the first aspect.
  • an embodiment of the present invention provides a user terminal, where the user terminal includes a processor and a memory, and further includes a computer program; wherein the computer program is stored in the memory and configured to be processed by the The program is executed to implement the page switching processing method as described in the second aspect.
  • an embodiment of the present invention provides a readable storage medium, where the readable storage medium is stored in a computer, the readable storage medium includes a plurality of instructions, and the multiple instructions are configured to The computer is caused to execute the page switching processing method.
  • the embodiment of the invention provides a page switching processing method and device, a user terminal and a readable storage medium, which first acquires a page switching instruction triggered by a page switching button in a current page, and then acquires when the page switching button is triggered. Determining, by the page switching button, first position information of a current display area in the current page and a current scrolling distance of a scroll bar in the current page, and then switching the current page to a target page according to the page switching instruction, and then Obtaining second location information of the page switching button of the current display area in the target page in the target page, thereby adjusting the according to the first location information, the second location information, and the current scrolling distance a target scrolling distance of the scroll bar in the target page, so that the position of the page switching button in the current display area of the target page is the same as the first position information, that is, the position of the page switching button relative to the current display area is not Changed, so that the position of the page switch button relative to the user's finger is not issued.
  • FIG. 1 is a structural 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 diagram 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 diagram 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 diagram 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 diagram 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 structural block diagram of a page switching processing apparatus according to a third embodiment of the present invention.
  • FIG. 9 is a structural block diagram of a page switching processing apparatus according to a fourth embodiment of the present invention.
  • FIG. 1 shows a block diagram of a structure of a user terminal 100 that can be applied to an embodiment of the present invention.
  • the user terminal 100 includes a memory 101, a memory controller 102, one or more (only one shown) processor 103, a peripheral interface 104, a radio frequency module 105, an audio module 106, and a touch screen. 107 and so on. These components communicate with one another via one or more communication bus/signal lines 108.
  • the memory 101 can be used to store software programs and modules, such as a page switching processing method and a program instruction/module corresponding to the device in the embodiment of the present invention, and the processor 103 executes various programs by running software programs and modules stored in the memory 101.
  • Functional application and data processing such as the page switching processing method provided by the embodiment of the present invention.
  • Memory 101 can include high speed random access memory and can 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 other possible components can be performed under the control of the memory controller 102.
  • 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 other possible components can be performed under the control of the memory controller 102.
  • Peripheral interface 104 couples various input/input devices to processor 103 and memory 101.
  • peripheral interface 104, processor 103, and memory controller 102 can be implemented in a single chip. In other instances, they can be implemented by separate chips.
  • the radio frequency module 105 is configured to receive and transmit electromagnetic waves, and realize mutual conversion between electromagnetic waves and electric signals, thereby communicating with a communication network or other devices.
  • the audio module 106 provides an audio interface to the user, which may include one or more microphones, one or more speakers, and audio circuitry.
  • the touch screen 107 simultaneously provides an output and input interface between the user terminal 100 and the user. Specifically, the touch screen 107 displays video output to the user, and the content of the video output may include text, graphics, video, and any combination thereof.
  • FIG. 1 is merely illustrative, and the user terminal 100 may further include more or less components than those shown in FIG. 1, or have a different configuration from that shown in FIG. 1.
  • the components shown in Figure 1 can be implemented in hardware, software, or a combination thereof.
  • the client terminal 100 is installed with a client, and the client may be a browser or a third-party application software, and corresponds to a server (Server) to provide services for the user, such as an e-book reading service. For playing local documents or e-books.
  • a server Server
  • FIG. 2 is a flowchart of a method for processing a page switching according to a first embodiment of the present invention, where the method specifically includes the following steps:
  • Step S110 Acquire a page switching instruction triggered by the page switching button in the current page.
  • the page switching can be performed by clicking the page switching button in the page, the user terminal. Then, the page switching instruction triggered by the user through the page switching button in the current page may be obtained, where the current page refers to the page currently browsed by the user.
  • Step S120 Acquire first position information of the current display area of the page switching button in the current page when the page switching button is triggered, and a current scrolling distance of the scroll bar in the current page.
  • the user terminal acquires the first location information of the current display area of the page switching button in the current page when the page switching button is triggered by the user, where the current display area It can be understood as the part displayed in the terminal display interface, that is, the interface area that the user can see in the current page.
  • the first location information includes a first current 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 page switch button in the current page. a second current distance from a second side of the current display area in the current page, wherein the first side is connected to the second side, for example, the first side may be the left side of the current display area The second side may be the top edge of the current display area.
  • pos1.left can be obtained by alert(box.getBoundingClientRect().left), which indicates the distance between the left side of the rectangle element and the left side of the current display area; pos1.top can pass alert(box.getBoundingClientRect(). Top) obtaining, indicating the distance between the top edge of the rectangular element and the top edge of the current display area, so that the distance between the page switching button and the two sides of the current display area in the current page is obtained.
  • the first location information of the current display area in the current page when the page switching button is triggered may be acquired by the page switching button.
  • the user terminal When the user triggers the page switching button, the user terminal also needs to acquire the current scrolling distance of the scroll bar in the current page, where the current scrolling distance includes the scroll bar in the current page in the horizontal direction of the page when the page switching button is triggered.
  • Step S130 Switch the current page to the target page according to the page switching instruction.
  • the user terminal After acquiring the page switching instruction triggered by the user in the current page by the page switching button, the user terminal switches the current page to the target page according to the page switching instruction, that is, switching the upper page from the current page, or switching the page. .
  • Step S140 Acquire second position information of the page switching button of the current display area in the target page in the target page.
  • the current display page is the target page
  • the second location information of the page switching button of the current display area in the target page is obtained in the target page
  • the second location information includes the target page.
  • a first target distance between the page switch button and the first side of the current display area in the target page, and a page switch button in the target page and a second side of the current display area in the target page a second target distance, wherein the first side is connected to the second side
  • the method for obtaining the second location information refers to the method for obtaining the first location information in step S120, for the sake of simplicity of description No more details here.
  • Step S150 Adjust a target scroll distance of the scroll bar in the target page according to the first location information, the second location information, and the current scroll distance, so that the page switch button is on the target page.
  • the position of the current display area is the same as the first location information.
  • the first location information of the current display area of the page switching button in the current page in the current page, and the second location information of the current display area of the page switching button in the target page in the target page, and the current page are obtained.
  • the target scrolling distance of the scroll bar in the target page needs to be adjusted, so that the current The page switching button of the current display area in the page is the same as the position of the page switching button of the current area in the target page, as shown in FIGS. 3 and 4.
  • the first target distance between the page switching button in the target page and the first side of the current display area in the target page may be determined, and the page switching button and the current page in the current page may be determined.
  • the first side may be the left side of the current display area in the current page
  • pos2.left represents the page switching button of the current display area in the target page and the current
  • a first target distance of the first side of the display area the first side may be the left side of the current display area in the target page.
  • windowScrollXStart is the first current scrolling distance.
  • a second target distance between the page switching button in the target page and the second side of the current display area in the target page, and a page switching button in the current page and a current display area in the current page a second difference of the second current distance of the second side, adjusting a second target scroll distance of the scroll bar in the target page in the vertical direction of the page, that is, the scroll bar in the target page is vertical on the page
  • the second current distance, the first side edge may be the top edge of the current display area in the current page, and pos2.top represents the second target distance of the page switch button of the current display area in the target page and the first side of the current display area The first side can be the top edge of the currently displayed area in the target page.
  • windowScrollYStart is the second current scrolling distance.
  • a page switching processing method after switching the current page to the target page, by adjusting the scrolling distance of the scroll bar in the target page, the page switching button and the target of the current display area in the current page are
  • the position of the page switching button in the current area of the page is the same, that is, the position of the page switching button relative to the display area does not change, and the position of the page switching button relative to the user's finger does not change, so that the user can perform page switching. There is no need to move the position of the finger, which improves the convenience of the user to perform page switching operations.
  • FIG. 5 is a flowchart of a method for processing a page switching according to a second embodiment of the present invention. The method specifically includes the following steps:
  • Step S210 Acquire a switching instruction triggered by the page switching button in the page.
  • the page switching can be performed by clicking the page switching button in the page, and the user terminal can obtain the user triggering through the page switching button in the page. Page switching instructions.
  • Step S220 Acquire first position information of the current display area of the page switching button in the page when the page switching button is triggered, and a current scrolling distance of the scroll bar in the page.
  • step S120 The specific implementation of the step is the same as the specific implementation in the foregoing step S120. For the sake of brevity of the description, refer to the specific implementation in step S120, and details are not described herein again.
  • Step S230 Update the content of the corresponding display area in the page according to the switching instruction.
  • the user terminal may update the content of the corresponding display area in the page according to the switching instruction, that is, update the content of an area in the page, for example, by triggering the page switching button.
  • the content of an area in the page is paged up or down, such as the content shown in the content column of FIG. 6.
  • Step S240 Acquire second location information of the page switching button of the current display area in the page in the page after the content of the display area is updated.
  • step S120 After the content of the display area in the page is updated, the second location information of the page switching button in the updated page is obtained, and the method for obtaining the second location information is consistent with the method for acquiring the first location information of the page switching button before the page is updated.
  • the specific description in step S120 For a specific implementation process, reference may be made to the specific description in step S120.
  • Step S250 Adjust, according to the first location information, the second location information, and the current scrolling distance, a target scrolling distance of the scroll bar in the switched page, so that the current page in the switched page is The position of the page switching button of the area is the same as the first location information.
  • step S150 For a specific implementation of the step, reference may be made to the specific description of the foregoing step S150, and details are not described herein.
  • a page switching processing method by triggering a page switching button in a page to update a content of a corresponding display area in the page, and adjusting a target scrolling distance of the scroll bar in the page after switching, so that the switching is performed.
  • the page switching button of the current display area in the previous page is the same as the position of the page switching button of the current area in the page after switching, that is, the position of the page switching button does not change with respect to the current display area, and the page switching button is implemented relative to the user finger. The position does not change, so that the user can move the position of the finger without switching, which improves the convenience of the user to perform the page switching operation.
  • FIG. 8 is a structural block diagram of a page switching processing apparatus 200 according to a third embodiment of the present invention, which is used to perform the page switching processing method in the first embodiment, where the apparatus specifically includes:
  • the first obtaining module 210 is configured to acquire a page switching instruction triggered by the page switching button in the current page.
  • the second obtaining module 220 is configured to acquire first position information of the current display area of the page switching button in the current page when the page switching button is triggered, and a current scrolling distance of the scroll bar in the current page.
  • the switching module 230 is configured to switch the current page to the target page according to the page switching instruction.
  • the third obtaining module 240 is configured to acquire second location information of the page switching button of the current display area in the target page in the target page.
  • the first adjustment module 250 is configured to adjust a target scroll distance of the scroll bar in the target page according to the first location information, the second location information, and the current scroll distance, so that the page switching button The location of the current display area of the target page is the same as the first location information.
  • the second obtaining module 220 includes: a first scroll distance acquisition submodule and a second scroll distance acquisition submodule.
  • a first scrolling distance obtaining sub-module configured to acquire a first current scrolling distance of the scroll bar in the current page in the horizontal direction of the page when the page switching button is triggered.
  • a second scrolling distance obtaining sub-module configured to acquire a second current 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 first adjustment module 250 includes: a first scroll distance adjustment submodule and a second scroll distance adjustment submodule.
  • a first scroll distance adjustment submodule configured to determine a first difference between the first target distance and the first current distance, and adjust the target according to the first difference, the first current scroll distance The first target scroll distance of the scroll bar in the page in the horizontal direction of the page.
  • a second scroll distance adjustment submodule configured to determine a second difference between the second target distance and the second current distance, and adjust the target according to the second difference, the second current scroll distance The second target scroll distance of the scroll bar in the page in the vertical direction of the page.
  • the first location 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 page switching button in the current page and the current page. The distance of the second side of the display area, wherein the first side is connected to the second side.
  • the second location information includes 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 page switching button in the target page and a current display in the target page. a distance of the second side of the region, wherein the first side is coupled to the second side.
  • FIG. 9 is a structural block diagram of a page switching processing apparatus 300 according to a fourth embodiment of the present invention, which is used to perform the page switching processing method of the second embodiment, where the apparatus specifically includes:
  • the fourth obtaining module 310 is configured to acquire a switching instruction triggered by the page switching button in the page.
  • the fifth obtaining module 320 is configured to acquire first position information of the current display area of the page switching button in the page when the page switching button is triggered, and a current scrolling distance of the scroll bar in the page.
  • the updating module 330 is configured to update content of a corresponding display area in the page according to the switching instruction.
  • the sixth obtaining module 340 is configured to acquire second location information of the page switching button of the current display area in the page in the page after the content of the display area is updated.
  • the second adjustment module 350 is configured to adjust, according to the first location information, the second location information, and the current scrolling distance, a target scrolling distance of the scroll bar in the page after the switching, so that the switched The position of the page switching button of the current area in the page is the same as the first location information.
  • the embodiment further provides a user terminal, including a processor and a memory, and further comprising a computer program;
  • the computer program is stored in the memory and configured to be executed by the processor to implement the method as described in the first embodiment.
  • This embodiment further provides another user terminal, including a processor and a memory, and further includes a computer program;
  • the embodiment of the present invention provides a page switching processing method and apparatus, a user terminal, and a readable storage medium, which first acquires a page switching instruction triggered by a page switching button in a current page, and then acquires the page switching.
  • the page switching button is in the current page, the first position information of the current display area and the scrolling distance of the scroll bar in the current page, and then the current page is switched according to the page switching instruction to And acquiring, by the target page, second location information of the page switching button of the current display area in the target page in the target page, so that, according to the first location information, the second location information, and the scrolling distance, Adjusting a scrolling distance of the scroll bar in the target page, so that the page switching button of the current display area in the current page is the same as the position of the page switching button of the current area in the target page, that is, the position of the page switching button is not Will change, the position of the page toggle button does not change relative to the user's finger. Therefore,
  • each block of the flowchart or block diagram can represent a module, a program segment, or a portion of code that includes one or more of the Executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks may also occur in a different order than those illustrated in the drawings.
  • each block of the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts can be implemented in a dedicated hardware-based system that performs the specified function or function. Or it can be implemented by a combination of dedicated hardware and computer instructions.
  • each functional module in each embodiment of the present invention may be integrated to form a separate part, or each module may exist separately, or two or more modules may be integrated to form a separate part.
  • the functions, if implemented in the form of software functional modules and sold or used as separate products, may be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product, which is stored in a storage medium, including
  • the instructions are used to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

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

本发明实施例提供了一种页面切换处理方法、装置、用户终端及可读取存储介质,属于数据处理领域。所述方法包括:获取在当前页面中通过页面切换按钮触发的页面切换指令;获取页面切换按钮被触发时页面切换按钮在所述当前页面中当前显示区域的第一位置信息以及当前页面中的滚动条的当前滚动距离;根据页面切换指令将所述当前页面切换至目标页面;获取目标页面中当前显示区域的页面切换按钮的第二位置信息;根据第一位置信息、第二位置信息以及当前滚动距离,调整目标页面中的滚动条的目标滚动距离;实现了该页面切换按钮相对用户手指的位置不发生改变,从而用户在进行页面切换时可以不用再挪动手指的位置了,提高了用户进行页面切换操作的便捷性。

Description

页面切换处理方法、装置、用户终端及可读取存储介质 技术领域
本发明涉及数据处理领域,具体而言,涉及一种页面切换处理方法、装置、用户终端及可读取存储介质。
背景技术
随着页面内容承载得越来越多,以多页卡多tab来切换内容的设计形式也成为常用的设计方式,这里会采用上一页、下一页或者tab1、tab2按钮来切换内容。当多个页卡和多个tab的内容长度不一样时,而这种情况可能会导致切换按钮的位置发生变化,这样用户如果还想继续操作切换按钮的时候,还得移动手指位置,到达新的按钮位置,才能进行操作,影响了操作的流畅性。
发明内容
有鉴于此,本发明实施例的目的在于提供一种页面切换处理方法、装置、用户终端及可读取存储介质,以改善上述问题。
第一方面,本发明实施例提供了一种页面切换处理方法,所述方法包括:获取在当前页面中通过页面切换按钮触发的页面切换指令;获取所述页面切换按钮被触发时所述页面切换按钮在所述当前页面中当前显示区域的第一位置信息以及所述当前页面中的滚动条的当前滚动距离;根据所述页面切换指令将所述当前页面切换至目标页面;获取所述目标页面中当前显示区域的页面切换按钮在所述目标页面中的第二位置信息;根据所述第一位置信息、所述第二位置信息以及所述当前滚动距离,调整所述目标页面中的滚动条的目标滚动距离,以使所述页面切换按钮在所述目标页面当前显示区域的位置与所述第一位置信息相同。
第二方面,本发明实施例提供了一种页面切换处理方法,所述方法包括:获取在页面中通过页面切换按钮触发的切换指令;获取所述页面切换按钮被触发时所述页面切换按钮在所述页面中当前显示区域的第一位置 信息以及所述页面中的滚动条的当前滚动距离;根据所述切换指令将所述页面中对应的显示区域的内容进行更新;获取所述显示区域的内容进行更新后的所述页面中当前显示区域的所述页面切换按钮在所述页面中的第二位置信息;根据所述第一位置信息、所述第二位置信息以及所述当前滚动距离,调整切换后的所述页面中的滚动条的目标滚动距离,以使切换后的所述页面中当前区域的页面切换按钮的位置与所述第一位置信息相同。
第三方面,本发明实施例提供了一种页面切换处理装置,所述装置包括:第一获取模块,用于获取在当前页面中通过页面切换按钮触发的页面切换指令;第二获取模块,用于获取所述页面切换按钮被触发时所述页面切换按钮在所述当前页面中当前显示区域的第一位置信息以及所述当前页面中的滚动条的当前滚动距离;切换模块,用于根据所述页面切换指令将所述当前页面切换至目标页面;第三获取模块,用于获取所述目标页面中当前显示区域的页面切换按钮在所述目标页面中的第二位置信息;第一调整模块,用于根据所述第一位置信息、所述第二位置信息以及所述当前滚动距离,调整所述目标页面中的滚动条的目标滚动距离,以使所述页面切换按钮在所述目标页面当前显示区域的位置与所述第一位置信息相同。
第四方面,本发明实施例提供了一种页面切换处理装置,所述装置包括:第四获取模块,用于获取在页面中通过页面切换按钮触发的切换指令;第五获取模块,用于获取所述页面切换按钮被触发时所述页面切换按钮在所述页面中当前显示区域的第一位置信息以及所述页面中的滚动条的当前滚动距离;更新模块,用于根据所述切换指令将所述页面中对应的显示区域的内容进行更新;第六获取模块,用于获取所述显示区域的内容进行更新后的所述页面中当前显示区域的所述页面切换按钮在所述页面中的第二位置信息;第二调整模块,用于根据所述第一位置信息、所述第二位置信息以及所述当前滚动距离,调整切换后的所述页面中的滚动条的目标滚动距离,以使切换后的所述页面中当前区域的页面切换按钮的位置与所述第一位置信息相同。
第五方面,本发明实施例提供一种用户终端,所述用户终端包括处理器以及存储器,还包括计算机程序;其中,所述计算机程序存储在所述存储器中,并配置为由所述处理器执行以实现如第一方面所述的页面切换处 理方法。
第六方面,本发明实施例提供了一种用户终端,所述用户终端包括处理器以及存储器,还包括计算机程序;其中,所述计算机程序存储在所述存储器中,并配置为由所述处理器执行以实现如第二方面所述的页面切换处理方法。
第七方面,本发明实施例提供了一种可读取存储介质,所述可读取存储介质存储于计算机内,所述可读取存储介质包括多条指令,所述多条指令被配置成使得计算机执行所述页面切换处理方法。
本发明实施例的有益效果是:
本发明实施例提供一种页面切换处理方法、装置、用户终端及可读取存储介质,先获取在当前页面中通过页面切换按钮触发的页面切换指令,再获取所述页面切换按钮被触发时所述页面切换按钮在所述当前页面中当前显示区域的第一位置信息以及所述当前页面中的滚动条的当前滚动距离,然后根据所述页面切换指令将所述当前页面切换至目标页面,再获取所述目标页面中当前显示区域的页面切换按钮在所述目标页面中的第二位置信息,从而根据所述第一位置信息、所述第二位置信息以及所述当前滚动距离,调整所述目标页面中的滚动条的目标滚动距离,以使所述页面切换按钮在所述目标页面当前显示区域的位置与所述第一位置信息相同,即页面切换按钮相对于当前显示区域的位置不会发生变化,从而实现了该页面切换按钮相对用户手指的位置不发生变化,使得用户在进行页面切换时不用再挪动手指的位置,提高了用户进行页面切换操作的便捷性。
本发明的其他特征和优点将在随后的说明书阐述,并且,部分地从说明书中变得显而易见,或者通过实施本发明实施例了解。本发明的目的和其他优点可通过在所写的说明书、权利要求书、以及附图中所特别指出的结构来实现和获得。
附图说明
为了更清楚地说明本发明实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本发明的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不 付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。
图1示出了一种可应用于本发明实施例中的用户终端的结构框图;
图2为本发明第一实施例提供的一种页面切换处理方法的流程图;
图3为本发明第一实施例提供的一种页面切换处理方法的用户终端交互界面的第一示意图;
图4为本发明第一实施例提供的一种页面切换处理方法的用户终端交互界面的第二示意图;
图5为本发明第二实施例提供的一种页面切换处理方法的流程图;
图6为本发明第二实施例提供的一种页面切换处理方法的用户终端交互界面的第一示意图;
图7为本发明第二实施例提供的一种页面切换处理方法的用户终端交互界面的第二示意图;
图8为本发明第三实施例提供的一种页面切换处理装置的结构框图;
图9为本发明第四实施例提供的一种页面切换处理装置的结构框图。
具体实施方式
下面将结合本发明实施例中附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本发明实施例的组件可以以各种不同的配置来布置和设计。因此,以下对在附图中提供的本发明的实施例的详细描述并非旨在限制要求保护的本发明的范围,而是仅仅表示本发明的选定实施例。基于本发明的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本发明保护的范围。
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。同时,在本发明的描述中,术语“第一”、“第二”等仅用于区分描述,而不能理解为指示或暗示相对重要性。
图1示出了一种可应用于本发明实施例中的用户终端100的结构框图。如图1所示,用户终端100包括存储器101、存储控制器102,一个或多个(图 中仅示出一个)处理器103、外设接口104、射频模块105、音频模块106、触控屏幕107等。这些组件通过一条或多条通讯总线/信号线108相互通讯。
存储器101可用于存储软件程序以及模块,如本发明实施例中的页面切换处理方法以及装置对应的程序指令/模块,处理器103通过运行存储在存储器101内的软件程序以及模块,从而执行各种功能应用以及数据处理,如本发明实施例提供的页面切换处理方法。
存储器101可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。处理器103以及其他可能的组件对存储器101的访问可在存储控制器102的控制下进行。
外设接口104将各种输入/输入装置耦合至处理器103以及存储器101。在一些实施例中,外设接口104,处理器103以及存储控制器102可以在单个芯片中实现。在其他一些实例中,他们可以分别由独立的芯片实现。
射频模块105用于接收以及发送电磁波,实现电磁波与电信号的相互转换,从而与通讯网络或者其他设备进行通讯。
音频模块106向用户提供音频接口,其可包括一个或多个麦克风、一个或者多个扬声器以及音频电路。
触控屏幕107在用户终端100与用户之间同时提供一个输出及输入界面。具体地,触控屏幕107向用户显示视频输出,这些视频输出的内容可包括文字、图形、视频及其任意组合。
可以理解,图1所示的结构仅为示意,用户终端100还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。图1中所示的各组件可以采用硬件、软件或其组合实现。
于本发明实施例中,用户终端100中安装有客户端,该客户端可以是浏览器也可以是第三方应用软件,与服务器(Server)端相对应,为用户提供服务,例如电子书阅读服务,用于播放本地文档或者电子书。
下面将结合本发明实施例中附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本发明实施例的组件可以以各种不同的配置来布置和设计。因此,以下对在附图中提供的本发明的实施例的详细描述并非旨在限制要求保护的本发明的范围,而是仅仅表示本发 明的选定实施例。基于本发明的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本发明保护的范围。
第一实施例
请参照图2,图2为本发明第一实施例提供的一种页面切换处理方法的流程图,所述方法具体包括如下步骤:
步骤S110:获取在当前页面中通过页面切换按钮触发的页面切换指令。
请参照图3,用户在进行页面浏览时,若需要进行页面切换,例如,切换到上一页或者下一页,或者跳页,可以通过点击页面中的页面切换按钮来进行页面切换,用户终端则可以获取用户在当前页面中通过页面切换按钮触发的页面切换指令,其中,当前页面是指用户当前浏览的页面。
步骤S120:获取所述页面切换按钮被触发时所述页面切换按钮在所述当前页面中当前显示区域的第一位置信息以及所述当前页面中的滚动条的当前滚动距离。
用户在当前页面中点击页面切换按钮进行页面切换时,用户终端获取该页面切换按钮被用户触发时所述页面切换按钮在所述当前页面中当前显示区域的第一位置信息,其中,当前显示区域可以理解为终端显示界面中所展示的部分,即当前页面中用户可以看到的界面区域。作为一种方式,该第一位置信息包括所述当前页面中的页面切换按钮与所述当前页面中当前显示区域的第一侧边的第一当前距离,以及所述当前页面中的页面切换按钮与所述当前页面中当前显示区域的第二侧边的第二当前距离,其中,所述第一侧边与所述第二侧边相连,例如,第一侧边可以是当前显示区域的左边,第二侧边可以是当前显示区域的顶边。
其中,所述第一位置信息可表示为pos1,可通过pos1=domElement.getBoundingClientRect()进行获取,所述第一当前距离可以表示为pos1.left,所述第二当前距离可以表示为pos1.top。在实际应用过程中,若把所述页面切换按钮看成一个矩形的元素,该矩形元素包含四个属性:left、top、righr和bottom,分别表示该矩形元素各边与当前显示区域两个相连的侧边的距离,若第一侧边为图3中当前显示区域的左边,第二侧边为图3中当前显示区域的顶边,通过var box=document.getElementById('box')获取该矩形元素后,则pos1.left可以通过alert(box.getBoundingClientRect().left)获取,表示的是该矩 形元素左边与当前显示区域左边的距离;pos1.top可以通过alert(box.getBoundingClientRect().top)获取,表示的是该矩形元素顶边与当前显示区域的顶边的距离,所以即通过获取了所述页面切换按钮与所述当前页面中当前显示区域的相连两个侧边的距离就可以获取所述页面切换按钮在该页面切换按钮被触发时在所述当前页面中当前显示区域的第一位置信息。
在用户触发页面切换按钮时,用户终端还需获取当前页面中的滚动条的当前滚动距离,该当前滚动距离包括所述页面切换按钮被触发时,所述当前页面中的滚动条在页面水平方向上的第一当前滚动距离以及所述当前页面中的滚动条在页面竖直方向上的第二当前滚动距离。其中,所述第一当前滚动距离可以通过windowScrollXStart=document.documentElement.scrollLeft进行获取,所述第二当前滚动距离可以通过windowScrollYStart=document.documentElement.scrollTop进行获取。
步骤S130:根据所述页面切换指令将所述当前页面切换至目标页面。
在获取了用户在当前页面中通过页面切换按钮触发我的页面切换指令,则用户终端根据该页面切换指令将所述当前页面切换至目标页面,即从当前页面进行上下页切换,或者跳页切换。
步骤S140:获取所述目标页面中当前显示区域的页面切换按钮在所述目标页面中的第二位置信息。
在完成页面切换后,当前的显示页面为目标页面了,获取所述目标页面中当前显示区域的页面切换按钮在所述目标页面中的第二位置信息,该第二位置信息包括所述目标页面中的页面切换按钮与所述目标页面中当前显示区域的第一侧边的第一目标距离,以及所述目标页面中的页面切换按钮与所述目标页面中当前显示区域的第二侧边的第二目标距离,其中,所述第一侧边与所述第二侧边相连,其中,所述第二位置信息的获取方法请参照步骤S120中第一位置信息的获取方法,为了描述的简洁,在此不再过多赘述。
步骤S150:根据所述第一位置信息、所述第二位置信息以及所述当前滚动距离,调整所述目标页面中的滚动条的目标滚动距离,以使所述页面切换按钮在所述目标页面当前显示区域的位置与所述第一位置信息相同。
通过上述步骤获取了当前页面中的页面切换按钮在当前页面中当前显示区域的第一位置信息,以及目标页面中的页面切换按钮在目标页面中当前显 示区域的第二位置信息,以及当前页面中页面切换按钮被触发时滚动条的当前滚动距离,为了实现页面切换按钮相对于切换前后的当前显示区域的位置不发生变化,则需调整所述目标页面中滚动条的目标滚动距离,从而使得当前页面中当前显示区域的页面切换按钮与所述目标页面中当前区域的页面切换按钮的位置相同,如图3和图4所示。
其中,可以先确定所述目标页面中的页面切换按钮与所述目标页面中当前显示区域的第一侧边的第一目标距离,与所述当前页面中的页面切换按钮与所述当前页面中当前显示区域的第一侧边的第一当前距离的第一差值,再根据第一差值、第一当前滚动距离调整所述目标页面中的滚动条在页面水平方向上的第一目标滚动距离,即所述目标页面中滚动条在页面水平方向上的滚动距离可以表示为document.documentElement.scrollLeft=windowScrollXStart+(pos2.left–pos1.left),pos1.left表示为当前页面中当前显示区域的页面切换按钮与当前显示区域的第一侧边的第一当前距离,第一侧边可以为当前页面中当前显示区域的左边,pos2.left表示为目标页面中当前显示区域的页面切换按钮与当前显示区域的第一侧边的第一目标距离,该第一侧边可以为目标页面中当前显示区域的左边。windowScrollXStart为第一当前滚动距离。
可以先所述目标页面中的页面切换按钮与所述目标页面中当前显示区域的第二侧边的第二目标距离,与所述当前页面中的页面切换按钮与所述当前页面中当前显示区域的第二侧边的第二当前距离的第二差值,调整所述目标页面中的滚动条在页面竖直方向上的第二目标滚动距离,即所述目标页面中滚动条在页面竖直方向上的滚动距离可以表示为document.documentElement.scrollTop=windowScrollYStart+(pos2.top–pos1.top),pos1.top表示为当前页面中当前显示区域的页面切换按钮与当前显示区域的第一侧边的第二当前距离,第一侧边可以为当前页面中当前显示区域的顶边,pos2.top表示为目标页面中当前显示区域的页面切换按钮与当前显示区域的第一侧边的第二目标距离,该第一侧边可以为目标页面中当前显示区域的顶边。windowScrollYStart为第二当前滚动距离。
本发明第一实施例提供的一种页面切换处理方法,在将当前页面切换为目标页面后,通过调整目标页面中的滚动条的滚动距离,使得当前页面中当 前显示区域的页面切换按钮与目标页面中当前区域的页面切换按钮的位置相同,即页面切换按钮相对于显示区域的位置不会发生变化,实现了该页面切换按钮相对用户手指的位置不发生变化,从而用户在进行页面切换时可以不用再挪动手指的位置了,提高了用户进行页面切换操作的便捷性。
第二实施例
请参照图5,图5为本发明第二实施例提供的一种页面切换处理方法的流程图,所述方法具体包括如下步骤:
步骤S210:获取在页面中通过页面切换按钮触发的切换指令。
请参照图6,用户在进行页面浏览时,若需要进行翻页或者跳页,则可以通过点击页面中的页面切换按钮来进行页面切换,用户终端则可以获取用户在页面中通过页面切换按钮触发的页面切换指令。
步骤S220:获取所述页面切换按钮被触发时所述页面切换按钮在所述页面中当前显示区域的第一位置信息以及所述页面中的滚动条的当前滚动距离。
该步骤的具体实施方式与上述步骤S120中的具体实施方式一致,为了描述的简洁,请参照步骤S120中的具体实施方式,在此不再赘述。
步骤S230:根据所述切换指令将所述页面中对应的显示区域的内容进行更新。
用户终端在获取了切换指令后,根据该切换指令即可将所述页面中对应的显示区域的内容进行更新,也就是指更新页面中某个区域的内容,例如,通过触发该页面切换按钮可以将该页面中某个区域的内容进行上下翻页或跳页,如对图6中内容栏所示的内容进行更新。
步骤S240:获取所述显示区域的内容进行更新后的所述页面中当前显示区域的所述页面切换按钮在所述页面中的第二位置信息。
将页面中显示区域的内容进行更新后,获取更新后的页面中页面切换按钮的第二位置信息,该第二位置信息的获取方法与页面更新前页面切换按钮的第一位置信息获取方法一致,其具体实现过程可参照步骤S120中的具体描述。
步骤S250:根据所述第一位置信息、所述第二位置信息以及所述当前滚动距离,调整切换后的所述页面中的滚动条的目标滚动距离,以使切换后的所述页面中当前区域的页面切换按钮的位置与所述第一位置信息相同。
通过上述步骤获取了切换前页面的页面切换按钮的第一位置信息,以及切换后的页面切换按钮的第二位置信息,以及所述页面切换按钮被触发时所述页面中的滚动条的当前滚动距离,为了实现切换前后,页面切换按钮的位置相对于显示区域不发生变化,则需调整所述切换后的页面中滚动条的滚动距离,从而使得切换前页面中当前显示区域的页面切换按钮与所述切换后页面中当前区域的页面切换按钮的位置相同,如图6和图7所示。
该步骤的具体实现方式可参照上述步骤S150的具体描述,在此不过多赘述。
本发明第二实施例提供的一种页面切换处理方法,通过触发页面中页面切换按钮使得页面中对应的显示区域的内容进行更新,通过调整切换后页面中的滚动条的目标滚动距离,使得切换前页面中当前显示区域的页面切换按钮与切换后页面中当前区域的页面切换按钮的位置相同,即页面切换按钮的位置相对于当前显示区域不会发生变化,实现了该页面切换按钮相对用户手指的位置不发生变化,从而用户在进行切换时可以不用再挪动手指的位置了,提高了用户进行页面切换操作的便捷性。
第三实施例
请参照图8,图8为本发明第三实施例提供的一种页面切换处理装置200的结构框图,用于执行上述第一实施例的页面切换处理方法,所述装置具体包括:
第一获取模块210,用于获取在当前页面中通过页面切换按钮触发的页面切换指令。
第二获取模块220,用于获取所述页面切换按钮被触发时所述页面切换按钮在所述当前页面中当前显示区域的第一位置信息以及所述当前页面中的滚动条的当前滚动距离。
切换模块230,用于根据所述页面切换指令将所述当前页面切换至目标页面。
第三获取模块240,用于获取所述目标页面中当前显示区域的页面切换按钮在所述目标页面中的第二位置信息。
第一调整模块250,用于根据所述第一位置信息、所述第二位置信息以及所述当前滚动距离,调整所述目标页面中的滚动条的目标滚动距离,以使 所述页面切换按钮在所述目标页面当前显示区域的位置与所述第一位置信息相同。
其中,作为一种实施方式,所述第二获取模块220包括:第一滚动距离获取子模块和第二滚动距离获取子模块。
第一滚动距离获取子模块,用于获取所述页面切换按钮被触发时所述当前页面中的滚动条在页面水平方向上的第一当前滚动距离。
第二滚动距离获取子模块,用于获取所述页面切换按钮被触发时所述当前页面中的滚动条在页面竖直方向上的第二当前滚动距离。
所述第一调整模块250包括:第一滚动距离调整子模块和第二滚动距离调整子模块。
第一滚动距离调整子模块,用于确定所述第一目标距离与所述第一当前距离的第一差值,并根据所述第一差值、所述第一当前滚动距离调整所述目标页面中的滚动条在页面水平方向上的第一目标滚动距离。
第二滚动距离调整子模块,用于确定所述第二目标距离与所述第二当前距离的第二差值,并根据所述第二差值、所述第二当前滚动距离调整所述目标页面中的滚动条在页面竖直方向上的第二目标滚动距离。
另外,所述第一位置信息包括所述当前页面中的页面切换按钮与所述当前页面中当前显示区域的第一侧边的距离以及所述当前页面中的页面切换按钮与所述当前页面中当前显示区域的第二侧边的距离,其中,所述第一侧边与所述第二侧边相连。
所述第二位置信息包括所述目标页面中的页面切换按钮与所述目标页面中当前显示区域的第一侧边的距离以及所述目标页面中的页面切换按钮与所述目标页面中当前显示区域的第二侧边的距离,其中,所述第一侧边与所述第二侧边相连。
第四实施例
请参照图9,图9为本发明第四实施例提供的一种页面切换处理装置300的结构框图,用于执行上述第二实施例的页面切换处理方法,所述装置具体包括:
第四获取模块310,用于获取在页面中通过页面切换按钮触发的切换指令。
第五获取模块320,用于获取所述页面切换按钮被触发时所述页面切换按钮在所述页面中当前显示区域的第一位置信息以及所述页面中的滚动条的当前滚动距离。
更新模块330,用于根据所述切换指令将所述页面中对应的显示区域的内容进行更新。
第六获取模块340,用于获取所述显示区域的内容进行更新后的所述页面中当前显示区域的所述页面切换按钮在所述页面中的第二位置信息。
第二调整模块350,用于根据所述第一位置信息、所述第二位置信息以及所述当前滚动距离,调整切换后的所述页面中的滚动条的目标滚动距离,以使切换后的所述页面中当前区域的页面切换按钮的位置与所述第一位置信息相同。
第五实施例
本实施例还提供一种用户终端,包括处理器以及存储器,还包括计算机程序;
其中,所述计算机程序存储在所述存储器中,并配置为由所述处理器执行以实现如第一实施例所述的方法。
第六实施例
本实施例还提供另一种用户终端,包括处理器以及存储器,还包括计算机程序;
其中,所述计算机程序存储在所述存储器中,并配置为由所述处理器执行以实现如第二实施例所述的方法。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的装置的具体工作过程,可以参考前述方法中的对应过程,在此不再过多赘述。
综上所述,本发明实施例提供一种页面切换处理方法、装置、用户终端及可读取存储介质,先获取在当前页面中通过页面切换按钮触发的页面切换指令,再获取所述页面切换按钮被触发时所述页面切换按钮在所述当前页面中当前显示区域的第一位置信息以及所述当前页面中的滚动条的滚动距离,然后根据所述页面切换指令将所述当前页面切换至目标页面,再获取所述目标页面中当前显示区域的页面切换按钮在所述目标页面中 的第二位置信息,从而根据所述第一位置信息、所述第二位置信息以及所述滚动距离,调整所述目标页面中的滚动条的滚动距离,以使所述当前页面中当前显示区域的页面切换按钮与所述目标页面中当前区域的页面切换按钮的位置相同,即页面切换按钮的位置不会发生变化,实现了该页面切换按钮相对用户手指的位置不发生变化,从而用户在进行页面切换时可以不用再挪动手指的位置了,提高了用户进行页面切换操作的便捷性。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,也可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,附图中的流程图和框图显示了根据本发明的多个实施例的装置、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现方式中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
另外,在本发明各个实施例中的各功能模块可以集成在一起形成一个独立的部分,也可以是各个模块单独存在,也可以两个或两个以上模块集成形成一个独立的部分。
所述功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。需要说明的是,在本文中, 诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应所述以权利要求的保护范围为准。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。

Claims (15)

  1. 一种页面切换处理方法,其特征在于,所述方法包括:
    获取在当前页面中通过页面切换按钮触发的页面切换指令;
    获取所述页面切换按钮被触发时所述页面切换按钮在所述当前页面中当前显示区域的第一位置信息以及所述当前页面中的滚动条的当前滚动距离;
    根据所述页面切换指令将所述当前页面切换至目标页面;
    获取所述目标页面中当前显示区域的页面切换按钮在所述目标页面中的第二位置信息;
    根据所述第一位置信息、所述第二位置信息以及所述当前滚动距离,调整所述目标页面中的滚动条的目标滚动距离,以使所述页面切换按钮在所述目标页面当前显示区域的位置与所述第一位置信息相同。
  2. 根据权利要求1所述的方法,其特征在于,获取所述页面切换按钮被触发时所述当前页面中的滚动条的当前滚动距离,包括:
    获取所述页面切换按钮被触发时所述当前页面中的滚动条在页面水平方向上的第一当前滚动距离;
    获取所述页面切换按钮被触发时所述当前页面中的滚动条在页面竖直方向上的第二当前滚动距离。
  3. 根据权利要求2所述的方法,其特征在于,所述第一位置信息包括所述当前页面中的页面切换按钮与所述当前页面中当前显示区域的第一侧边的第一当前距离以及所述当前页面中的页面切换按钮与所述当前页面中当前显示区域的第二侧边的第二当前距离,其中,所述第一侧边与所述第二侧边相连。
  4. 根据权利要求3所述的方法,其特征在于,所述第二位置信息包括所述目标页面中的页面切换按钮与所述目标页面中当前显示区域的第一侧边的第一目标距离以及所述目标页面中的页面切换按钮与所述目标页面中当前显示区域的第二侧边的第二目标距离,其中,所述第一侧边与所述第二侧边相连。
  5. 根据权利要求4所述的方法,其特征在于,根据所述第一位置信息、所述第二位置信息以及所述当前滚动距离,调整所述目标页面中的滚 动条的目标滚动距离,以使页面切换按钮在所述目标页面当前显示区域的位置与所述第一位置信息相同,包括:
    确定所述第一目标距离与所述第一当前距离的第一差值,并根据所述第一差值、所述第一当前滚动距离调整所述目标页面中的滚动条在页面水平方向上的第一目标滚动距离;
    确定所述第二目标距离与所述第二当前距离的第二差值,并根据所述第二差值、所述第二当前滚动距离调整所述目标页面中的滚动条在页面竖直方向上的第二目标滚动距离。
  6. 一种页面切换处理方法,其特征在于,所述方法包括:
    获取在页面中通过页面切换按钮触发的切换指令;
    获取所述页面切换按钮被触发时所述页面切换按钮在所述页面中当前显示区域的第一位置信息以及所述页面中的滚动条的当前滚动距离;
    根据所述切换指令将所述页面中对应的显示区域的内容进行更新;
    获取所述显示区域的内容进行更新后的所述页面中当前显示区域的所述页面切换按钮在所述页面中的第二位置信息;
    根据所述第一位置信息、所述第二位置信息以及所述当前滚动距离,调整切换后的所述页面中的滚动条的目标滚动距离,以使切换后的所述页面中当前区域的页面切换按钮的位置与所述第一位置信息相同。
  7. 一种页面切换处理装置,其特征在于,所述装置包括:
    第一获取模块,用于获取在当前页面中通过页面切换按钮触发的页面切换指令;
    第二获取模块,用于获取所述页面切换按钮被触发时所述页面切换按钮在所述当前页面中当前显示区域的第一位置信息以及所述当前页面中的滚动条的当前滚动距离;
    切换模块,用于根据所述页面切换指令将所述当前页面切换至目标页面;
    第三获取模块,用于获取所述目标页面中当前显示区域的页面切换按钮在所述目标页面中的第二位置信息;
    第一调整模块,用于根据所述第一位置信息、所述第二位置信息以及所述当前滚动距离,调整所述目标页面中的滚动条的目标滚动距离,以使 所述页面切换按钮在所述目标页面当前显示区域的位置与所述第一位置信息相同。
  8. 根据权利要求7所述的装置,其特征在于,所述第二获取模块包括:
    第一滚动距离获取子模块,用于获取所述页面切换按钮被触发时所述当前页面中的滚动条在页面水平方向上的第一当前滚动距离;
    第二滚动距离获取子模块,用于获取所述页面切换按钮被触发时所述当前页面中的滚动条在页面竖直方向上的第二当前滚动距离。
  9. 根据权利要求8所述的装置,其特征在于,所述第一位置信息包括所述当前页面中的页面切换按钮与所述当前页面中当前显示区域的第一侧边的第一当前距离以及所述当前页面中的页面切换按钮与所述当前页面中当前显示区域的第二侧边的第二当前距离,其中,所述第一侧边与所述第二侧边相连。
  10. 根据权利要求9所述的装置,其特征在于,所述第二位置信息包括所述目标页面中的页面切换按钮与所述目标页面中当前显示区域的第一侧边的第一目标距离以及所述目标页面中的页面切换按钮与所述目标页面中当前显示区域的第二侧边的第二目标距离,其中,所述第一侧边与所述第二侧边相连。
  11. 根据权利要求10所述的装置,其特征在于,所述第一调整模块包括:
    第一滚动距离调整子模块,用于确定所述第一目标距离与所述第一当前距离的第一差值,并根据所述第一差值、所述第一当前滚动距离调整所述目标页面中的滚动条在页面水平方向上的第一目标滚动距离;
    第二滚动距离调整子模块,用于确定所述第二目标距离与所述第二当前距离的第二差值,并根据所述第二差值、所述第二当前滚动距离调整所述目标页面中的滚动条在页面竖直方向上的第二目标滚动距离。
  12. 一种页面切换处理装置,其特征在于,所述装置包括:
    第四获取模块,用于获取在页面中通过页面切换按钮触发的切换指令;
    第五获取模块,用于获取所述页面切换按钮被触发时所述页面切换按钮在所述页面中当前显示区域的第一位置信息以及所述页面中的滚动条 的当前滚动距离;
    更新模块,用于根据所述切换指令将所述页面中对应的显示区域的内容进行更新;
    第六获取模块,用于获取所述显示区域的内容进行更新后的所述页面中当前显示区域的所述页面切换按钮在所述页面中的第二位置信息;
    第二调整模块,用于根据所述第一位置信息、所述第二位置信息以及所述当前滚动距离,调整切换后的所述页面中的滚动条的目标滚动距离,以使切换后的所述页面中当前区域的页面切换按钮的位置与所述第一位置信息相同。
  13. 一种用户终端,其特征在于,所述用户终端包括处理器以及存储器,还包括计算机程序;
    其中,所述计算机程序存储在所述存储器中,并配置为由所述处理器执行以实现如权利要求1-5任一项所述的方法。
  14. 一种用户终端,其特征在于,所述用户终端包括处理器以及存储器,还包括计算机程序;
    其中,所述计算机程序存储在所述存储器中,并配置为由所述处理器执行以实现如权利要求6所述的方法。
  15. 一种可读取存储介质,其特征在于,所述可读取存储介质存储于计算机内,所述可读取存储介质包括多条指令,所述多条指令被配置成使得计算机执行如权利要求1-5任一项所述方法。
PCT/CN2018/090685 2017-06-12 2018-06-11 页面切换处理方法、装置、用户终端及可读取存储介质 WO2018228341A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710442182.1 2017-06-12
CN201710442182.1A CN107256116B (zh) 2017-06-12 2017-06-12 页面切换处理方法、装置、用户终端及可读取存储介质

Publications (1)

Publication Number Publication Date
WO2018228341A1 true WO2018228341A1 (zh) 2018-12-20

Family

ID=60024018

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/090685 WO2018228341A1 (zh) 2017-06-12 2018-06-11 页面切换处理方法、装置、用户终端及可读取存储介质

Country Status (2)

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

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107256116B (zh) * 2017-06-12 2020-03-17 广州神马移动信息科技有限公司 页面切换处理方法、装置、用户终端及可读取存储介质
CN108089804A (zh) * 2017-12-26 2018-05-29 深圳市宝尔爱迪科技有限公司 一种电子设备及安卓平台跨应用翻页的方法
CN111199136B (zh) * 2018-10-30 2024-03-19 北京金山办公软件股份有限公司 文档内容的展示方法、装置及设备
CN111506842A (zh) * 2019-01-31 2020-08-07 阿里巴巴集团控股有限公司 页面展示方法、装置、电子设备及计算机存储介质

Citations (5)

* 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
CN105843485A (zh) * 2016-04-13 2016-08-10 珠海市魅族科技有限公司 页面显示的方法及装置
CN106503041A (zh) * 2016-09-19 2017-03-15 曙光信息产业(北京)有限公司 页面布局自适应方法及系统
CN106610765A (zh) * 2015-10-26 2017-05-03 网易(杭州)网络有限公司 按钮间位置相对固定的切换方法及装置、移动客户端和电脑客户端
CN107256116A (zh) * 2017-06-12 2017-10-17 广州神马移动信息科技有限公司 页面切换处理方法、装置、用户终端及可读取存储介质

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106201234A (zh) * 2015-04-29 2016-12-07 阿里巴巴集团控股有限公司 页面内容的查看方法及装置

Patent Citations (5)

* 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
CN106610765A (zh) * 2015-10-26 2017-05-03 网易(杭州)网络有限公司 按钮间位置相对固定的切换方法及装置、移动客户端和电脑客户端
CN105843485A (zh) * 2016-04-13 2016-08-10 珠海市魅族科技有限公司 页面显示的方法及装置
CN106503041A (zh) * 2016-09-19 2017-03-15 曙光信息产业(北京)有限公司 页面布局自适应方法及系统
CN107256116A (zh) * 2017-06-12 2017-10-17 广州神马移动信息科技有限公司 页面切换处理方法、装置、用户终端及可读取存储介质

Also Published As

Publication number Publication date
CN107256116A (zh) 2017-10-17
CN107256116B (zh) 2020-03-17

Similar Documents

Publication Publication Date Title
WO2018228341A1 (zh) 页面切换处理方法、装置、用户终端及可读取存储介质
CN107844243B (zh) 云桌面触摸屏实现方法及装置
US10884611B2 (en) Method and apparatus for controlling touch screen of terminal, and terminal
US20180011818A1 (en) Webpage Update Method And Apparatus
CN107391117B (zh) 轻应用的分屏处理方法、设备及电子设备
CN106716351B (zh) 显示网页的方法和电子设备
CN109508128B (zh) 搜索控件显示方法、装置、设备及计算机可读存储介质
US20170031555A1 (en) Display Processing Method and Display Processing Device
WO2015139408A1 (zh) 一种管理应用程序图标的方法及终端
US8788978B2 (en) Pinch zoom velocity detent
CN103365356A (zh) 在电子设备上进行显示的方法和装置
WO2019015582A1 (zh) 信息提示方法及移动终端
US8977950B2 (en) Techniques for selection and manipulation of table boarders
US10761639B2 (en) Character inputting method and mobile terminal
US10747387B2 (en) Method, apparatus and user terminal for displaying and controlling input box
US20200019596A1 (en) Multi-path copying and pasting method and mobile terminal
US10757241B2 (en) Method and system for dynamically changing a header space in a graphical user interface
US20150089542A1 (en) Distribution device, distribution method, and non-transitory computer readable storage medium
US11656761B2 (en) Touch hotspot adjustment method, apparatus, and device, and touchscreen terminal device
US20150234576A1 (en) Method and apparatus for displaying information and electronic device adapted to the method
EP3019950B1 (en) Method and apparatus for controlling audio output
US20160196240A1 (en) Method of displaying content and electronic device implementing same
WO2018113748A1 (zh) 一种视频全屏的实现方法及电子设备
WO2018228062A1 (zh) 在分屏显示状态下显示应用界面的方法和移动终端
WO2018223593A1 (zh) 分段选择视图呈现方法、装置及用户终端

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18818578

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18818578

Country of ref document: EP

Kind code of ref document: A1