CN109976609A - Slide response method, wearable device and computer readable storage medium - Google Patents

Slide response method, wearable device and computer readable storage medium Download PDF

Info

Publication number
CN109976609A
CN109976609A CN201910203668.9A CN201910203668A CN109976609A CN 109976609 A CN109976609 A CN 109976609A CN 201910203668 A CN201910203668 A CN 201910203668A CN 109976609 A CN109976609 A CN 109976609A
Authority
CN
China
Prior art keywords
view control
screen
predeterminated position
wearable device
slide
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.)
Pending
Application number
CN201910203668.9A
Other languages
Chinese (zh)
Inventor
马群
里强
余航
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201910203668.9A priority Critical patent/CN109976609A/en
Publication of CN109976609A publication Critical patent/CN109976609A/en
Pending legal-status Critical Current

Links

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/04812Interaction techniques based on cursor appearance or behaviour, e.g. being affected by the presence of displayed objects
    • 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/04847Interaction techniques to control parameter settings, e.g. interaction with sliders or dials
    • 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
    • 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/0487Interaction 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/0488Interaction 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/04883Interaction 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

Abstract

It includes: to judge whether view control slides into the predeterminated position of screen that the embodiment of the present application, which discloses a kind of slide response method, wearable device and computer readable storage medium, the slide response method,;In the case where the view control slides into the predeterminated position of screen, the layout parameter attribute value of the view control is set;The sliding position of the view control is calculated beyond the distance of the predeterminated position of the screen;The distance of predeterminated position according to the sliding position of the layout parameter attribute value of the view control, the view control beyond the screen executes the predeterminated position that attribute animation makes the view control spring back to the screen.The embodiment of the present application redraws view control by the layout parameter attribute value of setting view control to realize the movement of view control;Realize view control can continue to sliding beyond screen border after sliding into screen edge, and automatic rebounding improves user experience to screen edge after lifting hand.

Description

Slide response method, wearable device and computer readable storage medium
Technical field
The invention relates to wearable device technical field more particularly to a kind of slide response method, can wear Wear equipment and computer readable storage medium.
Background technique
Wearable device is to carry out intelligentized design to daily wearing using wearable technology, develop setting of can dressing Standby general name, such as wrist-watch, bracelet, glasses, dress ornament etc..The arriving in wearable device epoch means that the intelligence of people is prolonged It stretches, by these equipment, people can preferably perceive the external information with itself, can be under the auxiliary such as computer, network The processing information of highly efficient rate.
During realizing the application, inventor has found that the prior art has the following problems: with wearable device More general, the pattern of application program relevant to wearable device is also more and more diversified, but for slidably application program Sliding effect is but never apparent to be changed, only old-fashioned and inflexible to be parked on edge when especially sliding into screen edge, not There is the animation effect extremely dazzled, reduces user experience.
Summary of the invention
In view of this, the embodiment of the present application be designed to provide a kind of slide response method, wearable device with And computer readable storage medium, do not changed significantly with solving the sliding effect of application program in existing wearable device, The problem of reducing user experience.
It is as follows that the embodiment of the present application solves technical solution used by above-mentioned technical problem:
According to the one aspect of the embodiment of the present application, a kind of slide response method provided, this method is for that can wear Equipment is worn, the slide response method includes:
Judge whether view control slides into the predeterminated position of screen;
In the case where the view control slides into the predeterminated position of screen, the layout parameter of the view control is set Attribute value;
The sliding position of the view control is calculated beyond the distance of the predeterminated position of the screen;
According to the sliding position of the layout parameter attribute value of the view control, the view control beyond the screen The distance of predeterminated position executes the predeterminated position that attribute animation makes the view control spring back to the screen.
In a kind of possible embodiment, the predeterminated position for judging view control and whether sliding into screen, before Further include:
Monitor finger down event;
In the case where listening to finger down event, execution is described to judge whether view control slides into the default of screen The step of position.
It is described to judge whether view control slides into the predeterminated position of screen and include: in a kind of possible embodiment
According to the position of the visible subitem of the view control, judge whether the view control slides into the default of screen Position.
In a kind of possible embodiment, the position of the visible subitem according to the view control, described in judgement Whether view control slides into the predeterminated position of screen, including at least one of:
According to the position of the first of the view control visible subitem, judge whether the view control slides into screen Top;
According to the position of the last one visible subitem of the view control, judge whether the view control slides into screen The bottom of curtain.
It is described to judge whether view control slides into the predeterminated position of screen and include: in a kind of possible embodiment
According to the height of the sliding distance of the view control, the height of the view control and the screen, judgement Whether the view control slides into the predeterminated position of screen.
In a kind of possible embodiment, the layout parameter attribute value of the setting view control includes:
Calculate the sliding distance of the view control;
The layout parameter attribute value of the view control is set according to the sliding distance of the view control.
It is described that the view control is arranged according to the sliding distance of the view control in a kind of possible embodiment Layout parameter attribute value include:
Determine maximum sliding distance;
The layout ginseng of the view control is set according to the sliding distance of the view control and the maximum sliding distance Number attribute value.
In a kind of possible embodiment, the sliding position for calculating the view control is beyond the pre- of the screen If the distance of position, before further include:
Monitor digit up event;
In the case where listening to digit up event, the sliding position for calculating the view control is executed beyond the screen Curtain predeterminated position apart from the step of.
According to the other side of the embodiment of the present application, a kind of wearable device provided, the wearable device includes Including memory, processor and it is stored in the slide that can be run on the memory and on the processor response journey The step of sequence, the slide responder realizes above-mentioned slide response method when being executed by the processor.
According to the other side of the embodiment of the present application, a kind of computer readable storage medium provided, the computer It is stored with slide responder on readable storage medium storing program for executing, is realized when the slide responder is executed by processor The step of slide response method stated.
The slide response method, wearable device and computer readable storage medium of the embodiment of the present application, pass through The layout parameter attribute value of view control is set, redraws view control to realize the movement of view control;Solve existing wear The problem of sliding effect for wearing application program in equipment does not change significantly, reduces user experience;View control is realized to exist It can continue to sliding beyond screen border after sliding into screen edge, automatic rebounding improves use to screen edge after lifting hand Family experience.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the application Example, and together with specification it is used to explain the principle of the application.
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, for those of ordinary skill in the art Speech, without any creative labor, is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of hardware structural diagram of embodiment of wearable device provided by the embodiments of the present application;
Fig. 2 is the slide response method flow diagram of the embodiment of the present application;
Structural schematic diagram when Fig. 3 is a kind of expansion of embodiment of wearable device provided by the embodiments of the present application;
Structural schematic diagram when Fig. 4 is a kind of bending of embodiment of wearable device provided by the embodiments of the present application;
Fig. 5 is the wearable device structural schematic diagram of the embodiment of the present application;
Fig. 6 is a kind of structural schematic diagram of embodiment of wearable device provided by the embodiments of the present application.
The embodiments will be further described with reference to the accompanying drawings for realization, functional characteristics and the advantage of the application purpose.
Specific embodiment
It should be appreciated that specific embodiment described herein is only used to explain the application, it is not used to limit the application.
In subsequent description, it is only using the suffix for indicating such as " module ", " component " or " unit " of element The explanation for being conducive to the application, itself does not have a specific meaning.Therefore, " module ", " component " or " unit " can mix Ground uses.
The wearable device provided in the embodiment of the present application includes that Intelligent bracelet, smartwatch and smart phone etc. move Dynamic terminal.With the continuous development of Screen Technology, the appearance of the screens form such as flexible screen, Folding screen, smart phone etc. is mobile eventually End can also be used as wearable device.The wearable device provided in the embodiment of the present application may include: RF (Radio Frequency, radio frequency) unit, WiFi module, audio output unit, A/V (audio/video) input unit, sensor, display The components such as unit, user input unit, interface unit, memory, processor and power supply.
It will be illustrated by taking wearable device as an example in subsequent descriptions, referring to Fig. 1, it is the realization each implementation of the application A kind of hardware structural diagram of wearable device of example, which may include: RF (Radio Frequency, 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, Yi Ji electricity The components such as source 111.It will be understood by those skilled in the art that wearable device structure shown in Fig. 1 is not constituted to wearable The restriction of equipment, wearable device may include perhaps combining certain components or difference than illustrating more or fewer components Component layout.
It is specifically introduced below with reference to all parts of the Fig. 1 to wearable device:
Radio frequency unit 101 can be used for receiving and sending messages or communication process in, signal sends and receivees, specifically, radio frequency list Uplink information can be sent to base station by member 101, and after the downlink information that in addition can also be sent base station receives, being sent to can be worn The processor 110 for wearing equipment is handled, and base station can be to the downlink information that radio frequency unit 101 is sent and be sent out according to radio frequency unit 101 What the uplink information sent generated, it is also possible to actively push away to radio frequency unit 101 after the information update for detecting wearable device It send, for example, base station can penetrating to wearable device after detecting that geographical location locating for wearable device changes Frequency unit 101 sends the message informing of geographical location variation, and radio frequency unit 101, can should after receiving the message informing The processor 110 that message informing is sent to wearable device is handled, and it is logical that the processor 110 of wearable device can control the message Know on the display panel 1061 for being shown in wearable device;In general, radio frequency unit 101 include but is not limited to antenna, at least one Amplifier, transceiver, coupler, low-noise amplifier, duplexer etc..In addition, radio frequency unit 101 can also pass through channel radio Letter communicated with network and other equipment, specifically may include: by wireless communication with the server communication in network system, example Such as, wearable device can download file resource from server by wireless communication, for example can download and answer from server With program, after wearable device completes the downloading of a certain application program, if the corresponding file of the application program in server Resource updates, then the server can be by wireless communication to the message informing of wearable device push resource updates, to remind User is updated the application program.Any communication standard or agreement can be used in above-mentioned wireless communication, including but not limited to GSM (Global System of Mobile communication, global system for mobile communications), GPRS (General Packet Radio Service, general packet radio service), CDMA2000 (Code Division Multiple Access 2000, CDMA 2000), (Wideband Code Division Multiple Access, wideband code division are more by WCDMA Location), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access, time division synchronous CDMA), (Frequency Division Duplexing-Long Term Evolution, frequency division duplex are long by FDD-LTE Phase evolution) and TDD-LTE (Time Division Duplexing-Long Term Evolution, time division duplex are drilled for a long time Into) etc..
In one embodiment, wearable device 100 can access existing communication network by insertion SIM card.
In another embodiment, wearable device 100 can be come real by the way that esim card (Embedded-SIM) is arranged Existing communication network is now accessed, by the way of esim card, the inner space of wearable device can be saved, reduce thickness.
It is understood that although Fig. 1 shows radio frequency unit 101, but it is understood that, radio frequency unit 101 its And it is not belonging to must be configured into for wearable device, it can according to need within the scope of not changing the essence of the invention and save completely Slightly., wearable device 100 can realize the communication connection with other equipment or communication network separately through wifi module 102, The embodiment of the present application is not limited thereto.
WiFi belongs to short range wireless transmission technology, and wearable device can help user to receive and dispatch by WiFi module 102 Email, browsing webpage and access streaming video etc., it provides wireless broadband internet access for user.Although Fig. 1 WiFi module 102 is shown, but it is understood that, and it is not belonging to must be configured into for wearable device, it completely can root It is omitted within the scope of not changing the essence of the invention according to needs.
Audio output unit 103 can be in call signal reception pattern, call mode, record in wearable device 100 When under the isotypes such as mode, speech recognition mode, broadcast reception mode, by radio frequency unit 101 or WiFi module 102 it is received or The audio data that person stores in memory 109 is converted into audio signal and exports to be sound.Moreover, audio output unit 103 can also provide audio output relevant to the specific function that wearable device 100 executes (for example, call signal reception sound Sound, message sink sound etc.).Audio output unit 103 may include loudspeaker, buzzer etc..
A/V input unit 104 is for receiving audio or video signal.A/V input unit 104 may include graphics processor (Graphics Processing Unit, GPU) 1041 and microphone 1042, graphics processor 1041 is in video acquisition mode Or the image data of the static images or video obtained in image capture mode by image capture apparatus (such as camera) carries out Reason.Treated, and picture frame may be displayed on display unit 106.Through graphics processor 1041, treated that picture frame can be deposited Storage is sent in memory 109 (or other storage mediums) or via radio frequency unit 101 or WiFi module 102.Mike Wind 1042 can connect in telephone calling model, logging mode, speech recognition mode etc. operational mode via microphone 1042 Quiet down sound (audio data), and can be audio data by such acoustic processing.Audio that treated (voice) data can To be converted to the format output that can be sent to mobile communication base station via radio frequency unit 101 in the case where telephone calling model. Microphone 1042 can be implemented various types of noises elimination (or inhibition) algorithms and send and receive sound to eliminate (or inhibition) The noise generated during frequency signal or interference.
In one embodiment, wearable device 100 includes one or more cameras, by opening camera, It can be realized the capture to image, realize the functions such as take pictures, record a video, the position of camera, which can according to need, to be configured.
Wearable device 100 further includes at least one sensor 105, for example, optical sensor, motion sensor and other Sensor.Specifically, optical sensor includes ambient light sensor and proximity sensor, wherein ambient light sensor can be according to ring The light and shade of border light adjusts the brightness of display panel 1061, proximity sensor can when wearable device 100 is moved in one's ear, Close display panel 1061 and/or backlight.As a kind of motion sensor, accelerometer sensor can detect in all directions The size of (generally three axis) acceleration, can detect that size and the direction of gravity, can be used to identify mobile phone posture when static It (for example pedometer, is struck using (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function Hit) etc..
In one embodiment, wearable device 100 further includes proximity sensor, can by using proximity sensor Wearable device can be realized non-contact manipulation, provide more modes of operation.
In one embodiment, wearable device 100 further includes heart rate sensor, when wearing, by close to using Person can be realized the detecting of heart rate.
In one embodiment, wearable device 100 can also include that fingerprint sensor can by reading fingerprint Realize the functions such as safety verification.
Display unit 106 is for showing information input by user or being supplied to the information of user.Display unit 106 can wrap Display panel 1061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode can be used Forms such as (Organic Light-Emitting Diode, OLED) configure display panel 1061.
In one embodiment, display panel 1061 uses flexible display screen, and wearable using flexible display screen sets For when wearing, screen is able to carry out bending, to more be bonded.Optionally, the flexible display screen can use OLED screen Body and graphene screen body, in other embodiments, the flexible display screen is also possible to other display materials, the present embodiment It is not limited thereto.
In one embodiment, the display panel 1061 of wearable device can take rectangle, ring when convenient for wearing Around.In other embodiments, other modes can also be taken.
User input unit 107 can be used for receiving the number or character information of input, and generate and wearable device User setting and the related key signals input of function control.Specifically, user input unit 107 may include touch panel 1071 And other input equipments 1072.Touch panel 1071, also referred to as touch screen collect the touch behaviour of user on it or nearby Make (for example user uses any suitable objects or attachment such as finger, stylus on touch panel 1071 or in touch panel Operation near 1071), and corresponding attachment device is driven according to preset formula.Touch panel 1071 may include touching Two parts of detection device and touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch behaviour Make bring signal, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and It is converted into contact coordinate, then gives processor 110, and order that processor 110 is sent can be received and executed.This Outside, touch panel 1071 can be realized using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves.In addition to touching Panel 1071 is controlled, user input unit 107 can also include other input equipments 1072.Specifically, other input equipments 1072 It can include but is not limited to physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, operation One of bar etc. is a variety of, specifically herein without limitation.
In one embodiment, one or more buttons have can be set in the side of wearable device 100.Button can be with The various ways such as short-press, long-pressing, rotation are realized, to realize a variety of operating effects.The quantity of button can be different to be multiple It can be applied in combination between button, realize a variety of operating functions.
Further, touch panel 1071 can cover display panel 1061, when touch panel 1071 detect on it or After neighbouring touch operation, processor 110 is sent to determine the type of touch event, is followed by subsequent processing device 110 according to touch thing The type of part provides corresponding visual output on display panel 1061.Although in Fig. 1, touch panel 1071 and display panel 1061 be the function that outputs and inputs of realizing wearable device as two independent components, but in certain embodiments, Touch panel 1071 and display panel 1061 can be integrated and be realized the function that outputs and inputs of wearable device, specifically herein Without limitation.For example, processor 110 can be controlled when receiving the message informing of a certain application program by radio frequency unit 101 The message informing show in a certain predeterminable area of display panel 1061 by system, the predeterminable area and touch panel 1071 certain One region is corresponding, can be to corresponding to area on display panel 1061 by carrying out touch control operation to a certain region of touch panel 1071 The message informing shown in domain is controlled.
Interface unit 108 be used as at least one external device (ED) connect with wearable device 100 can by interface.Example Such as, external device (ED) may include wired or wireless headphone port, external power supply (or battery charger) port, You Xianhuo Wireless data communications port, memory card port, the port for connecting the device with identification module, audio input/output (I/O) end Mouth, video i/o port, ear port etc..Interface unit 108 can be used for receiving the input from external device (ED) (for example, number It is believed that breath, electric power etc.) and the input received is transferred to one or more elements in wearable device 100 or can For transmitting data between wearable device 100 and external device (ED).
In one embodiment, wearable device 100 interface unit 108 using contact structure, by contact with Corresponding other equipment connection, realizes the functions such as charging, connection.Use contact can be with waterproof.
Memory 109 can be used for storing software program and various data.Memory 109 can mainly include storing program area The storage data area and, wherein storing program area can (such as the sound of application program needed for storage program area, at least one function Sound playing function, image player function etc.) etc.;Storage data area can store according to mobile phone use created data (such as Audio data, phone directory etc.) etc..In addition, memory 109 may include high-speed random access memory, it can also include non-easy The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Processor 110 is the control centre of wearable device, utilizes various interfaces and the entire wearable device of connection Various pieces, by running or execute the software program and/or module that are stored in memory 109, and call and be stored in Data in memory 109 execute the various functions and processing data of wearable device, to carry out to wearable device whole Monitoring.Processor 110 may include one or more processing units;Preferably, processor 110 can integrate application processor and modulation Demodulation processor, wherein the main processing operation system of application processor, user interface and application program etc., modulation /demodulation processing Device mainly handles wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 110.
Wearable device 100 can also include the power supply 111 (such as battery) powered to all parts, it is preferred that power supply 111 can be logically contiguous by power-supply management system and processor 110, thus charged by power-supply management system realization management, The functions such as electric discharge and power managed.
Although Fig. 1 is not shown, wearable device 100 can also be including bluetooth module etc., and details are not described herein.It is wearable to set Standby 100, by bluetooth, can connect with other terminal devices, realize communication and the interaction of information.In the embodiment of the present application Wearable device, including flexible screen.In wearable device expansion, flexible screen is elongated;It is in wearable device When wearing state, flexible screen bending is annular in shape.
First embodiment
As shown in Fig. 2, the application first embodiment provides a kind of slide response method, this method is set for wearable Standby, the slide response method includes:
Step S21, judge whether view control slides into the predeterminated position of screen.
In the present embodiment, bottom container can be any ViewGroup container, and view control includes but is not limited to ScrollView、ListView、RecyclerView。
Wherein, ScrollView is a kind of container with scrolling function, it provides a kind of mode can be in limited display More contents are browsed in region.Usual ScrollView can be used cooperatively with Mask component, while can also be added ScrollBar component shows the position of browsing content.
ListView is to show vertical rotatable listings view, and an adaptation can be used in the source of list items Content can be converted into view from source (such as array or database) and put in lists by Adapter, Adapter.
RecyclerView be in Android L version newly added one be used to replace the SDK of ListView, its spirit Activity and substitutability ratio ListView are more preferable.It only only maintains a small amount of View and can show a large amount of data set.
In one embodiment, the predeterminated position for judging view control and whether sliding into screen, before further include:
Monitor finger down event;
In the case where listening to finger down event, execution is described to judge whether view control slides into the default of screen The step of position.
In this embodiment, the rolling event of view control generally includes: finger down, finger pull list it is mobile, Finger stops pulling, finger lifts etc., can listen to corresponding event by the method for calling view control.
Such as: the rolling event of RecyclerView can by setOnScrollListener (), AddOnScrollListener () is monitored;The rolling event of ListIView, one is to pass through OnTouchListener It is monitored to realize, the other is realizing monitoring using OnScrollListener;ScrollView can pass through ScrollChanged () method is exposed to outside to realize and monitor.
After listening to finger down event, that is, it can determine whether view control slides into the predeterminated position of screen.
In one embodiment, described to judge whether view control slides into the predeterminated position of screen and include:
According to the position of the visible subitem of the view control, judge whether the view control slides into the default of screen Position.
In this embodiment, the position of the visible subitem according to the view control, judges the view control Whether the predeterminated position of screen, including at least one of are slided into:
According to the position of the first of the view control visible subitem, judge whether the view control slides into screen Top;
According to the position of the last one visible subitem of the view control, judge whether the view control slides into screen The bottom of curtain.
As illustratively, the position of the visible subitem of the last one of RecyclerView is LastVisibleItemPosition, all subitem numbers are totalItemCount, when the last one subitem in screen LastVisibleItemPosition is equal to all subitem number totalItemCount-1, then RecyclerView is just slided Move the bottom of screen.
In another embodiment, described to judge whether view control slides into the predeterminated position of screen and include:
According to the height of the sliding distance of the view control, the height of the view control and the screen, judgement Whether the view control slides into the predeterminated position of screen.
As illustratively, the height of ScrollView indicates that getHeight () is indicated with getMeasuredHeight () The height of the visible height, that is, screen of scrollView, getScrollY () indicate ScrollView y-axis rolling distance, Judge that ScrollView slides into the condition of the bottom of screen are as follows:
GetScrollY () >=getHeight ()-getMeasuredHeight ().
Step S22, in the case where the view control slides into the predeterminated position of screen, the view control is set Layout parameter attribute value.
In the present embodiment, sub- View tells that father's container (ViewGroup) should by layout parameter LayoutParams How oneself is placed, and LayoutParams and ViewGroup are closely bound up.The margin attribute of LayoutParams is used for The setting of the back gauge of sub- View and father's container.
In one embodiment, the layout parameter attribute value of the setting view control includes:
Calculate the sliding distance of the view control;
The layout parameter attribute value of the view control is set according to the sliding distance of the view control.
As illustratively, when RecyclerView has slided into the top (or bottom) of screen, continue interception event, simultaneously It calculates that this receives event and last time receives moving distance dy in event in Y direction, is then arranged RecyclerView pairs The LayoutParams attribute answered.If having slided into the top of screen, then LayoutParams.topMargin is set;If The bottom for having slided into screen, then be arranged LayoutParams.bottomMargin.It, can be right according further to different demands Dy does appropriate amendment.
In one embodiment, the layout of the view control is arranged in the sliding distance according to the view control Parameter attribute value includes:
Determine maximum sliding distance;
The layout ginseng of the view control is set according to the sliding distance of the view control and the maximum sliding distance Number attribute value.
In this embodiment, by pre-set maximum sliding distance, the view control sliding distance not In the case where greater than maximum sliding distance, can the sliding distance of view control described in direct basis the cloth of the view control is set Office's parameter attribute value.In the case where the sliding distance of the view control is less than maximum sliding distance, then with slide greatly away from From the layout parameter attribute value that the view control is arranged.
Step S23, the sliding position of the view control is calculated beyond the distance of the predeterminated position of the screen.
In the present embodiment, after the view control slides into the predeterminated position of screen and the case where continuing sliding Under, the sliding position of the view control can be calculated beyond the distance of the predeterminated position of the screen, then execute attribute animation.
In one embodiment, the sliding position for calculating the view control exceeds the predeterminated position of the screen Distance, before further include:
Monitor digit up event;
In the case where listening to digit up event, the sliding position for calculating the view control is executed beyond the screen Curtain predeterminated position apart from the step of.
In this embodiment, the rolling event of view control generally includes: finger down, finger pull list it is mobile, Finger stops pulling, finger lifts etc., can listen to corresponding event by the method for calling view control.
Such as: the rolling event of RecyclerView can by setOnScrollListener (), AddOnScrollListener () is monitored;The rolling event of ListIView, one is to pass through OnTouchListener It is monitored to realize, the other is realizing monitoring using OnScrollListener;ScrollView can pass through ScrollChanged () method is exposed to outside to realize and monitor.
After listening to digit up event, the distance that sliding exceeds predeterminated position can be calculated, attribute is then executed Animation makes the view control spring back to the predeterminated position of the screen.
Step S24, institute is exceeded according to the sliding position of the layout parameter attribute value of the view control, the view control The distance of the predeterminated position of screen is stated, the predeterminated position that attribute animation makes the view control spring back to the screen is executed.
Connect above-mentioned example, can to RecyclerView LayoutParams.topMargin (or LayoutParams.bottomMargin) one ValueAnimator animation, target value 0 are set, and monitor OnAnimationUpdate method.After the change of this sub-value, desired value next time is calculated.After configuring suitable interpolation device, this The value of sample LayoutParams.topMargin (or LayoutParams.bottomMargin) will be gradually reduced.And it is each LayoutParams. value changes, and can all redraw corresponding container to corresponding position.In this way, RecyclerView will be with The variation of the value of LayoutParams and move, be finally displaced into the top (or bottom) of screen.
In order to preferably illustrate the present embodiment, Fig. 3-Fig. 4 is combined to ring slide by taking RecyclerView as an example below Process is answered to be illustrated:
As shown in Figure 3 and Figure 4,41 in figure are the power button of wearable device 40, and 42 be the aobvious of wearable device 40 Display screen.Power button 41 has the two-in-one function of POWER and HOME, when currently the interface HOME is shown in display screen 42, presses Execution is put out screen movement by lower power button 41;When currently locking screen interface is shown in display screen 42, pressing power button 41 will It closes locking screen interface and shows the interface HOME;When currently default Application Program Interface is shown in display screen 42, power supply is pressed Key 41 will show the interface HOME.
When listening to finger down display screen 42, it can determine whether RecyclerView slides into the bottom of display screen 42 Portion;If RecyclerView slides into the bottom of display screen 42, RecyclerView is calculated in the moving distance of Y direction Then the LayoutParams.bottomMargin attribute of RecyclerView is arranged in dy;Finally, being lifted listening to finger When display screen 42, that is, the bottom that attribute animation makes RecyclerView spring back to display screen 42 can be performed.
The slide response method of the embodiment of the present application is redrawn by the way that the layout parameter attribute value of view control is arranged View control realizes the movement of view control;The sliding effect for solving application program in existing wearable device is not obvious Change, reduce user experience the problem of;Realize view control can continue to sliding beyond screen after sliding into screen edge Curtain boundary, automatic rebounding improves user experience to screen edge after lifting hand.
Second embodiment
As shown in figure 5, the application second embodiment provides a kind of wearable device, the wearable device includes memory 61, processor 62 and it is stored in the slide responder that can be run on the memory 61 and on the processor 62, When the slide responder is executed by the processor 62, for realizing slide response method as described below Step:
Judge whether view control slides into the predeterminated position of screen;
In the case where the view control slides into the predeterminated position of screen, the layout parameter of the view control is set Attribute value;
The sliding position of the view control is calculated beyond the distance of the predeterminated position of the screen;
According to the sliding position of the layout parameter attribute value of the view control, the view control beyond the screen The distance of predeterminated position executes the predeterminated position that attribute animation makes the view control spring back to the screen.
When the slide responder is executed by the processor 62, it is also used to realize slide as described below The step of response method:
The predeterminated position for judging view control and whether sliding into screen, before further include:
Monitor finger down event;
In the case where listening to finger down event, execution is described to judge whether view control slides into the default of screen The step of position.
When the slide responder is executed by the processor 62, it is also used to realize slide as described below The step of response method:
It is described to judge whether view control slides into the predeterminated position of screen and include:
According to the position of the visible subitem of the view control, judge whether the view control slides into the default of screen Position.
When the slide responder is executed by the processor 62, it is also used to realize slide as described below The step of response method:
The position of the visible subitem according to the view control, judges whether the view control slides into screen Predeterminated position, including at least one of:
According to the position of the first of the view control visible subitem, judge whether the view control slides into screen Top;
According to the position of the last one visible subitem of the view control, judge whether the view control slides into screen The bottom of curtain.
When the slide responder is executed by the processor 62, it is also used to realize slide as described below The step of response method:
It is described to judge whether view control slides into the predeterminated position of screen and include:
According to the height of the sliding distance of the view control, the height of the view control and the screen, judgement Whether the view control slides into the predeterminated position of screen.
When the slide responder is executed by the processor 62, it is also used to realize slide as described below The step of response method:
The layout parameter attribute value of the setting view control includes:
Calculate the sliding distance of the view control;
The layout parameter attribute value of the view control is set according to the sliding distance of the view control.
When the slide responder is executed by the processor 62, it is also used to realize slide as described below The step of response method:
The layout parameter attribute value that the view control is arranged in the sliding distance according to the view control includes:
Determine maximum sliding distance;
The layout ginseng of the view control is set according to the sliding distance of the view control and the maximum sliding distance Number attribute value.
When the slide responder is executed by the processor 62, it is also used to realize slide as described below The step of response method:
The distance of the predeterminated position of the sliding position for calculating the view control beyond the screen, is also wrapped before It includes:
Monitor digit up event;
In the case where listening to digit up event, the sliding position for calculating the view control is executed beyond the screen Curtain predeterminated position apart from the step of.
The wearable device of the embodiment of the present application redraws view control by the way that the layout parameter attribute value of view control is arranged Part realizes the movement of view control;The sliding effect for solving application program in existing wearable device does not change significantly The problem of becoming, reducing user experience;Realize view control can continue to sliding beyond screen side after sliding into screen edge Boundary, automatic rebounding improves user experience to screen edge after lifting hand.
3rd embodiment
The application 3rd embodiment provides a kind of computer readable storage medium, deposits on the computer readable storage medium Slide responder is contained, for realizing described in first embodiment when the slide responder is executed by processor Slide response method the step of.
It should be noted that the computer readable storage medium of the present embodiment, belongs to same with the method for first embodiment Design, specific implementation process is shown in embodiment of the method in detail, and the technical characteristic in embodiment of the method is right in the present embodiment It should be applicable in, which is not described herein again.
The computer readable storage medium of the embodiment of the present application, by the way that the layout parameter attribute value of view control, weight is arranged View control is drawn to realize the movement of view control;The sliding effect for solving application program in existing wearable device is not bright The problem of aobvious change, reduction user experience;It realizes view control and can continue to slide after sliding into screen edge and exceed Screen border, automatic rebounding improves user experience to screen edge after lifting hand.
Based on above-mentioned each embodiment, it can be seen that if the equipment is wrist-watch, bracelet or wearable device When, the screen of the equipment can not overlay device watchband region, can also be with the watchband region of overlay device.Here, this Shen It please propose a kind of optional embodiment, in the present embodiment, the equipment for wrist-watch, bracelet or wearable can be set Standby, the equipment includes screen and interconnecting piece.The screen can be flexible screen, and the interconnecting piece can be watchband.It can Choosing, the screen of the equipment or the viewing area of screen can be partly or completely covered on the watchband of equipment.Such as Fig. 6 Shown, Fig. 6 is a kind of a kind of hardware schematic of embodiment of wearable device provided by the embodiments of the present application, the equipment Screen extends to two sides, and part is covered on the watchband of equipment.In other embodiments, the screen of the equipment can also be with All it is covered on the watchband of the equipment.
It will appreciated by the skilled person that whole or certain steps, system, dress in method disclosed hereinabove Functional module/unit in setting may be implemented as software, firmware, hardware and its combination appropriate.In hardware embodiment, Division between the functional module/unit referred in the above description not necessarily corresponds to the division of physical assemblies;For example, one Physical assemblies can have multiple functions or a function or step and can be executed by several physical assemblies cooperations.Certain objects Reason component or all physical assemblies may be implemented as by processor, such as central processing unit, digital signal processor or micro process The software that device executes, is perhaps implemented as hardware or is implemented as integrated circuit, such as specific integrated circuit.Such software Can be distributed on a computer-readable medium, computer-readable medium may include computer storage medium (or non-transitory be situated between Matter) and communication media (or fugitive medium).As known to a person of ordinary skill in the art, term computer storage medium includes In any method or skill for storing information (such as computer readable instructions, data structure, program module or other data) The volatile and non-volatile implemented in art, removable and nonremovable medium.Computer storage medium includes but is not limited to RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storages, magnetic Box, tape, disk storage or other magnetic memory apparatus or it can be used for storing desired information and can be visited by computer Any other medium asked.In addition, known to a person of ordinary skill in the art be, communication media generally comprises computer-readable Other numbers in the modulated data signal of instruction, data structure, program module or such as carrier wave or other transmission mechanisms etc According to, and may include any information delivery media.
Above by reference to Detailed description of the invention preferred embodiment of the present application, not thereby limit to the interest field of the application.This Field technical staff does not depart from made any modifications, equivalent replacements, and improvements in scope of the present application and essence, should all be at this Within the interest field of application.

Claims (10)

1. a kind of slide response method, this method is used for wearable device, which is characterized in that the slide responder Method includes:
Judge whether view control slides into the predeterminated position of screen;
In the case where the view control slides into the predeterminated position of screen, the layout parameter attribute of the view control is set Value;
The sliding position of the view control is calculated beyond the distance of the predeterminated position of the screen;
According to the sliding position of the layout parameter attribute value of the view control, the view control beyond the default of the screen The distance of position executes the predeterminated position that attribute animation makes the view control spring back to the screen.
2. slide response method according to claim 1, which is characterized in that described to judge whether view control is slided To the predeterminated position of screen, before further include:
Monitor finger down event;
In the case where listening to finger down event, the predeterminated position for judging view control and whether sliding into screen is executed The step of.
3. slide response method according to claim 1, which is characterized in that described to judge whether view control is slided Predeterminated position to screen includes:
According to the position of the visible subitem of the view control, judge whether the view control slides into the default position of screen It sets.
4. slide response method according to claim 3, which is characterized in that it is described according to the view control can The position for seeing subitem, judges whether the view control slides into the predeterminated position of screen, including at least one of:
According to the position of the first of the view control visible subitem, judge whether the view control slides into the top of screen Portion;
According to the position of the last one visible subitem of the view control, judge whether the view control slides into screen Bottom.
5. slide response method according to claim 1, which is characterized in that described to judge whether view control is slided Predeterminated position to screen includes:
According to the height of the sliding distance of the view control, the height of the view control and the screen, described in judgement Whether view control slides into the predeterminated position of screen.
6. slide response method according to claim 1, which is characterized in that the cloth of the setting view control Office parameter attribute value include:
Calculate the sliding distance of the view control;
The layout parameter attribute value of the view control is set according to the sliding distance of the view control.
7. slide response method according to claim 6, which is characterized in that the cunning according to the view control It is dynamic to include: apart from the layout parameter attribute value that the view control is arranged
Determine maximum sliding distance;
The layout parameter category of the view control is set according to the sliding distance of the view control and the maximum sliding distance Property value.
8. slide response method according to claim 1, which is characterized in that the cunning for calculating the view control The distance of dynamic predeterminated position of the position beyond the screen, before further include:
Monitor digit up event;
In the case where listening to digit up event, the sliding position for calculating the view control is executed beyond the screen Predeterminated position apart from the step of.
9. a kind of wearable device, which is characterized in that the wearable device includes memory, processor and is stored in described deposit On reservoir and the slide responder that can run on the processor, the slide responder is by the processing It realizes when device executes such as the step of slide response method described in any item of the claim 1 to 8.
10. a kind of computer readable storage medium, which is characterized in that be stored on the computer readable storage medium power supply by Key processing routine is realized when the power button processing routine is executed by the processor such as any one of claims 1 to 8 institute The step of slide response method stated.
CN201910203668.9A 2019-03-18 2019-03-18 Slide response method, wearable device and computer readable storage medium Pending CN109976609A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910203668.9A CN109976609A (en) 2019-03-18 2019-03-18 Slide response method, wearable device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910203668.9A CN109976609A (en) 2019-03-18 2019-03-18 Slide response method, wearable device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN109976609A true CN109976609A (en) 2019-07-05

Family

ID=67079319

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910203668.9A Pending CN109976609A (en) 2019-03-18 2019-03-18 Slide response method, wearable device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109976609A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111506242A (en) * 2020-05-28 2020-08-07 支付宝(杭州)信息技术有限公司 Method and device for achieving elastic rolling effect of page view and electronic equipment
CN111782097A (en) * 2020-06-30 2020-10-16 北京达佳互联信息技术有限公司 Image resource switching method and device
CN112286427A (en) * 2020-09-25 2021-01-29 浪潮金融信息技术有限公司 Multimedia material display and interaction method and system based on Android operating system
CN112882636A (en) * 2021-02-18 2021-06-01 上海哔哩哔哩科技有限公司 Picture processing method and device
CN112911362A (en) * 2021-01-29 2021-06-04 广州虎牙科技有限公司 Video image moving and zooming method and device, electronic equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130239046A1 (en) * 2007-01-07 2013-09-12 Apple Inc. Application Programming Interfaces for Scrolling Operations
CN105630339A (en) * 2015-12-24 2016-06-01 小米科技有限责任公司 Method and device for controlling page
CN106095283A (en) * 2016-06-07 2016-11-09 深圳市航盛电子股份有限公司 A kind of Android ListView resilient movement method
CN107977150A (en) * 2017-10-31 2018-05-01 阿里巴巴集团控股有限公司 A kind of view scrolling method, device and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130239046A1 (en) * 2007-01-07 2013-09-12 Apple Inc. Application Programming Interfaces for Scrolling Operations
CN105630339A (en) * 2015-12-24 2016-06-01 小米科技有限责任公司 Method and device for controlling page
CN106095283A (en) * 2016-06-07 2016-11-09 深圳市航盛电子股份有限公司 A kind of Android ListView resilient movement method
CN107977150A (en) * 2017-10-31 2018-05-01 阿里巴巴集团控股有限公司 A kind of view scrolling method, device and electronic equipment

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111506242A (en) * 2020-05-28 2020-08-07 支付宝(杭州)信息技术有限公司 Method and device for achieving elastic rolling effect of page view and electronic equipment
CN111782097A (en) * 2020-06-30 2020-10-16 北京达佳互联信息技术有限公司 Image resource switching method and device
CN112286427A (en) * 2020-09-25 2021-01-29 浪潮金融信息技术有限公司 Multimedia material display and interaction method and system based on Android operating system
CN112911362A (en) * 2021-01-29 2021-06-04 广州虎牙科技有限公司 Video image moving and zooming method and device, electronic equipment and readable storage medium
CN112911362B (en) * 2021-01-29 2024-03-08 广州虎牙科技有限公司 Video picture moving and scaling method and device, electronic equipment and readable storage medium
CN112882636A (en) * 2021-02-18 2021-06-01 上海哔哩哔哩科技有限公司 Picture processing method and device
CN112882636B (en) * 2021-02-18 2022-05-17 上海哔哩哔哩科技有限公司 Picture processing method and device

Similar Documents

Publication Publication Date Title
CN109976609A (en) Slide response method, wearable device and computer readable storage medium
CN109982179A (en) Audio frequency signal output, device, wearable device and storage medium
CN110062279A (en) Video method of cutting out, wearable device and computer readable storage medium
CN110083289A (en) A kind of button display methods, wearable device and computer readable storage medium
CN110175066A (en) Wearable device, interaction control method and computer readable storage medium
CN110099176A (en) Breath screen display methods, wearable device and computer readable storage medium
CN110162178A (en) Illustrate the methods of exhibiting, wearable device and storage medium of information
CN110109537A (en) A kind of wearable device and its gesture identification method and computer readable storage medium
CN109995938A (en) A kind of notice display methods, mobile phone, wearable device and calculate readable storage medium storing program for executing
CN110069132A (en) Application control method, intelligent wearable device and computer readable storage medium
CN109947325A (en) Application icon display methods, wearable device and computer readable storage medium
CN109976851A (en) Menu item display methods, wearable device and computer readable storage medium
CN109947501A (en) Starting processing method, wearable device and the storage medium of application program
CN110162369A (en) Wearable device and its icon arrangement method and computer readable storage medium
CN110069193A (en) A kind of interface switching method of wearable device, wearable device and storage medium
CN110134312A (en) Control method, wearable device and computer readable storage medium
CN110086929A (en) Breath screen display methods, mobile phone, wearable device and computer readable storage medium
CN110139270A (en) Wearable device matching method, wearable device and computer readable storage medium
CN110071866A (en) A kind of instant messaging application control method, wearable device and storage medium
CN110099162A (en) A kind of page display processing method and wearable device
CN110187950A (en) Adjust method, wearable device and the storage medium of picture position
CN110096247A (en) Wearable device and its control method for screen display and computer readable storage medium
CN109981905A (en) Information Quick-return method, wearable device and computer readable storage medium
CN110134311A (en) A kind of screen display method, wearable device and computer readable storage medium
CN110018775A (en) A kind of content display method, terminal 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190705