CN110099162B - Page display processing method and wearable device - Google Patents
Page display processing method and wearable device Download PDFInfo
- Publication number
- CN110099162B CN110099162B CN201910204593.6A CN201910204593A CN110099162B CN 110099162 B CN110099162 B CN 110099162B CN 201910204593 A CN201910204593 A CN 201910204593A CN 110099162 B CN110099162 B CN 110099162B
- Authority
- CN
- China
- Prior art keywords
- display screen
- sliding
- container
- distance
- sliding operation
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0488—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
- G06F3/04883—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
- H04M1/72454—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Environmental & Geological Engineering (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The invention discloses a page display processing method and wearable equipment, wherein the method comprises the following steps: acquiring sliding operation of a page in a touch display screen; if the sliding operation is performed to the edge, taking the position of the sliding operation in the display screen when the sliding operation slides to the preset position of the container corresponding to the page in the display screen as an initial position, and acquiring the sliding distance of the sliding operation for continuously sliding; setting an edge distance attribute value of the container according to the sliding distance; when detecting the slip operation ends, according to the picture that the margin attribute value of container will preset is in with the mode of kick-backing show among the display screen, consequently, can solve among the wearing formula equipment among the correlation technique the page and just pause when sliding to the screen edge, can't continue to slide and lead to the not good problem of user experience, when sliding to the screen edge, if continue to slide, with the mode display of kick-backing of page, improved user experience degree.
Description
Technical Field
The invention relates to the field of mobile terminals, in particular to a page display processing method and wearable equipment.
Background
With the popularization of intelligent wearable equipment, the application style is diversified. But the sliding effect for slidable applications has not changed significantly. Especially, when the picture slides to the edge of the screen, the ancient board only stops at the edge, and the cool animation effect is not generated.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a page display processing method and wearable equipment, and aims to at least solve the problem that in the related art, when a page slides to the edge of a screen, the page stops and cannot slide continuously, so that the user experience is poor.
According to an aspect of an embodiment of the present invention, there is provided a page display processing method, including:
acquiring sliding operation of a page in a touch display screen;
judging whether the sliding operation slides to a preset position of a container corresponding to a page in the display screen;
if so, taking the position of the sliding operation in the display screen when the sliding operation slides to the preset position of the corresponding container in the page in the display screen as an initial position, and acquiring the sliding distance of the sliding operation for continuously sliding;
setting an edge distance attribute value of the container according to the sliding distance;
and when the sliding operation is detected to be finished, displaying a preset picture on the display screen in a rebounding mode according to the edge distance attribute value of the container.
Optionally, the determining whether the sliding operation slides to the predetermined position of the container corresponding to the page in the display screen includes:
judging whether the distance between the current position of the page corresponding to the container in the display screen and the preset position of the container is 0 or not by the sliding operation;
if the judgment result is yes, determining that the sliding operation slides to a preset position of a corresponding container of a page in the display screen;
and under the condition that the judgment result is negative, determining that the sliding operation is not slid to a preset position of a page corresponding to the container in the display screen.
Optionally, taking a position of the sliding operation in the display screen when the sliding operation slides to a predetermined position of the container corresponding to the page in the display screen as a starting position, and acquiring a sliding distance at which the sliding operation continues to slide includes:
acquiring the current moving distance of the sliding operation in the display screen in the current time period relative to the last time period;
and determining the sum of the absolute value of the current moving distance and the accumulated moving distance obtained in the last time period as the sliding distance, wherein the accumulated moving distance of the sliding operation in the display screen in the first time period is the difference value between the position of the sliding operation in the display screen in the first time period and the initial position.
Optionally, the obtaining a current moving distance of the sliding operation in the display screen in a current time period relative to a previous time period includes:
acquiring first position information of the sliding operation in the display screen in the current time period and acquiring second position information of the sliding operation in the display screen in the previous time period;
and determining the current moving distance according to the first position information and the second position information.
Optionally, determining the current moving distance according to the first location information and the second location information includes:
performing difference processing on the first distance and the second distance to obtain a difference value of the first distance and the second distance;
and determining the absolute value of the difference value as the current moving distance.
Optionally, displaying a preset picture in the display screen in a rebounding manner according to the margin attribute value of the container includes:
performing picture translation on the container in the sliding direction according to the edge distance attribute value of the container;
and displaying the preset picture in the display screen in a rebounding mode within a preset distance threshold value range through picture translation.
Optionally, performing, according to the edge distance attribute value of the container, frame translation in the sliding direction on the container includes:
setting the picture for the container and setting a target value of the container to 0;
controlling the edge distance attribute value to be reduced at a preset frequency by a set interpolator until the edge distance attribute value is 0, wherein the initial value of the interpolator is the edge distance attribute value;
performing a frame translation in a sliding direction on the container.
Optionally, the setting of the edge distance attribute value of the container according to the sliding distance includes:
and setting the edge distance attribute value of the container corresponding to the sliding distance through a preset corresponding list of the distance and the edge distance attribute value.
According to another aspect of the embodiments of the present invention, there is also provided a wearable device, including: a processor, a memory, and a communication bus, wherein,
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is used for executing the page display processing program stored in the memory so as to realize the following steps:
acquiring sliding operation of a page in a touch display screen;
judging whether the sliding operation slides to a preset position of a container corresponding to a page in the display screen;
if so, taking the position of the sliding operation in the display screen when the sliding operation slides to the preset position of the corresponding container in the page in the display screen as an initial position, and acquiring the sliding distance of the sliding operation for continuously sliding;
setting an edge distance attribute value of the container according to the sliding distance;
and when the sliding operation is detected to be finished, displaying a preset picture on the display screen in a rebounding mode according to the edge distance attribute value of the container.
Optionally, the processor is further configured to execute a page display processing program to implement the following steps:
judging whether the distance between the current position of the page corresponding to the container in the display screen and the preset position of the container is 0 or not by the sliding operation;
if the judgment result is yes, determining that the sliding operation slides to a preset position of a corresponding container of a page in the display screen;
and under the condition that the judgment result is negative, determining that the sliding operation is not slid to a preset position of a page corresponding to the container in the display screen.
Optionally, the processor is further configured to execute a page display processing program to implement the following steps:
acquiring the current moving distance of the sliding operation in the display screen in the current time period relative to the last time period;
and determining the sum of the absolute value of the current moving distance and the accumulated moving distance obtained in the last time period as the sliding distance, wherein the accumulated moving distance of the sliding operation in the display screen in the first time period is the difference value between the position of the sliding operation in the display screen in the first time period and the initial position.
Optionally, the processor is further configured to execute a page display processing program to implement the following steps:
acquiring first position information of the sliding operation in the display screen in the current time period and acquiring second position information of the sliding operation in the display screen in the previous time period;
and determining the current moving distance according to the first position information and the second position information.
Optionally, the processor is further configured to execute a page display processing program to implement the following steps:
performing difference processing on the first distance and the second distance to obtain a difference value of the first distance and the second distance;
and determining the absolute value of the difference value as the current moving distance.
Optionally, the processor is further configured to execute a page display processing program to implement the following steps:
performing picture translation on the container in the sliding direction according to the edge distance attribute value of the container;
and displaying the preset picture in the display screen in a rebounding mode within a preset distance threshold value range through picture translation.
Optionally, the processor is further configured to execute a page display processing program to implement the following steps:
setting the picture for the container and setting a target value of the container to 0;
controlling the edge distance attribute value to be reduced at a preset frequency by a set interpolator until the edge distance attribute value is 0, wherein the initial value of the interpolator is the edge distance attribute value;
performing a frame translation in a sliding direction on the container.
Optionally, the processor is further configured to execute a page display processing program to implement the following steps:
and setting the edge distance attribute value of the container corresponding to the sliding distance through a preset corresponding list of the distance and the edge distance attribute value.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium storing one or more programs, which are executable by one or more processors to implement the steps of the above-described page display processing method.
According to the invention, the sliding operation of the page in the touch display screen is obtained; judging whether the sliding operation slides to a preset position of a container corresponding to a page in the display screen; if so, taking the position of the sliding operation in the display screen when the sliding operation slides to the preset position of the corresponding container in the page in the display screen as an initial position, and acquiring the sliding distance of the sliding operation for continuously sliding; setting an edge distance attribute value of the container according to the sliding distance; when detecting the slip operation ends, according to the picture that the margin attribute value of container will preset is in with the mode of kick-backing show among the display screen, consequently, can solve among the wearing formula equipment among the correlation technique the page and just pause when sliding to the screen edge, can't continue to slide and lead to the not good problem of user experience, when sliding to the screen edge, if continue to slide, with the mode display of kick-backing of page, improved user experience degree.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a schematic hardware structure diagram of an implementation manner of a wearable device according to an embodiment of the present invention;
fig. 2 is a first hardware schematic diagram of an implementation of a wearable device provided in an embodiment of the present application;
fig. 3 is a hardware schematic diagram of a second embodiment of a wearable device according to an embodiment of the present application;
FIG. 4 is a flow diagram of a page display processing method according to an embodiment of the invention;
FIG. 5 is a schematic view of a page display in a wearable device according to an embodiment of the invention;
fig. 6 is a block diagram of a wearable device according to an embodiment of the present invention.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
The wearable device provided by the embodiment of the invention comprises a mobile terminal such as an intelligent bracelet, an intelligent watch, an intelligent mobile phone and the like. With the continuous development of screen technologies, screen forms such as flexible screens and folding screens appear, and mobile terminals such as smart phones can also be used as wearable devices. The wearable device provided in the embodiment of the present invention may include: a Radio Frequency (RF) unit, a WiFi module, an audio output unit, an a/V (audio/video) input unit, a sensor, a display unit, a user input unit, an interface unit, a memory, a processor, and a power supply.
In the following description, a wearable device will be taken as an example, please refer to fig. 1, which is a schematic diagram of a hardware structure of a wearable device for implementing various embodiments of the present invention, where the wearable device 100 may include: RF (Radio Frequency) unit 101, WiFi module 102, audio output unit 103, a/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111. Those skilled in the art will appreciate that the wearable device structure shown in fig. 1 does not constitute a limitation of the wearable device, and that the wearable device may include more or fewer components than shown, or combine certain components, or a different arrangement of components.
The following describes the various components of the wearable device in detail with reference to fig. 1:
the rf unit 101 may be configured to receive and transmit signals during information transmission and reception or during a call, and specifically, the rf unit 101 may transmit uplink information to a base station, in addition, the downlink information sent by the base station may be received and then sent to the processor 110 of the wearable device for processing, the downlink information sent by the base station to the radio frequency unit 101 may be generated according to the uplink information sent by the radio frequency unit 101, or may be actively pushed to the radio frequency unit 101 after detecting that the information of the wearable device is updated, for example, after detecting that the geographic location where the wearable device is located changes, the base station may send a message notification of the change in the geographic location to the radio frequency unit 101 of the wearable device, and after receiving the message notification, the message notification may be sent to the processor 110 of the wearable device for processing, and the processor 110 of the wearable device may control the message notification to be displayed on the display panel 1061 of the wearable device; typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 may also communicate with a network and other devices through wireless communication, which may specifically include: the server may push a message notification of resource update to the wearable device through wireless communication to remind a user of updating the application program if the file resource corresponding to the application program in the server is updated after the wearable device finishes downloading the application program. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA2000(Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division duplex Long Term Evolution), and TDD-LTE (Time Division duplex Long Term Evolution).
In one embodiment, the wearable device 100 may access an existing communication network by inserting a SIM card.
In another embodiment, the wearable device 100 may be configured with an esim card (Embedded-SIM) to access an existing communication network, and by using the esim card, the internal space of the wearable device may be saved, and the thickness may be reduced.
It is understood that although fig. 1 shows the radio frequency unit 101, it is understood that the radio frequency unit 101 does not belong to the essential constituents of the wearable device, and can be omitted entirely as required within the scope not changing the essence of the invention. The wearable device 100 may implement a communication connection with other devices or a communication network through the wifi module 102 alone, which is not limited by the embodiments of the present invention.
WiFi belongs to short-distance wireless transmission technology, and the wearable device can help a user to send and receive e-mails, browse webpages, access streaming media and the like through the WiFi module 102, and provides wireless broadband Internet access for the user. Although fig. 1 shows the WiFi module 102, it is understood that it does not belong to the essential constitution of the wearable device, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the wearable device 100 is in a call signal reception mode, a talk mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the wearable device 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive audio or video signals. The a/V input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, the Graphics processor 1041 Processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 may receive sounds (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, or the like, and may be capable of processing such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
In one embodiment, the wearable device 100 includes one or more cameras, and by turning on the cameras, capturing of images can be realized, functions such as photographing and recording can be realized, and the positions of the cameras can be set as required.
The wearable device 100 also includes at least one sensor 105, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or the backlight when the wearable device 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), and the like.
In one embodiment, the wearable device 100 further comprises a proximity sensor, and the wearable device can realize non-contact operation by adopting the proximity sensor, so that more operation modes are provided.
In one embodiment, the wearable device 100 further comprises a heart rate sensor, which, when worn, enables detection of heart rate by proximity to the user.
In one embodiment, the wearable device 100 may further include a fingerprint sensor, and by reading the fingerprint, functions such as security verification can be implemented.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
In one embodiment, the display panel 1061 is a flexible display screen, and when the wearable device using the flexible display screen is worn, the screen can be bent, so that the wearable device is more conformable. Optionally, the flexible display screen may adopt an OLED screen body and a graphene screen body, in other embodiments, the flexible display screen may also be made of other display materials, and this embodiment is not limited thereto.
In one embodiment, the display panel 1061 of the wearable device may take a rectangular shape to wrap around when worn. In other embodiments, other approaches may be taken.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the wearable device. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 1071 (e.g., an operation performed by the user on or near the touch panel 1071 using a finger, a stylus, or any other suitable object or accessory), and drive a corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and can receive and execute commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like, and are not limited to these specific examples.
In one embodiment, the side of the wearable device 100 may be provided with one or more buttons. The button can realize various modes such as short-time pressing, long-time pressing, rotation and the like, thereby realizing various operation effects. The number of the buttons can be multiple, and different buttons can be combined for use to realize multiple operation functions.
Further, the touch panel 1071 may cover the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although in fig. 1, the touch panel 1071 and the display panel 1061 are two independent components to implement the input and output functions of the wearable device, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the wearable device, and is not limited herein. For example, when receiving a message notification of an application program through the rf unit 101, the processor 110 may control the message notification to be displayed in a predetermined area of the display panel 1061, where the predetermined area corresponds to a certain area of the touch panel 1071, and perform a touch operation on the certain area of the touch panel 1071 to control the message notification displayed in the corresponding area on the display panel 1061.
The interface unit 108 serves as an interface through which at least one external device is connected to the wearable apparatus 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the wearable apparatus 100 or may be used to transmit data between the wearable apparatus 100 and the external device.
In one embodiment, the interface unit 108 of the wearable device 100 is configured as a contact, and is connected to another corresponding device through the contact to implement functions such as charging and connection. The contact can also be waterproof.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 110 is a control center of the wearable device, connects various parts of the entire wearable device by various interfaces and lines, and performs various functions of the wearable device and processes data by running or executing software programs and/or modules stored in the memory 109 and calling up data stored in the memory 109, thereby performing overall monitoring of the wearable device. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The wearable device 100 may further include a power source 111 (such as a battery) for supplying power to various components, and preferably, the power source 111 may be logically connected to the processor 110 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system.
Although not shown in fig. 1, the wearable device 100 may further include a bluetooth module or the like, which is not described herein. The wearable device 100 can be connected with other terminal devices through Bluetooth, so that communication and information interaction are realized.
Please refer to fig. 2-3, which are schematic structural diagrams of a wearable device according to an embodiment of the present invention. The wearable device in the embodiment of the invention comprises a flexible screen. When the wearable device is unfolded, the flexible screen is in a strip shape; when the wearable device is in a wearing state, the flexible screen is bent to be annular. Fig. 2 shows a structural diagram of the wearable device screen when the wearable device screen is unfolded, and fig. 3 shows a structural diagram of the wearable device screen when the wearable device screen is bent.
Example 1
Based on the wearable device, an embodiment of the present invention provides a page display processing method, and fig. 4 is a flowchart of the page display processing method according to the embodiment of the present invention, and as shown in fig. 4, the page display processing method includes:
step S401, acquiring sliding operation of a page in a touch display screen;
step S402, judging whether the sliding operation slides to a preset position of a container corresponding to a page in the display screen;
i.e. to determine whether to slide to the edge, top, left or right end of the page.
Step S403, under the condition that the judgment result is yes, taking the position of the sliding operation in the display screen when the sliding operation slides to the preset position of the corresponding container in the page in the display screen as an initial position, and acquiring the sliding distance of the sliding operation for continuously sliding;
step S404, setting the edge distance attribute value of the container according to the sliding distance;
and step S405, when the sliding operation is detected to be finished, displaying a preset picture on the display screen in a rebounding mode according to the edge distance attribute value of the container.
Through the steps S401 to S405, the sliding operation of the page in the touch display screen is obtained; judging whether the sliding operation slides to a preset position of a container corresponding to a page in the display screen; if so, taking the position of the sliding operation in the display screen when the sliding operation slides to the preset position of the corresponding container in the page in the display screen as an initial position, and acquiring the sliding distance of the sliding operation for continuously sliding; setting an edge distance attribute value of the container according to the sliding distance; when detecting the slip operation ends, according to the picture that the margin attribute value of container will preset is in with the mode of kick-backing show among the display screen, can solve among the prior art wearable device page and pause when slipping to the screen edge, can't continue to slide and lead to the not good problem of user experience, when slipping to the screen edge, if continue to slide, show the page with the mode of kick-backing, improved user experience degree.
Fig. 5 is a schematic diagram of a page display in a wearable device according to an embodiment of the present invention, as shown in (1) in fig. 5, when a user slides in a display screen to the bottom end of the page, the user continues to slide the screen, as shown in (2) in fig. 5, the page is further away from the bottom end of the display screen within a preset maximum distance range as the distance of the continuous sliding increases, an edge distance attribute value of a container is determined according to the sliding distance of the continuous sliding of the user, the page is adjusted to be displayed in a rebounding manner according to the edge distance attribute value, and the page rebounds from (2) in fig. 5 to the position of (1), so as to provide a dynamic display effect to the user.
In an embodiment of the present invention, the step S402 may specifically include:
judging whether the distance between the current position of the page corresponding to the container in the display screen and the preset position of the container is 0 or not by the sliding operation;
if the judgment result is yes, determining that the sliding operation slides to a preset position of a corresponding container of a page in the display screen;
and under the condition that the judgment result is negative, determining that the sliding operation is not slid to a preset position of a page corresponding to the container in the display screen.
In an embodiment of the present invention, the step S403 may specifically include:
s4031, acquiring a current movement distance of the sliding operation in the display screen in a current time period relative to a previous time period;
s4032, determining a sum of the absolute value of the current movement distance and a cumulative movement distance obtained in a previous time period as the sliding distance, where the cumulative movement distance of the sliding operation in the display screen in a first time period is a difference between a position of the sliding operation in the display screen in the first time period and the start position.
Further, S4031 may specifically include:
acquiring first position information of the sliding operation in the display screen in the current time period and acquiring second position information of the sliding operation in the display screen in the previous time period;
and determining the current moving distance according to the first position information and the second position information.
Further, performing difference processing on the first distance and the second distance to obtain a difference value between the first distance and the second distance; and determining the absolute value of the difference value as the current moving distance.
In this embodiment of the present invention, step S405 may specifically include:
s4051, performing picture translation on the container in the sliding direction according to the edge distance attribute value of the container;
s4052, displaying the preset picture in the display screen in a rebounding manner within a preset distance threshold range by picture translation, specifically, displaying the picture in a rebounding manner according to the sliding distance when the sliding distance for continuing sliding is less than the preset distance threshold; and if the sliding distance of the continuous sliding is greater than the preset distance threshold, displaying the picture in a rebounding mode by using the preset distance threshold.
Further, S4051 may specifically include:
setting the picture for the container and setting a target value of the container to 0;
controlling the edge distance attribute value to be reduced at a preset frequency by a set interpolator until the edge distance attribute value is 0, wherein the initial value of the interpolator is the edge distance attribute value;
performing a frame translation in a sliding direction on the container.
In an embodiment of the present invention, the step S404 may specifically include:
and setting the edge distance attribute value of the container corresponding to the sliding distance through a preset corresponding list of the distance and the edge distance attribute value.
In the embodiment of the invention, after the screen slides to the top (or the bottom) of the screen, the page can be continuously pulled and then automatically rebounds to the edge position of the screen. It is determined whether the container has slid to the top (or bottom). If the container slides to the top (or the bottom), the edge distance attribute margin value corresponding to the LayoutParams of the container is set according to the distance of the sliding of the finger. After the finger is lifted, the distance of the slide from the top (or bottom) is calculated, and a translation animation in the Y-axis direction is performed on the container, causing the container to move (rebound) to the top or bottom position. The method specifically comprises the following steps:
and arranging a bottommost container. The scheme can work for any ViewGroup container of android.
Intercept the event and determine whether to slide to the top (or bottom). Different slide containers are judged in different ways. For RecyclerView, it is necessary to determine its firstVisibletePerposotion and lastVisibletePerposotion. For ScrollView or ListView, the relationship between the ScrollY value and the container height can be determined.
If the event slides to the top (or the bottom), the event is intercepted continuously, and meanwhile, the moving distance dy in the Y-axis direction between the received event and the received event at the last time is calculated. The corresponding LayoutParams attribute of the container will then be assigned a value. Wherein, if the sliding is to the top, assigning to a distance above attribute, layoutparams. If sliding to the bottom, assign a value to the layout params. According to different requirements, dy can be properly corrected. While the maximum sliding distance can be set.
And starting to execute the animation after receiving the event of lifting the finger. A valuelanimator animation is set to the container's layoutparams. topmargin (or layoutparams. bottommargin) with a target value of 0, and the onAnimationUpdate method is monitored. After the value is changed this time, the next expected value is calculated. With appropriate interpolator configuration, the value of the layout params. topmax (or layout params. bettommargin) is gradually reduced. Each time the value of the layout params is changed, the corresponding container is redrawn to the corresponding position, i.e. the container just slid. Thus, the container will move with the change in value of the layout params, eventually moving to the top (or bottom) of the screen.
The embodiment of the invention realizes a scheme that the sliding can continue to exceed the screen boundary after the sliding to the screen edge and automatically rebounds to the screen edge after the hand is lifted, thereby improving the user experience. In addition, according to the scheme, the container is redrawn by calculating the margin value of the LayoutParams of the set container, the steps of using traditional animation and redrawing the container are skipped, and the efficiency is higher than that of using the animation.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
According to the embodiment of the invention, the wearable device for implementing the method is also provided.
Fig. 6 is a block diagram of a wearable device according to an embodiment of the present invention, and as shown in fig. 6, the wearable device may include: one or more (only one shown) processors 62, a memory 61, the processors 62 and the memory 61 being connected by a communication bus.
The memory 61 may be used to store software programs and modules, such as program instructions/modules corresponding to the video playing method and apparatus in the embodiments of the present invention, and the processor 62 executes various functional applications and data processing by running the software programs and modules stored in the memory 61, that is, implements the video playing method. The memory 61 may include high speed random access memory 61 and may also include non-volatile memory 61, such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory 61. In some examples, the memory 61 may further include memory 61 located remotely from the processor 62, and these remote memories 61 may be connected to the terminal through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The wearable device further comprises transmission means (not shown) for receiving or transmitting data via a network. Examples of the network may include a wired network and a wireless network. In one example, the transmission device includes a Network adapter (NIC) that can be connected to the router via a Network cable and other Network devices to communicate with the internet or a local area Network. In one example, the transmission device is a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
Wherein, in particular, the memory 61 is used for storing application programs;
the processor 62 may call the color adjustment program of the application screen stored in the memory 61 to perform the following steps:
acquiring sliding operation of a page in a touch display screen;
judging whether the sliding operation slides to a preset position of a container corresponding to a page in the display screen;
if so, taking the position of the sliding operation in the display screen when the sliding operation slides to the preset position of the corresponding container in the page in the display screen as an initial position, and acquiring the sliding distance of the sliding operation for continuously sliding;
setting an edge distance attribute value of the container according to the sliding distance;
and when the sliding operation is detected to be finished, displaying a preset picture on the display screen in a rebounding mode according to the edge distance attribute value of the container.
Optionally, the processor 62 is further configured to execute a page display processing program to implement the following steps:
judging whether the distance between the current position of the page corresponding to the container in the display screen and the preset position of the container is 0 or not by the sliding operation;
if the judgment result is yes, determining that the sliding operation slides to a preset position of a corresponding container of a page in the display screen;
and under the condition that the judgment result is negative, determining that the sliding operation is not slid to a preset position of a page corresponding to the container in the display screen.
Optionally, the processor 62 is further configured to execute a page display processing program to implement the following steps:
acquiring the current moving distance of the sliding operation in the display screen in the current time period relative to the last time period;
and determining the sum of the absolute value of the current moving distance and the accumulated moving distance obtained in the last time period as the sliding distance, wherein the accumulated moving distance of the sliding operation in the display screen in the first time period is the difference value between the position of the sliding operation in the display screen in the first time period and the initial position.
Optionally, the processor 62 is further configured to execute a page display processing program to implement the following steps:
acquiring first position information of the sliding operation in the display screen in the current time period and acquiring second position information of the sliding operation in the display screen in the previous time period;
and determining the current moving distance according to the first position information and the second position information.
Optionally, the processor 62 is further configured to execute a page display processing program to implement the following steps:
performing difference processing on the first distance and the second distance to obtain a difference value of the first distance and the second distance;
and determining the absolute value of the difference value as the current moving distance.
Optionally, the processor 62 is further configured to execute a page display processing program to implement the following steps:
performing picture translation on the container in the sliding direction according to the edge distance attribute value of the container;
and displaying the preset picture in the display screen in a rebounding mode within a preset distance threshold value range through picture translation.
Optionally, the processor 62 is further configured to execute a page display processing program to implement the following steps:
setting the picture for the container and setting a target value of the container to 0;
controlling the edge distance attribute value to be reduced at a preset frequency by a set interpolator until the edge distance attribute value is 0, wherein the initial value of the interpolator is the edge distance attribute value;
performing a frame translation in a sliding direction on the container.
Optionally, the processor 62 is further configured to execute a page display processing program to implement the following steps:
and setting the edge distance attribute value of the container corresponding to the sliding distance through a preset corresponding list of the distance and the edge distance attribute value.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
Example 4
Embodiments of the present invention also provide a computer-readable storage medium. Alternatively, in this embodiment, the storage medium may be a program code for executing a video playing method.
Optionally, in this embodiment, the storage medium may be located on at least one of a plurality of network devices in a network shown in the above embodiment.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
s1, acquiring the sliding operation of the page in the touch display screen;
s2, judging whether the sliding operation slides to a preset position of a container corresponding to the page in the display screen;
s3, when the judgment result is yes, taking the position of the sliding operation in the display screen when the sliding operation slides to the preset position of the corresponding container in the page in the display screen as the initial position, and acquiring the sliding distance of the sliding operation for continuing sliding;
s4, setting the edge distance attribute value of the container according to the sliding distance;
and S5, when the sliding operation is detected to be finished, displaying a preset picture on the display screen in a springback mode according to the edge distance attribute value of the container.
Optionally, the specific example in this embodiment may refer to the example described in embodiment 1 above, and this embodiment is not described again here.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above 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 several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.
Claims (9)
1. A page display processing method is characterized by comprising the following steps:
acquiring sliding operation of a page in a touch display screen;
judging whether the sliding operation slides to a preset position of a container corresponding to a page in the display screen;
if so, taking the position of the sliding operation in the display screen when the sliding operation slides to the preset position of the corresponding container in the page in the display screen as an initial position, and acquiring the sliding distance of the sliding operation for continuously sliding;
setting an edge distance attribute value of the container according to the sliding distance;
when the sliding operation is detected to be finished, displaying a preset picture in the display screen in a rebounding mode according to the edge distance attribute value of the container;
taking the position of the sliding operation in the display screen as an initial position when the sliding operation slides to the preset position of the corresponding container of the page in the display screen, and acquiring the sliding distance of the sliding operation for continuing sliding comprises the following steps:
acquiring the current moving distance of the sliding operation in the display screen in the current time period relative to the last time period;
and determining the sum of the absolute value of the current moving distance and the accumulated moving distance obtained in the last time period as the sliding distance, wherein the accumulated moving distance of the sliding operation in the display screen in the first time period is the difference value between the position of the sliding operation in the display screen in the first time period and the initial position.
2. The method of claim 1, wherein determining whether the sliding operation has slid to a predetermined location in the display screen where the page corresponds to the receptacle comprises:
judging whether the distance between the current position of the page corresponding to the container in the display screen and the preset position of the container is 0 or not by the sliding operation;
if the judgment result is yes, determining that the sliding operation slides to a preset position of a corresponding container of a page in the display screen;
and under the condition that the judgment result is negative, determining that the sliding operation is not slid to a preset position of a page corresponding to the container in the display screen.
3. The method of claim 2, wherein obtaining a current movement distance of the sliding operation in the display screen for a current time period relative to a previous time period comprises:
acquiring first position information of the sliding operation in the display screen in the current time period and acquiring second position information of the sliding operation in the display screen in the previous time period;
and determining the current moving distance according to the first position information and the second position information.
4. The method of claim 3, wherein determining the current movement distance from the first location information and the second location information comprises:
performing difference processing on the first position information and the second position information to obtain a difference value of the first position information and the second position information;
and determining the absolute value of the difference value as the current moving distance.
5. The method of claim 1, wherein displaying a preset picture in a display screen in a springback manner according to the margin attribute value of the container comprises:
performing picture translation on the container in the sliding direction according to the edge distance attribute value of the container;
and displaying the preset picture in the display screen in a rebounding mode within a preset distance threshold value range through picture translation.
6. The method of claim 5, wherein performing a frame shift in a sliding direction on the container according to the edge distance attribute value of the container comprises:
setting the picture for the container and setting a target value of the container to 0;
controlling the edge distance attribute value to be reduced at a preset frequency by a set interpolator until the edge distance attribute value is 0, wherein the initial value of the interpolator is the edge distance attribute value;
performing a frame translation in a sliding direction on the container.
7. The method of any of claims 1 to 6, wherein setting the margin attribute value of the container according to the sliding distance comprises:
and setting the edge distance attribute value of the container corresponding to the sliding distance through a preset corresponding list of the distance and the edge distance attribute value.
8. A wearable device, comprising: a processor, a memory, and a communication bus, wherein,
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is used for executing the page display processing program stored in the memory so as to realize the following steps:
acquiring sliding operation of a page in a touch display screen;
judging whether the sliding operation slides to a preset position of a container corresponding to a page in the display screen;
if so, taking the position of the sliding operation in the display screen when the sliding operation slides to the preset position of the corresponding container in the page in the display screen as an initial position, and acquiring the sliding distance of the sliding operation for continuously sliding;
setting an edge distance attribute value of the container according to the sliding distance;
when the sliding operation is detected to be finished, displaying a preset picture in the display screen in a rebounding mode according to the edge distance attribute value of the container;
taking the position of the sliding operation in the display screen as an initial position when the sliding operation slides to the preset position of the corresponding container of the page in the display screen, and acquiring the sliding distance of the sliding operation for continuing sliding comprises the following steps:
acquiring the current moving distance of the sliding operation in the display screen in the current time period relative to the last time period;
and determining the sum of the absolute value of the current moving distance and the accumulated moving distance obtained in the last time period as the sliding distance, wherein the accumulated moving distance of the sliding operation in the display screen in the first time period is the difference value between the position of the sliding operation in the display screen in the first time period and the initial position.
9. A computer-readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the steps of the page display processing method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910204593.6A CN110099162B (en) | 2019-03-18 | 2019-03-18 | Page display processing method and wearable device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910204593.6A CN110099162B (en) | 2019-03-18 | 2019-03-18 | Page display processing method and wearable device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110099162A CN110099162A (en) | 2019-08-06 |
CN110099162B true CN110099162B (en) | 2021-04-30 |
Family
ID=67443291
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910204593.6A Active CN110099162B (en) | 2019-03-18 | 2019-03-18 | Page display processing method and wearable device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110099162B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111782097A (en) * | 2020-06-30 | 2020-10-16 | 北京达佳互联信息技术有限公司 | Image resource switching method and device |
CN112114723B (en) * | 2020-09-24 | 2022-03-29 | 北京字跳网络技术有限公司 | Page sliding method and device and electronic equipment |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106293432A (en) * | 2015-05-26 | 2017-01-04 | 深圳市腾讯计算机系统有限公司 | A kind of page display processing method and device |
CN107402700A (en) * | 2017-06-21 | 2017-11-28 | 北京小度信息科技有限公司 | Page display method and device |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105511764A (en) * | 2014-09-24 | 2016-04-20 | 中兴通讯股份有限公司 | Method and device for moving page of terminal, and terminal |
CN105554553B (en) * | 2015-12-15 | 2019-02-15 | 腾讯科技(深圳)有限公司 | The method and device of video is played by suspension windows |
CN107977150A (en) * | 2017-10-31 | 2018-05-01 | 阿里巴巴集团控股有限公司 | A kind of view scrolling method, device and electronic equipment |
-
2019
- 2019-03-18 CN CN201910204593.6A patent/CN110099162B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106293432A (en) * | 2015-05-26 | 2017-01-04 | 深圳市腾讯计算机系统有限公司 | A kind of page display processing method and device |
CN107402700A (en) * | 2017-06-21 | 2017-11-28 | 北京小度信息科技有限公司 | Page display method and device |
Also Published As
Publication number | Publication date |
---|---|
CN110099162A (en) | 2019-08-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110299100B (en) | Display direction adjustment method, wearable device and computer readable storage medium | |
CN109144441B (en) | Screen adjusting method, terminal and computer readable storage medium | |
CN107153500B (en) | Method and equipment for realizing image display | |
CN112566089A (en) | Power consumption saving method, intelligent wearable device and computer readable storage medium | |
CN108563388B (en) | Screen operation method, mobile terminal and computer-readable storage medium | |
CN107729100B (en) | Interface display control method and mobile terminal | |
CN107273025B (en) | Split screen display method, terminal and computer readable storage medium | |
CN110177209B (en) | Video parameter regulation and control method, device and computer readable storage medium | |
CN110058767B (en) | Interface operation method, wearable terminal and computer-readable storage medium | |
CN109995391B (en) | Picture display method, intelligent wearable terminal and computer readable storage medium | |
CN110099162B (en) | Page display processing method and wearable device | |
CN109495639B (en) | Flexible screen terminal, control method thereof, and computer-readable storage medium | |
CN110083205B (en) | Page switching method, wearable device and computer-readable storage medium | |
CN110177208B (en) | Video recording association control method, equipment and computer readable storage medium | |
CN110113529B (en) | Shooting parameter regulation and control method and device and computer readable storage medium | |
CN110198411B (en) | Depth of field control method and device in video shooting process and computer readable storage medium | |
CN110071866B (en) | Instant messaging application control method, wearable device and storage medium | |
CN108958604B (en) | Interaction control method, mobile terminal and computer readable storage medium | |
CN109634503B (en) | Operation response method and mobile terminal | |
CN110018775B (en) | Content display method, terminal and computer readable storage medium | |
CN110109605B (en) | Image sharing method and device and computer readable storage medium | |
CN110174981B (en) | Icon interaction control method and device and computer readable storage medium | |
CN109976613B (en) | Text input implementation method, wearable device and computer-readable storage medium | |
CN110174979B (en) | Message editing method, wearable device and computer-readable storage medium | |
CN110069102B (en) | Display area regulation and control method and device and computer readable storage medium |
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 |