WO2021110133A1 - Control operation method and electronic device - Google Patents

Control operation method and electronic device Download PDF

Info

Publication number
WO2021110133A1
WO2021110133A1 PCT/CN2020/133858 CN2020133858W WO2021110133A1 WO 2021110133 A1 WO2021110133 A1 WO 2021110133A1 CN 2020133858 W CN2020133858 W CN 2020133858W WO 2021110133 A1 WO2021110133 A1 WO 2021110133A1
Authority
WO
WIPO (PCT)
Prior art keywords
sliding
operation control
interface
sliding process
electronic device
Prior art date
Application number
PCT/CN2020/133858
Other languages
French (fr)
Chinese (zh)
Inventor
丁祎
张婷
曾国毅
付琪
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021110133A1 publication Critical patent/WO2021110133A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • 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/0482Interaction with lists of selectable items, e.g. menus
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72469User interfaces specially adapted for cordless or mobile telephones for operating the device by selecting functions from two or more displayed items, e.g. menus or icons

Definitions

  • This application relates to the field of terminal technology, and in particular, to an operation method of a control and an electronic device.
  • the present application provides a control operation method and electronic device, which can realize a user's one-handed control operation on the display interface without changing the display content of the display interface, thereby improving the user experience when the user is operating with one hand.
  • the method further includes: detecting that the above-mentioned sliding operation satisfies the second sliding process, and the starting position of the second sliding process is the end of the first sliding process Position, in the first sliding process and the second sliding process, the touch body does not leave the touch screen of the electronic device; then, in response to the above-mentioned second sliding process, the electronic device can display the second operation control in the first interface as an active state , And display the first operation control as a deactivated state. That is, after the first operation control is activated, the electronic device can switch the activated first operation control to the second operation control in response to the second sliding process in the sliding operation input by the user, until the activated operation control is The operation control that the user wants to click this time.
  • the second operation control when the projection of the sliding distance in the second direction in the second sliding process is greater than the second preset distance, the second operation control is the closest to the first operation control in the second direction
  • the second direction is the same or different from the first direction. That is, the electronic device can switch the activated operation control along the sliding direction (ie, the second direction) in the second sliding process.
  • the method further includes: detecting that the above-mentioned sliding operation satisfies the third sliding Process, the sliding direction of the third sliding process is opposite to the sliding direction of the second sliding process, and the difference between the sliding distance of the third sliding process and the sliding distance of the second sliding process is less than the preset value.
  • the touch body does not leave the touch screen of the electronic device; in response to the above-mentioned third sliding process, the electronic device can redisplay the first operation control as an activated state and display the second operation control as a deactivated state. That is to say, the user can trigger the electronic device to return to the last activated operation control by inputting a sliding process with the opposite sliding direction, which is convenient for the user to quickly select the operation control that needs to be clicked this time.
  • the above-mentioned first operation control may be a control including a secondary menu; after displaying the first operation control in an activated state, the method further includes: detecting that the touch body is at the end position of the first sliding process Stay time; if the stay time is greater than the preset time, it means that the user is likely to need to click the currently activated first operation control, and the electronic device may display the second-level menu of the first operation control in the first interface. That is to say, when entering the one-handed operation mode, the electronic device can also respond to the sliding process input by the user to open the secondary menu of the operation controls, which is convenient for the user to select the operation control to be clicked this time in the secondary menu.
  • the method further includes: detecting that the above-mentioned sliding operation satisfies the fourth sliding process, and the starting position of the fourth sliding process is the first The end position of the sliding process. Similarly, in the fourth sliding process, the touch body does not leave the touch screen of the electronic device; then, in response to the fourth sliding process, the electronic device can display the third operation control in the secondary menu Is active.
  • a refresh button is hidden in the first interface, and the refresh button is adjacent to the first operation control in the third direction, and the third direction is the same as or different from the first direction;
  • an operation control is displayed as an activated state, it further includes: detecting that the above-mentioned sliding operation satisfies a fifth sliding process, which refers to a process of moving a third preset distance in a third direction from the end position of the first sliding process Similarly, in the fifth sliding process, the touch body does not leave the touch screen of the electronic device; then, in response to the fifth sliding process, the electronic device can display the refresh button in the first interface and display the refresh button Is active. That is, if a refresh button is provided in the first interface, the electronic device can also activate the refresh button according to the corresponding sliding process input by the user in the sliding operation.
  • the method further includes: if it is detected that the touch body leaves the first interface, the electronic device may execute Click the refresh operation corresponding to the refresh button; if it is detected that the touch body continues to slide, the electronic device can continue to display the refresh button as an activated state.
  • the electronic device after the electronic device enters the one-hand operation mode, it can not only control the operation controls on the top of the display interface, but also support the refresh operation in the display interface, avoiding the sliding operation of the user entering the one-hand operation mode in the same display interface and the display interface supports The refresh operation conflicted.
  • the first operation control when the starting position of the first sliding process is located in the left half of the first interface, the first operation control may be the leftmost operation control at the top of the first interface; When the starting position of the process is in the right half of the first interface, the first operation control can be the rightmost operation control at the top of the first interface; or, when the ending position of the first sliding process is in the left half of the first interface When the first operation control can be the leftmost operation control at the top of the first interface; when the end position of the first sliding process is in the right half of the first interface, the first operation control can be the rightmost operation control at the top of the first interface Operational controls. That is, the electronic device can determine which operation control in the first interface is specifically activated according to the position of the touch point in the first interface during the first sliding process.
  • the electronic device may also determine which operation control in the first interface is specifically activated according to the user's holding posture when inputting the first sliding process. For example, when the user's holding posture is the left-hand holding posture, the first operation control may be the right-most operation control at the top of the first interface; when the user's holding posture is the right-hand holding posture, the first operation control may be It is the leftmost operation control at the top of the first interface.
  • the electronic device displaying the first operation control as the activated state includes: the electronic device displays the first operation control as the activated state by changing the shape, size, color or background of the first operation control.
  • the electronic device may also play a prompt sound or generate vibration to prompt the user while displaying the first operation control as an activated state.
  • the end of the above sliding operation means that the touch body leaves the touch screen of the electronic device; at this time, the electronic device displays the second interface in response to the end of the sliding operation, which specifically includes: when it is detected that the touch body leaves the electronic device
  • the click event of the first operation control is reported to the application to which the first interface belongs, so that the application responds to the click event to display the second interface that will be displayed after the first operation control is clicked.
  • the above-mentioned first direction may refer to a direction from the top of the first interface to the bottom of the first interface. That is, the user can trigger the electronic device to activate the first operation control on the top of the first interface by inputting a pull-down operation in the first interface.
  • the present application provides an electronic device with a touch screen, including a display unit, a receiving unit, and a detection unit.
  • the display unit is configured to: display a first interface of the application, and a first operation control is provided on the top of the first interface; receiving The unit is used for: receiving the sliding operation input by the user on the first interface; the detecting unit is used for: detecting that the sliding operation satisfies the first sliding process, the first sliding process refers to the first sliding of the touch body in the first direction after contacting the first interface A process of a preset distance; the display unit is also used for: when it is detected that the sliding operation satisfies the first sliding process, display the first operation control as an activated state; when the sliding operation ends, display a second interface, wherein, The second interface is the interface that will be displayed after the first operation control is clicked.
  • the detection unit is further configured to: detect that the sliding operation satisfies a second sliding process, and the start position of the second sliding process is the end position of the first sliding process, wherein, in the first sliding process And during the second sliding process, the touch body remains touched on the touch screen of the electronic device; the above-mentioned display unit is further configured to: in response to detecting that the sliding operation satisfies the second sliding process, display the second operation control in the first interface as The activated state, and the first operation control is displayed in the deactivated state.
  • the detection unit is further configured to detect that the sliding operation satisfies the third sliding process, the sliding direction of the third sliding process is opposite to the sliding direction of the second sliding process, and the sliding of the third sliding process
  • the difference between the distance and the sliding distance of the second sliding process is less than the preset value, wherein during the third sliding process, the touch body keeps touching on the touch screen of the electronic device; the above-mentioned display unit is also used for: in response to detecting that the sliding operation satisfies In the third sliding process, the first operation control is displayed in the activated state again, and the second operation control is displayed in the deactivated state.
  • the detection unit is further used to detect the dwell time of the touch body at the end position of the first sliding process; the display unit is also used to: if the dwell time is greater than the preset time, then The secondary menu of the first operation control is displayed on the interface.
  • the detection unit is further configured to: detect that the sliding operation satisfies the fourth sliding process, the starting position of the fourth sliding process is the ending position of the first sliding process, and during the fourth sliding process, The touch body keeps touching on the touch screen of the electronic device; the above-mentioned display unit is further configured to: in response to the sliding operation satisfying the fourth sliding process, display the third operation control in the secondary menu as an active state.
  • a refresh button is hidden in the first interface, and the refresh button is adjacent to the first operation control in the third direction, and the third direction is the same as or different from the first direction; in this case, the above detection unit It is also used to detect that the above sliding operation satisfies the fifth sliding process.
  • the fifth sliding process refers to the process of moving a third preset distance in the third direction from the end position of the first sliding process.
  • touch The body keeps touching on the touch screen of the electronic device; the above-mentioned display unit is further configured to: in response to detecting that the sliding operation satisfies the fifth sliding process, display the refresh button in the first interface and display the refresh button in an activated state.
  • the above electronic device further includes an execution unit, wherein, if the detection unit detects that the touch body leaves the first interface, the execution unit executes a refresh operation corresponding to clicking the refresh button; if the execution unit detects If the touch body continues to slide, the display unit can continue to display the refresh button as an activated state.
  • the above-mentioned display unit may specifically display the first operation control in an activated state by changing the shape, size, color or background of the first operation control.
  • the end of the above sliding operation means that the touch body leaves the touch screen of the electronic device; when the detection unit detects that the touch body leaves the touch screen of the electronic device, it can report the click event of the first operation control to the corresponding application , So that the application instructs the display unit to display the second interface that will be displayed after the first operation control is clicked in response to the click event.
  • the present application provides an electronic device, including: a touch screen, one or more processors, one or more memories, and one or more computer programs; wherein the processor is coupled with the touch screen and the memory, and the above one One or more computer programs are stored in the memory, and when the electronic device is running, the processor executes one or more computer programs stored in the memory, so that the electronic device executes the control operation method described in any one of the above items.
  • the present application provides a computer-readable storage medium including computer instructions, which when the computer instructions run on an electronic device, cause the electronic device to execute the control operation method described in any one of the first aspect.
  • the present application provides a computer program product, which when the computer program product runs on an electronic device, causes the electronic device to execute the control operation method described in any one of the first aspect.
  • the electronic equipment described in the second and third aspects, the computer-readable storage medium described in the fourth aspect, and the computer program product described in the fifth aspect are all used to execute the above-provided electronic devices. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, which will not be repeated here.
  • FIG. 1A is a schematic diagram of an application scenario of a single-handed operation mode in the prior art
  • FIG. 1B is a first structural diagram of an electronic device provided by an embodiment of this application.
  • FIG. 2 is a schematic diagram 1 of an application scenario of a control operation method provided by an embodiment of the application;
  • FIG. 3 is a schematic structural diagram of an operating system in an electronic device provided by an embodiment of the application.
  • FIG. 4 is a second schematic diagram of an application scenario of a control operation method provided by an embodiment of the application.
  • FIG. 5 is a schematic flowchart of a method for operating a control provided by an embodiment of the application
  • FIG. 6 is a third schematic diagram of an application scenario of a control operation method provided by an embodiment of the application.
  • FIG. 7 is a fourth schematic diagram of an application scenario of a control operation method provided by an embodiment of the application.
  • FIG. 8 is a schematic diagram 5 of an application scenario of a control operation method provided by an embodiment of the application.
  • FIG. 10 is a schematic diagram 7 of an application scenario of a control operation method provided by an embodiment of the application.
  • FIG. 11 is an eighth schematic diagram of an application scenario of a control operation method provided by an embodiment of this application.
  • FIG. 12 is a schematic diagram 9 of an application scenario of a control operation method provided by an embodiment of this application.
  • FIG. 13 is a tenth schematic diagram of an application scenario of a control operation method provided by an embodiment of this application.
  • FIG. 14 is a schematic diagram eleventh of an application scenario of a control operation method provided by an embodiment of this application.
  • FIG. 15 is a twelfth schematic diagram of an application scenario of a control operation method provided by an embodiment of this application.
  • 16 is a thirteenth schematic diagram of an application scenario of a control operation method provided by an embodiment of the application.
  • FIG. 21 is an eighteenth schematic diagram of an application scenario of a control operation method provided by an embodiment of this application.
  • FIG. 22 is a second structural diagram of an electronic device provided by an embodiment of this application.
  • Controls Generally, elements presented in a GUI (graphical user interface, graphical user interface) can be referred to as controls, which can provide users with certain operations or display certain content.
  • the aforementioned controls may specifically include text controls, such as TextView controls, EditText controls, etc., may also include button controls, such as Button controls, ImageButton controls, etc., and may also include image controls, such as ImageView controls. This does not impose any restrictions.
  • each control displayed in the display interface may be divided into an operation control and a non-operation control.
  • the operation control refers to a control that can interact with a user, that is, the control can present corresponding functions in response to a user's touch operation.
  • a non-operational control refers to a control that cannot implement related functions in response to a user's touch operation.
  • the electronic device can determine that the control is an operation control; when a certain control is an ImageView type control, the electronic device can determine that the control is a non-operation control.
  • the electronic device can also identify the control as an operation control or a non-operation control according to parameters such as the size, position, and layer order of the control in the display interface, and the embodiment of the present application does not impose any limitation on this.
  • FIG. 1B shows a schematic structural diagram of the electronic device 100.
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, and audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, etc.
  • a processor 110 an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, and audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, etc.
  • USB universal serial bus
  • the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100.
  • the electronic device 100 may include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or arrange different components.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait.
  • AP application processor
  • modem processor modem processor
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • the different processing units may be independent devices or integrated in one or more processors.
  • a memory may also be provided in the processor 110 to store instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory can store instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
  • the processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (PCM) interface, and a universal asynchronous transmitter receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / Or Universal Serial Bus (USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • UART universal asynchronous transmitter receiver/transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB Universal Serial Bus
  • the wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
  • the antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna can be used in combination with a tuning switch.
  • the mobile communication module 150 can provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the electronic device 100.
  • the mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), and the like.
  • the mobile communication module 150 can receive electromagnetic waves by the antenna 1, and perform processing such as filtering, amplifying and transmitting the received electromagnetic waves to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modem processor, and convert it into electromagnetic waves for radiation via the antenna 1.
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110.
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
  • the wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), and global navigation satellites. System (global navigation satellite system, GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110.
  • the wireless communication module 160 may also receive a signal to be sent from the processor 110, perform frequency modulation, amplify, and convert it into electromagnetic waves to radiate through the antenna 2.
  • the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • the electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like.
  • the GPU is an image processing microprocessor, which is connected to the display 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations and is used for graphics rendering.
  • the processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos, and the like.
  • the display screen 194 includes a display panel.
  • the display panel can use liquid crystal display (LCD), organic light-emitting diode (OLED), active matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • active-matrix organic light-emitting diode active-matrix organic light-emitting diode
  • AMOLED flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (QLED), etc.
  • the electronic device 100 may include one or N display screens 194, and N is a positive integer greater than one.
  • the electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
  • the ISP is used to process the data fed back from the camera 193. For example, when taking a picture, the shutter is opened, the light is transmitted to the photosensitive element of the camera through the lens, the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing and is converted into an image visible to the naked eye.
  • ISP can also optimize the image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera 193.
  • the camera 193 is used to capture still images or videos.
  • the object generates an optical image through the lens and is projected to the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transfers the electrical signal to the ISP to convert it into a digital image signal.
  • ISP outputs digital image signals to DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
  • the electronic device 100 may include one or N cameras 193, and N is a positive integer greater than one.
  • the internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121.
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, an application program (such as a sound playback function, an image playback function, etc.) required by at least one function, and the like.
  • the data storage area can store data (such as audio data, phone book, etc.) created during the use of the electronic device 100.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.
  • UFS universal flash storage
  • the electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. For example, music playback, recording, etc.
  • the audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal.
  • the audio module 170 can also be used to encode and decode audio signals.
  • the audio module 170 may be provided in the processor 110, or part of the functional modules of the audio module 170 may be provided in the processor 110.
  • the receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals.
  • the electronic device 100 answers a call or voice message, it can receive the voice by bringing the receiver 170B close to the human ear.
  • the earphone interface 170D is used to connect wired earphones.
  • the earphone interface 170D may be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, and a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA, CTIA
  • the electronic device 100 may also include a charging management module, a power management module, a battery, a button, an indicator, and one or more SIM card interfaces, etc.
  • a charging management module may also include a charging management module, a power management module, a battery, a button, an indicator, and one or more SIM card interfaces, etc.
  • a power management module may also include a charging management module, a power management module, a battery, a button, an indicator, and one or more SIM card interfaces, etc.
  • the aforementioned sensor module 180 may include a touch sensor.
  • the touch sensor can collect the user's touch events on or near it (such as the user's operation on the surface of the touch sensor with fingers, stylus, etc.), and send the collected touch information to other devices, such as processing ⁇ 110.
  • the touch sensor can be implemented in multiple ways such as resistive, capacitive, infrared, and surface acoustic waves.
  • the touch sensor can be integrated with the display screen 194 as a touch screen of the electronic device 100, or the touch sensor and the display screen 194 can be used as two independent components to implement the input and output functions of the electronic device 100.
  • the rectangular coordinate system may be set in the touch screen including the touch sensor in advance.
  • the upper left corner of the touch screen can be the origin O (0, 0) to establish a rectangular coordinate system, or the geometric center of the touch screen can be used as the origin O (0, 0) to establish a rectangular coordinate system (not shown in Figure 2 show).
  • the touch sensor in the touch screen can continuously collect a series of touch events (such as the coordinates of the touch point, touch time, etc.) generated by the touch body on the touch screen, and report the series of touch events to the processing ⁇ 110.
  • the above-mentioned touch body may specifically be a touch pen, a user's finger, a joint, or a touch glove with a touch function, etc.
  • the embodiments of the present application do not make any restriction on this.
  • the user's finger is used as an example of the touch body. Sexual description.
  • the user can remove the finger from the touch screen to end this sliding operation.
  • the touch screen detects that the user's finger has left, it can send an event of the end of the sliding operation to the processor 110. Since the return button 202 is active at this time, the processor 110 can perform the corresponding operation when the return button 201 is clicked, for example
  • the processor 110 may instruct the touch screen to display the upper-level menu of the display interface 201 after the return button 201 is clicked (the interface of the upper-level menu of the display interface 201 is not shown in FIG. 2).
  • the display interface 201 when the display interface 201 is displayed on the touch screen, if the user wants to enter the one-handed operation mode to control the operation controls on the top of the display interface 201, the user can enter a preset sliding operation in the display interface 201, and the processor 110 will be triggered to display the interface The operation controls at the top of 201 are displayed as active. Furthermore, in response to the operation of the user's finger leaving in the sliding operation, the processor 110 may perform a corresponding click operation on the activated operation control, thereby simulating the user's finger to click the operation control to implement a corresponding function.
  • the user can enter the one-handed operation mode with a single sliding operation, and realize the click function of the top operation control in the current display interface.
  • the electronic device does not need to reduce the content in the display interface, so that the user can be more convenient.
  • Efficient operation of the operation controls on the top of the display interface improves the user experience when operating with one hand.
  • the above-mentioned software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
  • the embodiment of the present application takes an Android system with a layered architecture as an example to illustrate the software structure of the electronic device 100 by way of example.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Communication between layers through software interface.
  • the Android system is divided into four layers, from top to bottom, the application layer, the application framework layer, the Android runtime and system library, and the kernel layer. Huawei's self-developed mobile terminal operating system can also refer to this structure.
  • the application layer can include a series of applications.
  • the above-mentioned application programs may include applications (application, APP) such as call, contact, camera, gallery, calendar, map, navigation, Bluetooth, music, video, short message, etc.
  • applications application, APP
  • APP application
  • call contact, camera, gallery, calendar, map, navigation, Bluetooth, music, video, short message, etc.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer may include a view system (view system), a notification manager, an activity manager, a window manager, a content provider, a view system, an input manager, etc.
  • the view system can be used to construct the display interface of the application.
  • Each display interface can be composed of one or more controls.
  • controls may include interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets.
  • the above notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and can automatically disappear after a short stay without user interaction.
  • the notification manager is used to notify download completion, message reminders, and so on.
  • the notification manager can also be a notification that appears in the status bar at the top of the system in the form of a chart or a scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, text messages are prompted in the status bar, prompt sounds, electronic devices vibrate, and indicator lights flash.
  • the above activity manager can be used to manage the life cycle of each application.
  • Applications usually run in the operating system in the form of activity.
  • the activity manager can schedule the activity process of the application to manage the life cycle of each application.
  • the window manager is used to manage window programs.
  • the above-mentioned window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, take a screenshot, and so on.
  • the above-mentioned content provider is used to store and obtain data, and make these data accessible by applications.
  • the data may include videos, images, audios, phone calls made and received, browsing history and bookmarks, phone book, etc.
  • Android runtime includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.
  • the core library consists of two parts: one part is the function functions that the java language needs to call, and the other part is the core library of Android.
  • the application layer and application framework layer run in a virtual machine.
  • the virtual machine executes the java files of the application layer and the application framework layer as binary files.
  • the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
  • the system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), three-dimensional graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL), etc.
  • the surface manager is used to manage the display subsystem, and provides a combination of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files.
  • the media library can support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing.
  • the 2D graphics engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer includes at least a display driver, a camera driver, an audio driver, a sensor driver, etc., which are not limited in the embodiment of the present application.
  • the above-mentioned view system may draw each frame of the display interface in response to the request of the application.
  • the view system can record the view information of the display interface when drawing the display interface, and the view information can include the position and size of each control in the display interface, and the layer relationship between the controls.
  • the attribute or type of each control can also be recorded in the view information.
  • control 1 is a button type control
  • control 2 is a text box type control, etc.
  • the display interface 301 of the WeChat APP is running in the application layer.
  • the touch screen can obtain information about a series of touch points related to this touch operation, for example, the coordinates (x, y) of the touch points.
  • the touch screen can report the original touch event generated by the user's touch operation to the kernel layer.
  • the kernel layer After the kernel layer obtains the above-mentioned original touch event, it can encapsulate the touch event as an advanced touch event that can be read by the application framework layer (ie Framework layer), namely touch event, which contains the coordinates of the touch point and this touch event Types of events, for example, action down events, action move events, and action up events. And send the advanced touch event to the input manager (InputManager) in the application framework layer.
  • the application framework layer ie Framework layer
  • touch event which contains the coordinates of the touch point and this touch event Types of events, for example, action down events, action move events, and action up events.
  • InputManager input manager
  • the input manager After the input manager obtains the above-mentioned advanced touch event, it can calculate the sliding track and sliding distance of the user's finger in real time according to the coordinates of the touch point in the advanced touch event and the type of the touch event. For example, when the input manager detects an action down event, it means that the user's finger touches the touch screen. When the input manager detects an action up event, it means that the user's finger leaves the touch screen. Then, the input manager can recognize the sliding track and sliding distance of the user's finger on the touch screen according to the coordinates of the touch point between the adjacent action down event and the action up event.
  • the input manager can determine the specific operation control that needs to be activated at this time according to the view information of the display interface 301 recorded in the view system.
  • the input manager can The view system is requested to query the operation control located at the far right of the top of the display interface 301.
  • the view system can determine, according to the view information of the display interface 301, that the rightmost operation control at the top of the display interface 301 is the add button 303, that is, the operation control that needs to be activated at this time is the add button 303.
  • the input manager can call the view system to display the return button 302 in the active state in the display interface 301, so that the user knows the return button 302 is activated.
  • the view system can display the return button 302 as an active state by changing the size, shape, or color of the return button 302.
  • the user can end this sliding operation and remove the finger from the display interface 301.
  • the touch screen detects this operation, it can report the input event of the user's finger leaving the display interface 301 to the input manager layer by layer.
  • the input manager can simulate the operation of the user clicking the currently activated return button 302, and report the corresponding touch event to the running WeChat APP.
  • the coordinates of the touch point in the touch event can be any coordinates on the return button 302, and the type of the touch event can be a click event.
  • the WeChat APP can call the callback function corresponding to the touch event of clicking the return button 302 to implement the corresponding return function.
  • the user can continue to input a sliding operation to switch the activated operation control.
  • the return button 302 is activated, if it is detected that the user's finger continues to slide along the positive direction of the x-axis, and the sliding distance is greater than the preset value, the view system can move the return button 302 to the positive direction along the x-axis according to the view information of the display interface 301.
  • the operation control with the closest direction (for example, the search button 303) is determined to be the operation control that needs to be activated at this time, and the search button 303 is displayed in an activated state.
  • the user can trigger the electronic device to activate various operation controls in the display interface by inputting a sliding operation in the display interface, so that the electronic device enters a one-handed operation mode.
  • the end of the sliding operation input by the user is detected, that is, when the user's finger leaves the display interface, it indicates that the user needs to click the operation control activated at this time, and the electronic device can simulate the method of clicking the corresponding operation control to realize the corresponding function of the operation control.
  • the electronic device provides the user with an interactive way to quickly control the operation controls in the display interface to achieve one-handed operation, thereby improving the display content and display effect while ensuring User experience when operating with one hand.
  • a mobile phone will be taken as an example of the above-mentioned electronic device 100, and a method for operating a control provided by an embodiment of the present application will be described in detail with reference to the accompanying drawings.
  • a control operation method provided by an embodiment of the present application may include the following steps S501-S507:
  • the mobile phone displays the first interface of the first application.
  • the above-mentioned first interface may be an interface displayed when any APP installed in the mobile phone is running.
  • the first interface may be the home page 601 being displayed when the mobile phone is running the WeChat APP.
  • the home page 601 may include one or more controls.
  • the top of the home page 601 is provided with a back button 602, a title 603, a search button 604, an add button 605, and the like.
  • the return button 602, the search button 604, and the add button 605 are all operation controls that can respond to the user's touch operation; and the title 603 is a non-operation control that cannot respond to the user's touch operation.
  • S502 The mobile phone detects the sliding operation input by the user in the first interface.
  • the mobile phone can detect the sliding operation input by the user in real time through the touch sensor on the touch screen while displaying the home page 601.
  • the sliding operation refers to the entire process from when the user's finger touches the touch screen, and the user's finger generates a certain displacement on the touch screen, until the user's finger leaves the touch screen.
  • the x-axis of the rectangular coordinate system is parallel to the shorter side of the mobile phone, and the y-axis of the rectangular coordinate system is parallel to the longer side of the mobile phone.
  • the sides are parallel.
  • the mobile phone can collect the coordinates of a series of touch points such as the touch point A1, the touch point A2, and the touch point A3 in real time.
  • the mobile phone can determine the sliding direction, sliding distance, and sliding track of the user's finger on the home page 601 according to the collected coordinates of these touch points.
  • the mobile phone collects the coordinates of each touch point in the above sliding operation, it can also record the touch time and other information of the corresponding touch point.
  • the mobile phone can determine the time the user stays at different positions when the user inputs the sliding operation according to the touch time of the touch point. , Speed, etc.
  • the embodiments of this application do not impose any restrictions on this.
  • the mobile phone In response to the first sliding process of the user's finger in the aforementioned sliding operation, the mobile phone displays the first operation control in the first interface as an activated state.
  • the mobile phone can divide the current sliding operation into different sliding processes according to the coordinates of the touch points (A0, A1, A2%) in the detected sliding operation. That is to say, a sliding operation input by the user to the touch screen can be divided into different sliding processes in stages. In each sliding process, the user's finger does not leave the touch screen until it is detected that the user's finger leaves the touch screen to indicate the end of the sliding operation.
  • the mobile phone can respond to different sliding processes to implement the user's control function of the operation controls in the first interface.
  • the first sliding process of the above-mentioned sliding operation refers to the time from the user's finger touching the first interface (such as the home page 601) to the user's finger sliding the preset distance D1 in the positive direction of the y-axis. process.
  • the mobile phone After the mobile phone obtains the starting position A0 (x0, y0) of the sliding operation, it can use A0 (x0, y0) as the starting point, and calculate the sliding distance of the user's finger in the positive direction of the y-axis in real time according to the coordinates of the subsequently collected touch points.
  • the sliding distance between the starting position A0 and the touch point A1 in the positive direction of the y-axis can be calculated as y1-y0.
  • the mobile phone can determine that the user has completed the first sliding process of the sliding operation on the home page 601, indicating that the user wants to enter the one-handed operation mode to control the operation controls on the home page 601 at this time.
  • the user's finger is still in contact with the touch screen and has not left the touch screen, that is, the user's sliding operation on the home page 601 has not yet ended.
  • the mobile phone can display the first operation control on the top of the home page 601 as an activated state, thereby prompting the user that the one-hand operation mode has been entered, and the currently activated control is the first operation control .
  • the mobile phone may display the first operation control in an activated state by changing the shape, size, or color of the first operation control.
  • the mobile phone may also prompt the user that the current first operation control is in the activated state by means of text, vibration, or prompt sound.
  • the mobile phone can call the view system (view) in the application framework layer to query the view information recorded by the view system when the homepage 601 is drawn.
  • the view information records the position, size, and attribute information of each control on the home page 601.
  • the mobile phone can determine that the operation control on the top leftmost side of the home page 601 is the return button 602, and the return button 602 is the operation control that needs to be activated this time.
  • the mobile phone can continue to call the view system to redraw the background color of the back button 602, so that the back button 602 is displayed in the active state on the home page 601.
  • the mobile phone can call the screenshot application to perform a screenshot operation on the home page 601 to obtain a screenshot of the home page 601. Furthermore, the mobile phone can recognize the operation controls in this screenshot through an OCR (optical character recognition) algorithm or an AI recognition algorithm, so as to recognize each operation control in the homepage 601 and the position of the operation control. In this way, the mobile phone can determine that the return button 602 at the leftmost top of the home page 601 is an operation control that needs to be activated, so that the return button 602 is displayed as an activated state.
  • OCR optical character recognition
  • the operating system of the mobile phone may send a request to the running WeChat APP, and the request may be used to query the operation control located on the leftmost side of the top of the homepage 601.
  • the WeChat APP can determine that the leftmost operation control at the top of the homepage 601 is the back button 602.
  • the WeChat APP can return the identification of the back button 602 to the mobile phone operating system, so that the mobile phone operating system can follow the back button 602
  • the marking call view system displays the return button 602 as an active state.
  • the mobile phone may also determine which operation control on the home page 601 is specifically activated according to the abscissa of the touch point in the first sliding process.
  • the mobile phone can determine that the user has completed the first sliding process of the sliding operation based on touch point A0 (x0, y0) and touch point A1 (x1, y1). At this time, the start position of the first sliding process is A0, and the end The location is A1. Then, the mobile phone can also determine the position of the abscissa x0 of the start position A0 and the abscissa x1 of the end position A1 in the home page 601 in the first sliding process.
  • the mobile phone can display the operation control (that is, the return button 602) at the leftmost top of the home page 601 as an active state.
  • the mobile phone can set the operation control located at the rightmost of the top of the homepage 601 (That is, the add button 605) is displayed as an active state.
  • the mobile phone may also determine which operation control on the home page 601 is specifically activated according to the abscissa x0 of the start position A0 or the abscissa x1 of the end position A1 in the first sliding process.
  • the mobile phone when the abscissa x0 of the start position A0 (or the abscissa x1 of the end position A1) is in the interval from 0 to w/2 (that is, the left half of the home page 601), the mobile phone can be located at the top left of the home page 601
  • the return button 602 on the side is displayed in an active state.
  • the abscissa x0 of the start position A0 (or the abscissa x1 of the end position A1) is within the interval from w/2 to w (that is, the right half of the homepage 601), the phone can set the rightmost position at the top of the homepage 601
  • the add button 605 is displayed in an activated state.
  • the mobile phone activates the first operation control in the first interface for the first time
  • different first operation controls can be selected for activation according to different strategies.
  • the user can enter the one-handed operation mode with different first operation controls as the entrance, so that the user can select the operation control that needs to be clicked in the first interface in the shortest way.
  • the mobile phone can execute corresponding operation instructions on the home page 601 according to the existing pull-down operation response process, such as refresh instructions, page-down instructions, and so on.
  • the mobile phone can automatically switch the first operation control located at the top of the home page 601 (for example, the back button 602). ) Is displayed as active.
  • the sliding operation input by the user to slide down can trigger the mobile phone to slide up the display content in the current display interface, and can also trigger the mobile phone to enter the one-handed operation mode to activate the operation controls in the display interface.
  • the mobile phone may also determine whether it is necessary to activate the operation controls on the homepage 601 according to parameters such as the sliding speed or touch area of the user in the first sliding process of inputting the above-mentioned sliding operation.
  • the mobile phone when it is detected that the user’s sliding speed during the aforementioned first sliding process is greater than the speed threshold, the mobile phone can activate the first operation control located at the top of the homepage 601; if the user’s sliding speed during the aforementioned first sliding process is less than the speed threshold, Then the mobile phone can report the corresponding sliding event to the WeChat APP according to the existing process, and trigger the WeChat APP to execute the page turning instruction corresponding to the sliding event.
  • the mobile phone when it is detected that the touch area of the user’s finger during the first sliding process is greater than the area threshold, the mobile phone can activate the first operation control located at the top of the homepage 601; if the user’s finger touches during the first sliding process, If the area is less than the area threshold, the mobile phone can report the corresponding sliding event to the WeChat APP according to the existing process, and trigger the WeChat APP to execute the page turning instruction corresponding to the sliding event.
  • the mobile phone In response to the second sliding process of the user's finger in the above-mentioned sliding operation, the mobile phone displays the second operation control in the first interface as an activated state.
  • step S503 Taking the mobile phone displaying the return button 602 as an activated state in step S503 as an example, after the user completes the first sliding process of the sliding operation on the home page 601, the mobile phone displays the return button 602 as the active state in response to the first sliding process.
  • the input sliding operation has not yet ended, and the user's finger has not left the home page 601. If the currently activated back button 602 is not the operation control that the user needs to click, the user can continue to slide the finger to input the second sliding process of the sliding operation to trigger the mobile phone to switch the activated operation control on the home page 601.
  • the mobile phone may use the end position A1 of the above-mentioned first sliding process as the starting position of the second sliding process, and detect the sliding distance of the user's finger on the x-axis or y-axis in real time. If the sliding distance of the user's finger on the x-axis or y-axis is greater than or equal to the preset value D2 (D1 and D2 may be the same or different), it means that the user has completed the second sliding process in the above-mentioned sliding operation. At this time, the user's finger is still in contact with the touch screen and has not left the touch screen, that is, the user's sliding operation on the home page 601 has not yet ended.
  • D2 preset value
  • the mobile phone can switch the activated first operation control on the homepage 601 to the second along the x-axis direction. Operation controls.
  • the mobile phone can start to detect whether the user enters the second sliding process at the end position A1 (x1, y1) of the above-mentioned first sliding process as the starting position.
  • the sliding distance x2-x1 ⁇ D2 between the starting position A1 (x1, y1) and the touch point A2 (x2, y2) on the x-axis is detected, it means that the user's finger continues to move a certain distance in the positive direction of the x-axis , The second sliding process in the sliding operation is completed.
  • the mobile phone can respond to the second sliding process to restore the return button 602 to the deactivated state, and at the same time, the mobile phone can display the search button 604 adjacent to the return button 602 in the positive x-axis direction as an active state. That is, the mobile phone can switch the activated operation control from the return button 602 (ie, the first operation control) to the search button 604 (ie, the second operation control) in response to the user's second sliding process.
  • the mobile phone can call the view system to query the distance return button in the positive x-axis direction according to the sliding direction in the second sliding process (that is, the positive x-axis direction)
  • the most recent operation control of 602 is the search button 604.
  • the mobile phone callable view system displays the search button 604 on the home page 601 as an activated state, and at the same time restores the activated back button 602 to a deactivated state.
  • the mobile phone when the mobile phone uses the end position A1 (x1, y1) of the above first sliding process as the starting position, and detects that the user's finger completes the second sliding process of this sliding operation in the negative direction of the x-axis, because the negative x-axis is If there is no operation control adjacent to the return button 602 in the direction, the mobile phone can prompt the user that there is no control that can be operated by means of text, vibration, or the like. Alternatively, the mobile phone may display the activated return button 602 as a deactivated state and exit the one-handed operation mode.
  • the mobile phone determines the positional relationship between the abscissa x1 of the start position A1 and the abscissa x2 of the end position A2 in the second sliding process, and can switch the activated operation controls horizontally for the user in the x-axis direction. It is convenient for the user to quickly activate the operation controls that need to be clicked in the first interface.
  • the mobile phone can switch the activated first operation control on the homepage 601 to the first operation control along the y-axis direction.
  • the mobile phone can start the first sliding process at the end position A1 (x1, y1) of the first sliding process, and start to detect whether the user enters the second sliding process in the y-axis direction.
  • the sliding distance y3-y1 ⁇ D2 between the starting position A1 (x1, y1) and the touch point A3 (x3, y3) on the y-axis is detected, it indicates that the user's finger continues to the y-axis Moved a certain distance in the positive direction, completing the second sliding process in this sliding operation.
  • the mobile phone can use the option 606 on the homepage 601 that is closest to the return button 602 in the positive direction of the y-axis as the operation control to be activated, and then display the option 606 as the activated state. At the same time, the activated return button 602 is restored to the deactivated state.
  • the mobile phone can determine the operation control that needs to be activated at this time according to the position of the activated return button 602 on the home page 601. For example, if the return button 602 is located on the left side of the home page 601, the mobile phone can prioritize the operation controls on the left side of the home page 601 below the return button 602 as the operation controls that need to be activated; if the return button 602 is located on the right side of the home page 601, Then, the mobile phone can firstly determine the operation control on the right side of the homepage 601 below the return button 602 as the operation control that needs to be activated.
  • the mobile phone can switch the activated operation controls for the user in the longitudinal direction along the y axis. It is convenient for the user to quickly activate the operation controls that need to be clicked in the first interface.
  • the mobile phone switches the activated operation control from the first operation control (for example, the back button 602) to the second operation control (for example, option 606) in response to the second sliding process of the user input
  • the user can also input and
  • the second sliding process with the opposite direction of the sliding process triggers the mobile phone to return the activated operation control from the option 606 to the return button 602.
  • the end position A3 of the second sliding process can be used as the starting position to continue detecting user input The sliding process.
  • the mobile phone can display the return button 602 as active again, and at the same time The activated option 606 is displayed in a deactivated state.
  • the mobile phone displays the add button 605 at the top of the home page 601 as an active state in response to the first sliding process or the second sliding process of the user's current sliding operation.
  • the user’s finger has not left the home page 601. If the mobile phone detects that the user’s finger continues to slide in the positive direction of the x-axis, since there are no other operation controls in the negative x-axis direction of the add button 605 in the home page 601, the mobile phone can change the The activated add button 605 is displayed in a deactivated state, thereby exiting the one-handed operation mode.
  • the mobile phone executes the above steps S503-S504 in response to the sliding operation input by the user
  • the operation control activated by the mobile phone on the home page 601 is the operation control that the user wants to click this time (for example, the return button 602), such as As shown in FIG. 15, the user can remove the finger from the home page 601 to end this sliding operation.
  • the mobile phone can respond to the operation of the user's finger leaving, and perform the operation of clicking the return button 602.
  • the mobile phone may send a touch event to the running WeChat APP, the coordinates of the touch point carried in the touch event may be any coordinate point on the return button 602, and the type of the touch event may be a click event.
  • the WeChat APP can realize the function of clicking the back button 602 in response to the touch event.
  • the mobile phone can display the upper-level menu of the home page 601 after clicking the back button 602.
  • the upper-level menu of the home page 601 in the WeChat APP may be the desktop 701.
  • the user can activate the operation controls that need to be controlled in the display interface by entering a sliding operation, and perform corresponding click operations on the activated operation controls, thereby improving the user's one-handed operation while ensuring the display content and display effect. User experience during operation.
  • the mobile phone can display the add button 605 as an activated state in response to the second sliding process of the above-mentioned sliding operation.
  • the user's finger has not left the home page 601, that is, the sliding operation input by the user this time has not ended.
  • the add button 605 is an operation control containing a secondary menu, after the add button 605 is activated, the mobile phone can continue to detect the dwell time of the user's finger at the end position of the second sliding process (for example, touch point A4).
  • the mobile phone can report the click event of the add button 605 to the WeChat APP, so that the WeChat APP can display the secondary menu 1601 on the home page 601 in response to the click event.
  • the user's finger has not left the touch screen, that is, the sliding operation input by the user this time has not ended.
  • the mobile phone can continue to detect the sliding operation of the user's finger on the touch screen. If the sliding operation of the user's finger is detected, the mobile phone can query whether the currently activated add button 605 contains a secondary menu. If the secondary menu is included, the mobile phone can perform the operation of clicking the add button 605, and the secondary menu 1601 after the add button 605 is clicked is displayed on the home page 601. Correspondingly, if the currently activated add button 605 does not include a secondary menu, the mobile phone can switch the activated operation control to the operation control around the add button 605 according to the sliding direction of the user.
  • the mobile phone can also continue to detect the dwell time of the user's finger on the home page 601. If the dwell time of the user's finger exceeds the preset dwell time, the mobile phone can also be triggered to perform the operation of tapping the operation control. In other words, the mobile phone can perform a click operation on the activated operation control in response to the operation of the user's finger leaving the touch screen, and can also perform a click operation on the activated operation control in response to the stay operation of the user's finger.
  • This embodiment of the application does not do anything about this limit.
  • the mobile phone is triggered to display the secondary menu 1601 on the home page 601.
  • the various operation controls in the secondary menu 1601 can be laid out horizontally along the y-axis, or longitudinally along the x-axis (not shown in Figure 17) .
  • the mobile phone can touch point A4 as the starting position to continue to detect the sliding distance of the user's finger on the x-axis or y-axis.
  • the sliding distance y5-y4 of the user's finger on the y axis can be calculated ⁇ D3, it means that after the mobile phone displays the second-level menu 1601, the user's finger continues to move a certain distance in the positive direction of the y-axis, completing the third sliding process in this sliding operation.
  • the mobile phone can respond to the third sliding process to enter the one-handed operation mode of the secondary menu 1601 on the homepage 601, and move the operation control (for example, swipe one) in the secondary menu 1601 that is closest to the add button 605 in the positive direction of the y-axis. Scan button 1701) is displayed as active.
  • the operation control for example, swipe one
  • the mobile phone displays the scan button 1701 in the secondary menu 1601 as an activated state, it can continue to respond to the sliding process input by the user's finger on the home page 601 to switch the activated operation controls in the secondary menu 1601.
  • the specific method for the mobile phone to switch the activated operation control in the secondary menu 1601 please refer to the specific method for the mobile phone to switch the activated operation control on the home page 601 in step S504, so it will not be described in detail here.
  • the mobile phone can detect that the user’s finger touches the point B1 on the home page 601 at this time as the starting position. The sliding distance of the user's finger on the x-axis or y-axis. If it is detected that the user's finger moves from the touch point B1 along the negative direction of the y-axis by a preset distance and then moves to the touch point B2, as shown in Figure 18 (b), the mobile phone can be activated in the secondary menu 1601 The operation control returns to the sweep button 1701, and the payment and receipt button 1801 is displayed in a deactivated state.
  • the mobile phone can detect the user's finger at the touch point B2 of the user's finger on the home page 601 at this time.
  • the sliding distance on the x-axis or y-axis If it is detected that the user's finger has moved a preset distance from touch point B2 in the negative direction of the y-axis to touch point B3, since the sweep button 1701 is already the top operation control along the y-axis in the secondary menu 1601, then As shown in (c) in FIG. 18, the mobile phone can exit the secondary menu 1601 in response to the sliding process, and return to the state where the add button 605 on the home page 601 is activated.
  • the user can not only trigger the mobile phone to activate each operation control in the display interface by inputting a pull-down sliding operation, but also trigger the mobile phone to activate the secondary menu of the operation control in the display interface.
  • the sliding process of the user's finger activates the corresponding operation control.
  • the user only needs to perform a sliding operation once to enter the secondary menu of the display interface to control the corresponding operation control through one-handed operation, which simplifies the interactive process of one-handed operation between multi-level menus.
  • the mobile phone In response to the operation of leaving the user's finger in the aforementioned sliding operation, the mobile phone displays a second interface after the aforementioned third operation control is clicked.
  • the mobile phone can perform the operation of clicking the sweep button 1701 in response to the operation of the user's finger leaving.
  • the mobile phone can send a click event of the sweep button 1701 to the running WeChat APP.
  • the WeChat APP can display that the sweep button 1701 is clicked in response to the click event. Enter the scan interface 1901.
  • a pull-down refresh control may be hidden in the display interface of some APPs.
  • the mobile phone is displaying the homepage 2001 of the music APP.
  • the top of the homepage 2001 is provided with three operation controls: a setting button 2002, a search bar 2003, and more options 2004.
  • the mobile phone can display the hidden pull-down refresh control and perform a refresh operation.
  • the mobile phone can respond to the first sliding process to display the top operation control (for example, the setting button 2002) in the active state in the homepage 2001 in response to the first sliding process.
  • the top operation control for example, the setting button 2002
  • the mobile phone can query that the operation control closest to the activated setting button 2002 along the positive direction of the y-axis is the hidden pull-down refresh control 2005.
  • the mobile phone can display the hidden pull-down refresh control 2005 on the homepage 2001, and display the pull-down refresh control 2005 as an activated state, and the setting button 2002 as a deactivated state. .
  • the mobile phone can perform a refresh operation corresponding to the pull-down refresh control 2005.
  • the mobile phone can continue to detect the sliding process of the user's finger in the positive direction of the y-axis with the touch point C3 as the starting position. At this time, the mobile phone can still The hidden pull-down refresh control 2005 is displayed in the home page 2001, and the pull-down refresh control 2005 is displayed as an active state.
  • the mobile phone can switch the activated operation control from the setting button 2002 to the search bar 2003 or more options 2004 in the positive x-axis direction.
  • the activated operation control please refer to the related description of step S504.
  • the pull-down refresh control 2005 is the last operation control in the homepage 2001 that can be switched longitudinally along the y-axis.
  • the mobile phone can be triggered to enter the one-handed operation mode to control the operation controls on the top of the display interface, and it can also support the pull-down refresh operation in the display interface, avoiding the sliding operation of the user entering the one-handed operation mode on the same display interface It conflicts with the pull-down refresh operation supported by the display interface.
  • the mobile phone when the mobile phone detects that the user's finger slides from the touch point C1 to the touch point C2 to complete the first sliding process of the sliding operation, the mobile phone can query the current Is there a pull-down refresh control 2005 hidden in the homepage 2001? If the pull-down refresh control 2005 is not hidden in the homepage 2001, as described in step S503 above, the mobile phone can enter the one-handed operation mode in response to the first sliding process, and display the top operation control (for example, the setting button 2002) in the homepage 2001 as Active state.
  • the top operation control for example, the setting button 2002
  • the mobile phone can display the hidden pull-down refresh control 2005 on the homepage 2001, and display the pull-down refresh control 2005 as active Status, prompting the user that the pull-down refresh control 2005 has been selected.
  • the mobile phone can perform a refresh operation corresponding to the pull-down refresh control 2005.
  • the mobile phone can hide the pull-down refresh control 2005 in the homepage 2001 again, and display the operation controls (such as the setting button 2002) at the top of the homepage 2001 according to the method described in step S503 Is active. Subsequently, the mobile phone can control the operation controls in the homepage 2001 in response to the sliding operation input by the user according to the method described in steps S504-S507.
  • the user inputs a complete sliding operation
  • the mobile phone can activate the operation that the user needs to click on the display interface (or the secondary menu of the display interface) in response to the sliding process at different stages in the sliding operation.
  • Controls, and perform corresponding click operations on the activated operation controls to realize the one-handed control function of the operation controls without affecting the display content and display effect in the display interface, thereby improving the display content and display effect while ensuring This improves the user experience when operating with one hand.
  • the above-mentioned electronic device may include: a touch screen 2201 including a touch sensor 2206 and a display screen 2207; one or more processors 2202; a memory 2203; one or more application programs (not shown) Shown); and one or more computer programs 2204, each of the above-mentioned devices can be connected through one or more communication buses 2205.
  • the one or more computer programs 2204 are stored in the aforementioned memory 2203 and configured to be executed by the one or more processors 2202, and the one or more computer programs 2204 include instructions, and the aforementioned instructions can be used to execute the aforementioned implementations.
  • the steps in the example Among them, all relevant content of the steps involved in the above method embodiments can be cited in the functional description of the corresponding physical device, and will not be repeated here.
  • the processor 2202 may be the processor 110 shown in FIG. 1B
  • the memory 2203 may be the internal memory 121 shown in FIG. 1B
  • the display screen 2207 may be the display screen 194 shown in FIG. 1B.
  • the above-mentioned touch sensor 2206 may specifically be a touch sensor in the sensor module 180 shown in FIG. 1B, which is not limited in the embodiment of the present application.
  • the functional units in the various embodiments of the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solutions of the embodiments of the present application are essentially or the part that contributes to the prior art, or all or part of the technical solutions can be embodied in the form of software products, and the computer software products are stored in a storage
  • the medium includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: flash memory, mobile hard disk, read-only memory, random access memory, magnetic disk or optical disk and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

A control operation method and an electronic device, which relate to the technical field of terminals, can realize a user's single-hand control operation of a display interface without changing the display content of the display interface, which improves the user experience when the user is operating with one hand. The method comprises: displaying a first interface of an application, the top of the first interface is provided with a first operation control; receiving a sliding operation input on the first interface by the user; when it is detected that the sliding operation satisfies a first sliding process, displaying the first operation control as an active state, wherein the first sliding process refers to a process of sliding a first preset distance in a first direction after a touch body contacts the first interface; and when the sliding operation ends, displaying a second interface in response to the end of the sliding operation, wherein, the second interface is an interface to be displayed after the first operation control is clicked.

Description

一种控件的操作方法及电子设备Operation method of control and electronic equipment
本申请要求于2019年12月4日提交国家知识产权局、申请号为201911230192.4、发明名称为“一种控件的操作方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the State Intellectual Property Office on December 4, 2019, the application number is 201911230192.4, and the invention title is "A control operation method and electronic equipment", the entire content of which is incorporated by reference In this application.
技术领域Technical field
本申请涉及终端技术领域,尤其涉及一种控件的操作方法及电子设备。This application relates to the field of terminal technology, and in particular, to an operation method of a control and an electronic device.
背景技术Background technique
随着移动互联网技术的发展,大屏终端已逐渐被用户所接受,并成为一种趋势。以手机为终端举例,当手机的显示屏越大、屏占比(即显示屏的面积与手机前面板面积的比值)越大时,手机能够显示的内容越多,用户得到的显示效果更佳。With the development of mobile Internet technology, large-screen terminals have gradually been accepted by users and become a trend. Take a mobile phone as an example. When the display screen of the mobile phone is larger and the screen-to-body ratio (that is, the ratio of the area of the display screen to the area of the front panel of the mobile phone) is larger, the mobile phone can display more content and the user will get a better display effect. .
因此,大部分终端厂商都趋向于在手机中设置更大的显示屏和屏占比。但是,当手机的显示屏和屏占比越大时,用户在显示屏上进行单手操作会变得越来越困难。对此,一些手机厂商在手机中设置了单手操作模式。当手机进入单手操作模式后,如图1A所示,手机可将原本显示的桌面101进行缩小,并将缩小后的桌面101通过下沉的方式显示在用户单手可操作的显示区域内。例如,将桌面101显示在显示屏的右下角显示。另外,在缩小桌面101的同时手机还可以删减桌面101中的一些显示内容。例如,手机可将桌面101中的状态栏删除。这样,用户可使用右手在右下角区域单手操作显示界面中的各个控件,尤其是原本位于显示界面顶部的控件。Therefore, most terminal manufacturers tend to set larger display screens and screen-to-body ratios in mobile phones. However, as the display screen and the screen-to-body ratio of a mobile phone become larger, it becomes more and more difficult for users to perform one-handed operation on the display screen. In this regard, some mobile phone manufacturers have set up a one-handed operation mode in their phones. When the mobile phone enters the one-handed operation mode, as shown in FIG. 1A, the mobile phone can shrink the originally displayed desktop 101, and display the reduced desktop 101 in a display area that can be operated by the user with one hand by sinking. For example, the desktop 101 is displayed in the lower right corner of the display screen. In addition, while shrinking the desktop 101, the mobile phone can also delete some of the displayed content in the desktop 101. For example, the mobile phone can delete the status bar in the desktop 101. In this way, the user can use the right hand to operate each control in the display interface with one hand in the lower right corner area, especially the control originally located at the top of the display interface.
但是,手机缩小或删减显示界面中的显示内容后,会导致手机呈现给用户的信息量减少,同时,手机呈现出的显示效果也将下降,降低了用户的使用体验。However, after the mobile phone shrinks or deletes the display content in the display interface, the amount of information that the mobile phone presents to the user will decrease. At the same time, the display effect of the mobile phone will also decrease, which reduces the user experience.
发明内容Summary of the invention
本申请提供一种控件的操作方法及电子设备,可在不改变显示界面中显示内容的情况下实现用户对显示界面的单手控制操作,提高了用户单手操作时的使用体验。The present application provides a control operation method and electronic device, which can realize a user's one-handed control operation on the display interface without changing the display content of the display interface, thereby improving the user experience when the user is operating with one hand.
为达到上述目的,本申请采用如下技术方案:In order to achieve the above objectives, this application adopts the following technical solutions:
第一方面,本申请提供一种控件的操作方法,可应用于具有触摸屏的电子设备中,该方法包括:显示应用的第一界面,第一界面的顶部设置有第一操作控件;接收用户在第一界面上输入的滑动操作;该滑动操作从触摸体(例如用户手指)接触触摸屏开始直至触摸体离开触摸屏的过程可被划分为一个或多个滑动过程;如果检测到上述滑动操作满足第一滑动过程(即触摸体接触第一界面后沿第一方向滑动第一预设距离的过程),则电子设备可将第一操作控件显示为激活状态;当上述滑动操作结束(即触摸体离开触摸屏)时,电子设备可响应于该滑动操作的结束显示第二界面,其中,第二界面是当前处于激活状态的操作控件(例如第一操作控件)被点击后将显示的界面。In the first aspect, the present application provides a control operation method, which can be applied to an electronic device with a touch screen. The method includes: displaying a first interface of the application, and a first operation control is arranged on the top of the first interface; The sliding operation input on the first interface; the sliding operation from the touch body (such as the user's finger) touching the touch screen to the touch body leaving the touch screen can be divided into one or more sliding processes; if the above sliding operation is detected to meet the first The sliding process (that is, the process of sliding the first preset distance in the first direction after the touch body contacts the first interface), the electronic device can display the first operation control as an active state; when the above sliding operation ends (that is, the touch body leaves the touch screen) ), the electronic device may display a second interface in response to the end of the sliding operation, where the second interface is an interface that will be displayed after the currently activated operation control (for example, the first operation control) is clicked.
也就是说,用户可以通过在显示界面中输入滑动操作触发电子设备激活显示界面中的各个操作控件,使电子设备进入单手操作模式,当检测到用户输入的滑动操作结 束时,说明用户需要点击此时被激活的操作控件,则电子设备可模拟点击对应操作控件的方法显示新的界面。这样,在不改变显示界面中显示内容的情况下,电子设备为用户提供了一种在显示界面中快捷控制操作控件实现单手操作的交互方式,从而在保证显示内容和显示效果的同时提高了用户单手操作时的使用体验。In other words, the user can trigger the electronic device to activate various operation controls in the display interface by inputting a sliding operation in the display interface, so that the electronic device enters the one-handed operation mode. When the end of the sliding operation input by the user is detected, the user needs to click For the operation control activated at this time, the electronic device can display a new interface by simulating the method of clicking the corresponding operation control. In this way, without changing the display content in the display interface, the electronic device provides the user with an interactive way to quickly control the operation controls in the display interface to achieve one-handed operation, thereby improving the display content and display effect while ensuring User experience when operating with one hand.
在一种可能的实现方式中,在将第一操作控件显示为激活状态之后,还包括:检测到上述滑动操作满足第二滑动过程,第二滑动过程的起始位置为第一滑动过程的结束位置,在第一滑动过程和第二滑动过程中,触摸体未离开电子设备的触摸屏;那么,响应于上述第二滑动过程,电子设备可将第一界面中的第二操作控件显示为激活状态,并将第一操作控件显示为去激活状态。也就是说,在激活了第一操作控件后,电子设备可响应用户输入的滑动操作中的第二滑动过程将被激活的第一操作控件切换为第二操作控件,直至被激活的操作控件为用户本次希望点击的操作控件。In a possible implementation manner, after displaying the first operation control as an activated state, the method further includes: detecting that the above-mentioned sliding operation satisfies the second sliding process, and the starting position of the second sliding process is the end of the first sliding process Position, in the first sliding process and the second sliding process, the touch body does not leave the touch screen of the electronic device; then, in response to the above-mentioned second sliding process, the electronic device can display the second operation control in the first interface as an active state , And display the first operation control as a deactivated state. That is, after the first operation control is activated, the electronic device can switch the activated first operation control to the second operation control in response to the second sliding process in the sliding operation input by the user, until the activated operation control is The operation control that the user wants to click this time.
在一种可能的实现方式中,当第二滑动过程中的滑动距离在第二方向上的投影大于第二预设距离时,第二操作控件为沿第二方向上与第一操作控件距离最近的操作控件,第二方向与第一方向相同或不同。也就是说,电子设备可沿着第二滑动过程中的滑动方向(即第二方向)切换被激活的操作控件。In a possible implementation, when the projection of the sliding distance in the second direction in the second sliding process is greater than the second preset distance, the second operation control is the closest to the first operation control in the second direction For the operation controls, the second direction is the same or different from the first direction. That is, the electronic device can switch the activated operation control along the sliding direction (ie, the second direction) in the second sliding process.
在一种可能的实现方式中,在将第一界面中的第二操作控件显示为激活状态,并将第一操作控件显示为去激活状态之后,还包括:检测到上述滑动操作满足第三滑动过程,第三滑动过程的滑动方向与第二滑动过程的滑动方向与相反,且第三滑动过程的滑动距离与第二滑动过程的滑动距离的差小于预设值,同样,在第三滑动过程中,触摸体未离开电子设备的触摸屏;响应于上述第三滑动过程,电子设备可重新将第一操作控件显示为激活状态,并将第二操作控件显示为去激活状态。也就是说,用户通过输入滑动方向相反的滑动过程可触发电子设备回退至最近一次被激活的操作控件,方便用户快速选择本次需要点击的操作控件。In a possible implementation manner, after displaying the second operation control in the first interface as the activated state and displaying the first operation control as the deactivated state, the method further includes: detecting that the above-mentioned sliding operation satisfies the third sliding Process, the sliding direction of the third sliding process is opposite to the sliding direction of the second sliding process, and the difference between the sliding distance of the third sliding process and the sliding distance of the second sliding process is less than the preset value. Similarly, in the third sliding process In the above, the touch body does not leave the touch screen of the electronic device; in response to the above-mentioned third sliding process, the electronic device can redisplay the first operation control as an activated state and display the second operation control as a deactivated state. That is to say, the user can trigger the electronic device to return to the last activated operation control by inputting a sliding process with the opposite sliding direction, which is convenient for the user to quickly select the operation control that needs to be clicked this time.
在一种可能的实现方式中,上述第一操作控件可以为包含二级菜单的控件;在将第一操作控件显示为激活状态之后,还包括:检测触摸体在第一滑动过程的结束位置的停留时间;若该停留时间大于预设时间,说明用户很可能需要点击当前被激活的第一操作控件,则电子设备可在第一界面中显示第一操作控件的二级菜单。也就是说,在进入单手操作模式下,电子设备还可以响应用户输入的滑动过程打开操作控件的二级菜单,方便用户在二级菜单中选择本次需要点击的操作控件。In a possible implementation manner, the above-mentioned first operation control may be a control including a secondary menu; after displaying the first operation control in an activated state, the method further includes: detecting that the touch body is at the end position of the first sliding process Stay time; if the stay time is greater than the preset time, it means that the user is likely to need to click the currently activated first operation control, and the electronic device may display the second-level menu of the first operation control in the first interface. That is to say, when entering the one-handed operation mode, the electronic device can also respond to the sliding process input by the user to open the secondary menu of the operation controls, which is convenient for the user to select the operation control to be clicked this time in the secondary menu.
在一种可能的实现方式中,在第一界面中显示第一操作控件的二级菜单之后,还包括:检测到上述滑动操作满足第四滑动过程,第四滑动过程的起始位置为第一滑动过程的结束位置,同样,在第四滑动过程中,触摸体未离开电子设备的触摸屏上;那么,响应于该第四滑动过程,电子设备可将该二级菜单中的第三操作控件显示为激活状态。In a possible implementation manner, after displaying the secondary menu of the first operation control in the first interface, the method further includes: detecting that the above-mentioned sliding operation satisfies the fourth sliding process, and the starting position of the fourth sliding process is the first The end position of the sliding process. Similarly, in the fourth sliding process, the touch body does not leave the touch screen of the electronic device; then, in response to the fourth sliding process, the electronic device can display the third operation control in the secondary menu Is active.
可以看出,电子设备激活第一界面中第一操作控件的二级菜单后,可在二级菜单中根据本次滑动操作中用户继续输入的滑动过程激活相应的操作控件。这样,用户只需要执行一次滑动操作便可以进入第一界面的二级菜单中通过单手操作控制相应的操作控件,简化了在多级菜单之间进行单手操作的交互流程。It can be seen that after the electronic device activates the second-level menu of the first operation control in the first interface, the corresponding operation control can be activated in the second-level menu according to the sliding process that the user continues to input in this sliding operation. In this way, the user only needs to perform a sliding operation once to enter the secondary menu of the first interface to control the corresponding operation control through one-handed operation, which simplifies the interactive process of one-handed operation between multi-level menus.
在一种可能的实现方式中,上述第一界面内隐藏有刷新按钮,该刷新按钮在第三 方向上与第一操作控件相邻,第三方向与第一方向相同或不同;其中,在将第一操作控件显示为激活状态之后,还包括:检测到上述滑动操作满足第五滑动过程,第五滑动过程是指从第一滑动过程的结束位置开始沿第三方向移动第三预设距离的过程,同样,在第五滑动过程中,触摸体未离开电子设备的触摸屏上;那么,响应于该第五滑动过程,电子设备可在第一界面中显示出上述刷新按钮,并将该刷新按钮显示为激活状态。也就是说,如果第一界面中设置有刷新按钮,则电子设备也可按照用户在滑动操作中输入的相应的滑动过程激活该刷新按钮。In a possible implementation manner, a refresh button is hidden in the first interface, and the refresh button is adjacent to the first operation control in the third direction, and the third direction is the same as or different from the first direction; After an operation control is displayed as an activated state, it further includes: detecting that the above-mentioned sliding operation satisfies a fifth sliding process, which refers to a process of moving a third preset distance in a third direction from the end position of the first sliding process Similarly, in the fifth sliding process, the touch body does not leave the touch screen of the electronic device; then, in response to the fifth sliding process, the electronic device can display the refresh button in the first interface and display the refresh button Is active. That is, if a refresh button is provided in the first interface, the electronic device can also activate the refresh button according to the corresponding sliding process input by the user in the sliding operation.
在一种可能的实现方式中,在第一界面中显示出上述刷新按钮,并将该刷新按钮显示为激活状态之后,还包括:若检测到触摸体离开第一界面,则电子设备可执行与点击该刷新按钮对应的刷新操作;若检测到触摸体继续滑动,则电子设备可继续将刷新按钮显示为激活状态。这样,电子设备进入单手操作模式后不仅可以控制显示界面顶部的操作控件,还可以支持显示界面中的刷新操作,避免在同一显示界面中用户进入单手操作模式的滑动操作与该显示界面支持的刷新操作发生冲突。In a possible implementation manner, after the refresh button is displayed on the first interface and the refresh button is displayed as an activated state, the method further includes: if it is detected that the touch body leaves the first interface, the electronic device may execute Click the refresh operation corresponding to the refresh button; if it is detected that the touch body continues to slide, the electronic device can continue to display the refresh button as an activated state. In this way, after the electronic device enters the one-hand operation mode, it can not only control the operation controls on the top of the display interface, but also support the refresh operation in the display interface, avoiding the sliding operation of the user entering the one-hand operation mode in the same display interface and the display interface supports The refresh operation conflicted.
在一种可能的实现方式中,当上述第一滑动过程的起始位置位于第一界面的左半部分时,第一操作控件可以为第一界面顶部最左侧的操作控件;当第一滑动过程的起始位置位于第一界面的右半部分时,第一操作控件可以为第一界面顶部最右侧的操作控件;或者,当第一滑动过程的结束位置位于第一界面的左半部分时,第一操作控件可以为第一界面顶部最左侧的操作控件;当第一滑动过程的结束位置位于第一界面的右半部分时,第一操作控件可以为第一界面顶部最右侧的操作控件。也就是说,电子设备可以根据第一滑动过程中触摸点在第一界面中的位置确定具体激活第一界面中的哪个操作控件。In a possible implementation, when the starting position of the first sliding process is located in the left half of the first interface, the first operation control may be the leftmost operation control at the top of the first interface; When the starting position of the process is in the right half of the first interface, the first operation control can be the rightmost operation control at the top of the first interface; or, when the ending position of the first sliding process is in the left half of the first interface When the first operation control can be the leftmost operation control at the top of the first interface; when the end position of the first sliding process is in the right half of the first interface, the first operation control can be the rightmost operation control at the top of the first interface Operational controls. That is, the electronic device can determine which operation control in the first interface is specifically activated according to the position of the touch point in the first interface during the first sliding process.
或者,电子设备还可以根据用户在输入第一滑动过程时的握持姿态,确定具体激活第一界面中的哪个操作控件。例如,当用户的握持姿态为左手握持姿态时,第一操作控件可以为第一界面顶部最右侧的操作控件;当用户的握持姿态为右手握持姿态时,第一操作控件可以为第一界面顶部最左侧的操作控件。Alternatively, the electronic device may also determine which operation control in the first interface is specifically activated according to the user's holding posture when inputting the first sliding process. For example, when the user's holding posture is the left-hand holding posture, the first operation control may be the right-most operation control at the top of the first interface; when the user's holding posture is the right-hand holding posture, the first operation control may be It is the leftmost operation control at the top of the first interface.
在一种可能的实现方式中,电子设备将第一操作控件显示为激活状态,包括:电子设备通过改变第一操作控件的形状、大小、颜色或背景,将第一操作控件显示为激活状态。当然,电子设备在将第一操作控件显示为激活状态的同时,还可以播放提示音或产生振动提示用户。In a possible implementation manner, the electronic device displaying the first operation control as the activated state includes: the electronic device displays the first operation control as the activated state by changing the shape, size, color or background of the first operation control. Of course, the electronic device may also play a prompt sound or generate vibration to prompt the user while displaying the first operation control as an activated state.
在一种可能的实现方式中,上述滑动操作的结束是指触摸体离开电子设备的触摸屏;此时,电子设备响应于滑动操作的结束显示第二界面,具体包括:当检测到触摸体离开电子设备的触摸屏时,向第一界面所属的应用上报第一操作控件的点击事件,以使得该应用响应本次点击事件显示第一操作控件被点击后将显示的第二界面。In a possible implementation, the end of the above sliding operation means that the touch body leaves the touch screen of the electronic device; at this time, the electronic device displays the second interface in response to the end of the sliding operation, which specifically includes: when it is detected that the touch body leaves the electronic device When the device touches the screen, the click event of the first operation control is reported to the application to which the first interface belongs, so that the application responds to the click event to display the second interface that will be displayed after the first operation control is clicked.
在一种可能的实现方式中,上述第一方向可以是指从第一界面的顶部指向第一界面的底部的方向。也就是说,用户通过在第一界面中输入一个下拉操作可触发电子设备激活第一界面顶部的第一操作控件。In a possible implementation manner, the above-mentioned first direction may refer to a direction from the top of the first interface to the bottom of the first interface. That is, the user can trigger the electronic device to activate the first operation control on the top of the first interface by inputting a pull-down operation in the first interface.
第二方面,本申请提供一种具有触摸屏的电子设备,包括显示单元、接收单元和检测单元,显示单元用于:显示应用的第一界面,第一界面的顶部设置有第一操作控件;接收单元用于:接收用户在第一界面上输入的滑动操作;检测单元用于:检测该 滑动操作满足第一滑动过程,第一滑动过程是指触摸体接触第一界面后沿第一方向滑动第一预设距离的过程;上述显示单元还用于:当检测到上述滑动操作满足第一滑动过程时,将第一操作控件显示为激活状态;上述滑动操作结束时,显示第二界面,其中,第二界面是第一操作控件被点击后将显示的界面。In a second aspect, the present application provides an electronic device with a touch screen, including a display unit, a receiving unit, and a detection unit. The display unit is configured to: display a first interface of the application, and a first operation control is provided on the top of the first interface; receiving The unit is used for: receiving the sliding operation input by the user on the first interface; the detecting unit is used for: detecting that the sliding operation satisfies the first sliding process, the first sliding process refers to the first sliding of the touch body in the first direction after contacting the first interface A process of a preset distance; the display unit is also used for: when it is detected that the sliding operation satisfies the first sliding process, display the first operation control as an activated state; when the sliding operation ends, display a second interface, wherein, The second interface is the interface that will be displayed after the first operation control is clicked.
在一种可能的实现方式中,上述检测单元还用于:检测上述滑动操作满足第二滑动过程,第二滑动过程的起始位置为第一滑动过程的结束位置,其中,在第一滑动过程和第二滑动过程中,该触摸体保持触摸在电子设备的触摸屏上;上述显示单元还用于:响应于检测到滑动操作满足第二滑动过程,将第一界面中的第二操作控件显示为激活状态,并将第一操作控件显示为去激活状态。In a possible implementation manner, the detection unit is further configured to: detect that the sliding operation satisfies a second sliding process, and the start position of the second sliding process is the end position of the first sliding process, wherein, in the first sliding process And during the second sliding process, the touch body remains touched on the touch screen of the electronic device; the above-mentioned display unit is further configured to: in response to detecting that the sliding operation satisfies the second sliding process, display the second operation control in the first interface as The activated state, and the first operation control is displayed in the deactivated state.
在一种可能的实现方式中,上述检测单元还用于:检测上述滑动操作满足第三滑动过程,第三滑动过程的滑动方向与第二滑动过程的滑动方向与相反,第三滑动过程的滑动距离与第二滑动过程的滑动距离的差小于预设值,其中,在第三滑动过程中,触摸体保持触摸在电子设备的触摸屏上;上述显示单元还用于:响应于检测到滑动操作满足第三滑动过程,重新将第一操作控件显示为激活状态,并将第二操作控件显示为去激活状态。In a possible implementation manner, the detection unit is further configured to detect that the sliding operation satisfies the third sliding process, the sliding direction of the third sliding process is opposite to the sliding direction of the second sliding process, and the sliding of the third sliding process The difference between the distance and the sliding distance of the second sliding process is less than the preset value, wherein during the third sliding process, the touch body keeps touching on the touch screen of the electronic device; the above-mentioned display unit is also used for: in response to detecting that the sliding operation satisfies In the third sliding process, the first operation control is displayed in the activated state again, and the second operation control is displayed in the deactivated state.
在一种可能的实现方式中,上述检测单元还用于:检测触摸体在第一滑动过程的结束位置的停留时间;上述显示单元还用于:若停留时间大于预设时间,则在第一界面中显示第一操作控件的二级菜单。In a possible implementation, the detection unit is further used to detect the dwell time of the touch body at the end position of the first sliding process; the display unit is also used to: if the dwell time is greater than the preset time, then The secondary menu of the first operation control is displayed on the interface.
在一种可能的实现方式中,上述检测单元还用于:检测上述滑动操作满足第四滑动过程,第四滑动过程的起始位置为第一滑动过程的结束位置,在第四滑动过程中,触摸体保持触摸在电子设备的触摸屏上;上述显示单元还用于:响应于滑动操作满足第四滑动过程,将二级菜单中的第三操作控件显示为激活状态。In a possible implementation, the detection unit is further configured to: detect that the sliding operation satisfies the fourth sliding process, the starting position of the fourth sliding process is the ending position of the first sliding process, and during the fourth sliding process, The touch body keeps touching on the touch screen of the electronic device; the above-mentioned display unit is further configured to: in response to the sliding operation satisfying the fourth sliding process, display the third operation control in the secondary menu as an active state.
在一种可能的实现方式中,第一界面内隐藏有刷新按钮,该刷新按钮在第三方向上与第一操作控件相邻,第三方向与第一方向相同或不同;此时,上述检测单元还用于:检测上述滑动操作满足第五滑动过程,第五滑动过程是指从第一滑动过程的结束位置开始沿第三方向移动第三预设距离的过程,在第五滑动过程中,触摸体保持触摸在电子设备的触摸屏上;上述显示单元还用于:响应于检测到滑动操作满足第五滑动过程,在第一界面中显示出该刷新按钮,并将刷新按钮显示为激活状态。In a possible implementation manner, a refresh button is hidden in the first interface, and the refresh button is adjacent to the first operation control in the third direction, and the third direction is the same as or different from the first direction; in this case, the above detection unit It is also used to detect that the above sliding operation satisfies the fifth sliding process. The fifth sliding process refers to the process of moving a third preset distance in the third direction from the end position of the first sliding process. During the fifth sliding process, touch The body keeps touching on the touch screen of the electronic device; the above-mentioned display unit is further configured to: in response to detecting that the sliding operation satisfies the fifth sliding process, display the refresh button in the first interface and display the refresh button in an activated state.
在一种可能的实现方式中,上述电子设备还包括执行单元,其中,若检测单元检测到触摸体离开第一界面,则执行单元执行与点击该刷新按钮对应的刷新操作;若执行单元检测到触摸体继续滑动,则显示单元可继续将刷新按钮显示为激活状态。In a possible implementation manner, the above electronic device further includes an execution unit, wherein, if the detection unit detects that the touch body leaves the first interface, the execution unit executes a refresh operation corresponding to clicking the refresh button; if the execution unit detects If the touch body continues to slide, the display unit can continue to display the refresh button as an activated state.
在一种可能的实现方式中,上述显示单元具体可通过改变第一操作控件的形状、大小、颜色或背景,将第一操作控件显示为激活状态。In a possible implementation manner, the above-mentioned display unit may specifically display the first operation control in an activated state by changing the shape, size, color or background of the first operation control.
在一种可能的实现方式中,上述滑动操作的结束是指触摸体离开电子设备的触摸屏;当检测单元检测到触摸体离开电子设备的触摸屏时,可向对应应用上报第一操作控件的点击事件,以使得该应用响应该点击事件指示显示单元显示第一操作控件被点击后将显示的第二界面。In a possible implementation, the end of the above sliding operation means that the touch body leaves the touch screen of the electronic device; when the detection unit detects that the touch body leaves the touch screen of the electronic device, it can report the click event of the first operation control to the corresponding application , So that the application instructs the display unit to display the second interface that will be displayed after the first operation control is clicked in response to the click event.
第三方面,本申请提供一种电子设备,包括:触摸屏、一个或多个处理器、一个或多个存储器、以及一个或多个计算机程序;其中,处理器与触摸屏以及存储器均耦 合,上述一个或多个计算机程序被存储在存储器中,当电子设备运行时,该处理器执行该存储器存储的一个或多个计算机程序,以使电子设备执行上述任一项所述的控件的操作方法。In a third aspect, the present application provides an electronic device, including: a touch screen, one or more processors, one or more memories, and one or more computer programs; wherein the processor is coupled with the touch screen and the memory, and the above one One or more computer programs are stored in the memory, and when the electronic device is running, the processor executes one or more computer programs stored in the memory, so that the electronic device executes the control operation method described in any one of the above items.
第四方面,本申请提供一种计算机可读存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行如第一方面中任一项所述的控件的操作方法。In a fourth aspect, the present application provides a computer-readable storage medium including computer instructions, which when the computer instructions run on an electronic device, cause the electronic device to execute the control operation method described in any one of the first aspect.
第五方面,本申请提供一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设备执行如第一方面中任一项所述的控件的操作方法。In a fifth aspect, the present application provides a computer program product, which when the computer program product runs on an electronic device, causes the electronic device to execute the control operation method described in any one of the first aspect.
可以理解地,上述提供的第二方面和第三方面所述的电子设备、第四方面所述的计算机可读存储介质,以及第五方面所述的计算机程序产品均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Understandably, the electronic equipment described in the second and third aspects, the computer-readable storage medium described in the fourth aspect, and the computer program product described in the fifth aspect are all used to execute the above-provided electronic devices. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, which will not be repeated here.
附图说明Description of the drawings
图1A为现有技术中单手操作模式的应用场景示意图;FIG. 1A is a schematic diagram of an application scenario of a single-handed operation mode in the prior art;
图1B为本申请实施例提供的一种电子设备的结构示意图一;FIG. 1B is a first structural diagram of an electronic device provided by an embodiment of this application;
图2为本申请实施例提供的一种控件的操作方法的应用场景示意图一;2 is a schematic diagram 1 of an application scenario of a control operation method provided by an embodiment of the application;
图3为本申请实施例提供的一种电子设备中操作系统的架构示意图;FIG. 3 is a schematic structural diagram of an operating system in an electronic device provided by an embodiment of the application;
图4为本申请实施例提供的一种控件的操作方法的应用场景示意图二;4 is a second schematic diagram of an application scenario of a control operation method provided by an embodiment of the application;
图5为本申请实施例提供的一种控件的操作方法的流程示意图;FIG. 5 is a schematic flowchart of a method for operating a control provided by an embodiment of the application;
图6为本申请实施例提供的一种控件的操作方法的应用场景示意图三;FIG. 6 is a third schematic diagram of an application scenario of a control operation method provided by an embodiment of the application;
图7为本申请实施例提供的一种控件的操作方法的应用场景示意图四;FIG. 7 is a fourth schematic diagram of an application scenario of a control operation method provided by an embodiment of the application;
图8为本申请实施例提供的一种控件的操作方法的应用场景示意图五;8 is a schematic diagram 5 of an application scenario of a control operation method provided by an embodiment of the application;
图9为本申请实施例提供的一种控件的操作方法的应用场景示意图六;FIG. 9 is a sixth schematic diagram of an application scenario of a control operation method provided by an embodiment of the application;
图10为本申请实施例提供的一种控件的操作方法的应用场景示意图七;FIG. 10 is a schematic diagram 7 of an application scenario of a control operation method provided by an embodiment of the application; FIG.
图11为本申请实施例提供的一种控件的操作方法的应用场景示意图八;FIG. 11 is an eighth schematic diagram of an application scenario of a control operation method provided by an embodiment of this application;
图12为本申请实施例提供的一种控件的操作方法的应用场景示意图九;12 is a schematic diagram 9 of an application scenario of a control operation method provided by an embodiment of this application;
图13为本申请实施例提供的一种控件的操作方法的应用场景示意图十;FIG. 13 is a tenth schematic diagram of an application scenario of a control operation method provided by an embodiment of this application;
图14为本申请实施例提供的一种控件的操作方法的应用场景示意图十一;14 is a schematic diagram eleventh of an application scenario of a control operation method provided by an embodiment of this application;
图15为本申请实施例提供的一种控件的操作方法的应用场景示意图十二;FIG. 15 is a twelfth schematic diagram of an application scenario of a control operation method provided by an embodiment of this application;
图16为本申请实施例提供的一种控件的操作方法的应用场景示意图十三;16 is a thirteenth schematic diagram of an application scenario of a control operation method provided by an embodiment of the application;
图17为本申请实施例提供的一种控件的操作方法的应用场景示意图十四;FIG. 17 is a fourteenth schematic diagram of an application scenario of a control operation method provided by an embodiment of this application;
图18为本申请实施例提供的一种控件的操作方法的应用场景示意图十五;18 is a fifteenth schematic diagram of an application scenario of a control operation method provided by an embodiment of this application;
图19为本申请实施例提供的一种控件的操作方法的应用场景示意图十六;FIG. 19 is a sixteenth schematic diagram of an application scenario of a control operation method provided by an embodiment of this application;
图20为本申请实施例提供的一种控件的操作方法的应用场景示意图十七;20 is a seventeenth schematic diagram of an application scenario of a control operation method provided by an embodiment of this application;
图21为本申请实施例提供的一种控件的操作方法的应用场景示意图十八;FIG. 21 is an eighteenth schematic diagram of an application scenario of a control operation method provided by an embodiment of this application;
图22为本申请实施例提供的一种电子设备的结构示意图二。FIG. 22 is a second structural diagram of an electronic device provided by an embodiment of this application.
具体实施方式Detailed ways
为了方便清楚地理解下述各实施例,首先给出相关技术的简要介绍:In order to facilitate a clear understanding of the following embodiments, a brief introduction of related technologies is first given:
控件:通常可将在GUI(graphical user interface,图形用户界面)中呈现的元素称为控件,其能够为用户提供一定的操作或用于显示一定内容。Controls: Generally, elements presented in a GUI (graphical user interface, graphical user interface) can be referred to as controls, which can provide users with certain operations or display certain content.
示例性的,上述控件具体可以包括文本控件,例如TextView控件、EditText控件等,也可以包括按钮控件,例如Button控件、ImageButton控件等,还可以包括图片控件,例如ImageView控件等,本申请实施例对此不做任何限制。Exemplarily, the aforementioned controls may specifically include text controls, such as TextView controls, EditText controls, etc., may also include button controls, such as Button controls, ImageButton controls, etc., and may also include image controls, such as ImageView controls. This does not impose any restrictions.
在本申请实施例中,可将显示界面中显示的各个控件划分为操作控件和非操作控件。In the embodiment of the present application, each control displayed in the display interface may be divided into an operation control and a non-operation control.
其中,操作控件是指可与用户交互的控件,即该控件可响应用户的触摸操作呈现相应的功能。相应的,非操作控件是指无法响应用户的触摸操作实现相关功能的控件。The operation control refers to a control that can interact with a user, that is, the control can present corresponding functions in response to a user's touch operation. Correspondingly, a non-operational control refers to a control that cannot implement related functions in response to a user's touch operation.
例如,当某一控件为Button类型的控件时,电子设备可确定该控件为操作控件;当某一控件为ImageView类型的控件时,电子设备可确定该控件为非操作控件。又或者,电子设备还可以根据控件在显示界面中的大小、位置以及图层顺序等参数识别该控件为操作控件或非操作控件,本申请实施例对此不做任何限制。For example, when a certain control is a Button type control, the electronic device can determine that the control is an operation control; when a certain control is an ImageView type control, the electronic device can determine that the control is a non-operation control. Alternatively, the electronic device can also identify the control as an operation control or a non-operation control according to parameters such as the size, position, and layer order of the control in the display interface, and the embodiment of the present application does not impose any limitation on this.
下面将结合附图对本实施例的实施方式进行详细描述。The implementation of this embodiment will be described in detail below with reference to the accompanying drawings.
本申请实施例提供的一种控件的操作方法可应用于手机、平板电脑、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、手持计算机、上网本、个人数字助理(personal digital assistant,PDA)、可穿戴电子设备、虚拟现实设备等电子设备中,本申请实施例对此不做任何限制。The operation method of the control provided by the embodiment of this application can be applied to mobile phones, tablet computers, notebook computers, ultra-mobile personal computers (UMPC), handheld computers, netbooks, and personal digital assistants. Among electronic devices such as PDA), wearable electronic devices, and virtual reality devices, the embodiments of the present application do not impose any restriction on this.
示例性的,图1B示出了电子设备100的结构示意图。Exemplarily, FIG. 1B shows a schematic structural diagram of the electronic device 100.
电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180等。The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, and audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, etc.
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or arrange different components. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait. Among them, the different processing units may be independent devices or integrated in one or more processors.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 to store instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can store instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S) 接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (PCM) interface, and a universal asynchronous transmitter receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / Or Universal Serial Bus (USB) interface, etc.
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example: Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna can be used in combination with a tuning switch.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 can provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), and the like. The mobile communication module 150 can receive electromagnetic waves by the antenna 1, and perform processing such as filtering, amplifying and transmitting the received electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor, and convert it into electromagnetic waves for radiation via the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), and global navigation satellites. System (global navigation satellite system, GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be sent from the processor 110, perform frequency modulation, amplify, and convert it into electromagnetic waves to radiate through the antenna 2.
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc. The GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite-based augmentation systems (SBAS).
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为 图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like. The GPU is an image processing microprocessor, which is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and is used for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos, and the like. The display screen 194 includes a display panel. The display panel can use liquid crystal display (LCD), organic light-emitting diode (OLED), active matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode). AMOLED, flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or N display screens 194, and N is a positive integer greater than one.
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used to process the data fed back from the camera 193. For example, when taking a picture, the shutter is opened, the light is transmitted to the photosensitive element of the camera through the lens, the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing and is converted into an image visible to the naked eye. ISP can also optimize the image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be provided in the camera 193.
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and is projected to the photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transfers the electrical signal to the ISP to convert it into a digital image signal. ISP outputs digital image signals to DSP for processing. DSP converts digital image signals into standard RGB, YUV and other formats of image signals. In some embodiments, the electronic device 100 may include one or N cameras 193, and N is a positive integer greater than one.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects the frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, video and other files in an external memory card.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可 以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。The internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121. The internal memory 121 may include a storage program area and a storage data area. Among them, the storage program area can store an operating system, an application program (such as a sound playback function, an image playback function, etc.) required by at least one function, and the like. The data storage area can store data (such as audio data, phone book, etc.) created during the use of the electronic device 100. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. For example, music playback, recording, etc.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110, or part of the functional modules of the audio module 170 may be provided in the processor 110.
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。The speaker 170A, also called "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。The receiver 170B, also called "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a call or voice message, it can receive the voice by bringing the receiver 170B close to the human ear.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The microphone 170C, also called "microphone", "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can make a sound by approaching the microphone 170C through the human mouth, and input the sound signal into the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, which can implement noise reduction functions in addition to collecting sound signals. In other embodiments, the electronic device 100 may also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The earphone interface 170D is used to connect wired earphones. The earphone interface 170D may be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, and a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
传感器模块180中可以包括压力传感器,陀螺仪传感器,气压传感器,磁传感器,加速度传感器,距离传感器,接近光传感器,指纹传感器,温度传感器,环境光传感器,骨传导传感器等。The sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, an ambient light sensor, a bone conduction sensor, etc.
当然,电子设备100还可以包括充电管理模块、电源管理模块、电池、按键、指示器以及1个或多个SIM卡接口等,本申请实施例对此不做任何限制。Of course, the electronic device 100 may also include a charging management module, a power management module, a battery, a button, an indicator, and one or more SIM card interfaces, etc. The embodiment of the present application does not impose any limitation on this.
在本申请的一些实施例中,仍如图1B所示,上述传感器模块180中可以包括触摸传感器。触摸传感器可采集用户在其上或附近的触摸事件(比如用户使用手指、触控笔等任何适合的物体在触摸传感器表面上的操作),并将采集到的触摸信息发送给其他器件,例如处理器110。In some embodiments of the present application, as still shown in FIG. 1B, the aforementioned sensor module 180 may include a touch sensor. The touch sensor can collect the user's touch events on or near it (such as the user's operation on the surface of the touch sensor with fingers, stylus, etc.), and send the collected touch information to other devices, such as processing器110.
示例性的,触摸传感器可采用电阻式、电容式、红外线以及表面声波等多种方式实现。触摸传感器可与显示屏194集成为电子设备100的触摸屏,或者,触摸传感器与显示屏194可作为两个独立的部件来实现电子设备100的输入和输出功能。Exemplarily, the touch sensor can be implemented in multiple ways such as resistive, capacitive, infrared, and surface acoustic waves. The touch sensor can be integrated with the display screen 194 as a touch screen of the electronic device 100, or the touch sensor and the display screen 194 can be used as two independent components to implement the input and output functions of the electronic device 100.
在本申请实施例中,可预先在包含触摸传感器的触摸屏中设置直角坐标系。例如,如图2所示,可以触摸屏的左上角为原点O(0,0)建立直角坐标系,也可以将触摸屏的几何中心作为原点O(0,0)建立直角坐标系(图2中未示出)。当触摸体在触摸屏内滑动时,触摸屏中的触摸传感器可以持续采集触摸体在触摸屏上生成的一系列触摸事件(例如触摸点的坐标、触摸时间等),并将这一系列触摸事件上报给处理器 110。其中,上述触摸体具体可以为触摸笔、用户手指、关节、或具有触摸功能的触控手套等物体,本申请实施例对此不做任何限制,后续实施例中以用户手指为触摸体进行示例性说明。In the embodiment of the present application, the rectangular coordinate system may be set in the touch screen including the touch sensor in advance. For example, as shown in Figure 2, the upper left corner of the touch screen can be the origin O (0, 0) to establish a rectangular coordinate system, or the geometric center of the touch screen can be used as the origin O (0, 0) to establish a rectangular coordinate system (not shown in Figure 2 show). When the touch body slides in the touch screen, the touch sensor in the touch screen can continuously collect a series of touch events (such as the coordinates of the touch point, touch time, etc.) generated by the touch body on the touch screen, and report the series of touch events to the processing器110. Among them, the above-mentioned touch body may specifically be a touch pen, a user's finger, a joint, or a touch glove with a touch function, etc. The embodiments of the present application do not make any restriction on this. In the subsequent embodiments, the user's finger is used as an example of the touch body. Sexual description.
处理器110可根据上述触摸事件计算用户手指在触摸屏上的滑动轨迹和滑动距离。如果处理器101计算出用户手指在y轴方向的滑动距离大于预设值,说明用户此时希望进入单手操作模式控制位于显示界面顶部的操作控件。进而,处理器101可指示触摸屏标记位于显示界面顶部的操作控件。例如,仍如图2所示,触摸屏可将位于显示界面201顶部最左侧的操作控件(即返回按钮202)进行高亮显示,使得返回按钮202处于激活状态。The processor 110 may calculate the sliding track and sliding distance of the user's finger on the touch screen according to the aforementioned touch event. If the processor 101 calculates that the sliding distance of the user's finger in the y-axis direction is greater than the preset value, it indicates that the user wishes to enter the single-handed operation mode to control the operation controls located at the top of the display interface. Furthermore, the processor 101 may instruct the touch screen to mark the operation control located at the top of the display interface. For example, as still shown in FIG. 2, the touch screen may highlight the operation control (ie, the return button 202) located on the leftmost side of the top of the display interface 201, so that the return button 202 is in an active state.
那么,如果用户确认此时需要点击返回按钮202实现返回功能,则用户可将手指离开触摸屏,结束本次滑动操作。触摸屏检测到用户手指离开后,可向处理器110发送本次滑动操作结束的事件,由于此时返回按钮202处于激活状态,因此,处理器110可执行返回按钮201被点击时的对应操作,例如,处理器110可指示触摸屏显示返回按钮201被点击后显示界面201的上一级菜单(图2中未示出显示界面201的上一级菜单的界面)。Then, if the user confirms that the return button 202 needs to be clicked to implement the return function at this time, the user can remove the finger from the touch screen to end this sliding operation. After the touch screen detects that the user's finger has left, it can send an event of the end of the sliding operation to the processor 110. Since the return button 202 is active at this time, the processor 110 can perform the corresponding operation when the return button 201 is clicked, for example The processor 110 may instruct the touch screen to display the upper-level menu of the display interface 201 after the return button 201 is clicked (the interface of the upper-level menu of the display interface 201 is not shown in FIG. 2).
可以看出,在触摸屏显示显示界面201时,如果用户希望进入单手操作模式控制显示界面201顶部的操作控件,用户可以在显示界面201中输入预设的滑动操作,触发处理器110将显示界面201顶部的操作控件显示为激活状态。进而,响应于滑动操作中用户手指离开的操作,处理器110可对被激活的操作控件执行对应的点击操作,从而模拟用户手指点击该操作控件实现相应的功能。It can be seen that when the display interface 201 is displayed on the touch screen, if the user wants to enter the one-handed operation mode to control the operation controls on the top of the display interface 201, the user can enter a preset sliding operation in the display interface 201, and the processor 110 will be triggered to display the interface The operation controls at the top of 201 are displayed as active. Furthermore, in response to the operation of the user's finger leaving in the sliding operation, the processor 110 may perform a corresponding click operation on the activated operation control, thereby simulating the user's finger to click the operation control to implement a corresponding function.
这样一来,用户通过一次滑动操作便可进入单手操作模式,并实现对当前显示界面中顶部操作控件的点击功能,在操作过程中电子设备也无需缩减显示界面中的内容,使用户可以方便、高效的操作显示界面顶部的操作控件,提高了用户单手操作时的使用体验。In this way, the user can enter the one-handed operation mode with a single sliding operation, and realize the click function of the top operation control in the current display interface. During the operation, the electronic device does not need to reduce the content in the display interface, so that the user can be more convenient. , Efficient operation of the operation controls on the top of the display interface improves the user experience when operating with one hand.
上述电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。The above-mentioned software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiment of the present application takes an Android system with a layered architecture as an example to illustrate the software structure of the electronic device 100 by way of example.
图3是本申请实施例的电子设备100的软件结构框图。FIG. 3 is a block diagram of the software structure of the electronic device 100 according to an embodiment of the present application.
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。华为自研发的移动终端操作系统,也可以参考该结构。The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Communication between layers through software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, the application layer, the application framework layer, the Android runtime and system library, and the kernel layer. Huawei's self-developed mobile terminal operating system can also refer to this structure.
1、应用程序层1. Application layer
应用程序层可以包括一系列应用程序。The application layer can include a series of applications.
如图3所示,上述应用程序可以包括通话,联系人,相机,图库,日历,地图,导航,蓝牙,音乐,视频,短信息等应用(application,APP)。As shown in FIG. 3, the above-mentioned application programs may include applications (application, APP) such as call, contact, camera, gallery, calendar, map, navigation, Bluetooth, music, video, short message, etc.
2、应用程序框架层2. Application framework layer
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
示例性的,应用程序框架层中可以包括视图系统(view system),通知管理器,活动管理器,窗口管理器,内容提供器,视图系统,输入管理器等。Exemplarily, the application framework layer may include a view system (view system), a notification manager, an activity manager, a window manager, a content provider, a view system, an input manager, etc.
其中,视图系统可用于构建应用程序的显示界面。每个显示界面可以由一个或多个控件组成。一般而言,控件可以包括图标、按钮、菜单、选项卡、文本框、对话框、状态栏、导航栏、微件(Widget)等界面元素。Among them, the view system can be used to construct the display interface of the application. Each display interface can be composed of one or more controls. Generally speaking, controls may include interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets.
上述通知管理器可使应用程序可以在状态栏中显示通知信息,可用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The above notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, and so on. The notification manager can also be a notification that appears in the status bar at the top of the system in the form of a chart or a scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, text messages are prompted in the status bar, prompt sounds, electronic devices vibrate, and indicator lights flash.
上述活动管理器可用于管理每个应用的生命周期。应用通常以activity的形式运行在操作系统中。活动管理器可以调度应用的activity进程管理每个应用的生命周期。窗口管理器用于管理窗口程序。The above activity manager can be used to manage the life cycle of each application. Applications usually run in the operating system in the form of activity. The activity manager can schedule the activity process of the application to manage the life cycle of each application. The window manager is used to manage window programs.
上述窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。The above-mentioned window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, take a screenshot, and so on.
上述内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。The above-mentioned content provider is used to store and obtain data, and make these data accessible by applications. The data may include videos, images, audios, phone calls made and received, browsing history and bookmarks, phone book, etc.
3、Android runtime和系统库3. Android runtime and system libraries
Android runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。Android runtime includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one part is the function functions that the java language needs to call, and the other part is the core library of Android.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and application framework layer run in a virtual machine. The virtual machine executes the java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。The system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), three-dimensional graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL), etc.
其中,表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。2D图形引擎是2D绘图的绘图引擎。Among them, the surface manager is used to manage the display subsystem, and provides a combination of 2D and 3D layers for multiple applications. The media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files. The media library can support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing. The 2D graphics engine is a drawing engine for 2D drawing.
4、内核层4. The kernel layer
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动等,本申请实施例对此不做任何限制。The kernel layer is the layer between hardware and software. The kernel layer includes at least a display driver, a camera driver, an audio driver, a sensor driver, etc., which are not limited in the embodiment of the present application.
在本申请的一些实施例中,上述视图系统可响应应用的请求绘制每一帧显示界面。视图系统在绘制显示界面时可记录显示界面的视图信息,该视图信息中可以包含显示界面中各个控件的位置、大小以及控件之间的图层关系等。示例性的,视图信息中还 可以记录每个控件的属性或类型。例如,控件1为button类型的控件,或者,控件2为文本框类型的控件等。In some embodiments of the present application, the above-mentioned view system may draw each frame of the display interface in response to the request of the application. The view system can record the view information of the display interface when drawing the display interface, and the view information can include the position and size of each control in the display interface, and the layer relationship between the controls. Exemplarily, the attribute or type of each control can also be recorded in the view information. For example, control 1 is a button type control, or control 2 is a text box type control, etc.
示例性的,如图4中的(a)所示,应用程序层中正在运行微信APP的显示界面301。用户手指在微信APP的显示界面301中滑动时,触摸屏可得到这一触摸操作相关的一系列触摸点的信息,例如,触摸点的坐标(x,y)等。进而,触摸屏可向内核层上报用户这一触摸操作产生的原始触摸事件。内核层得到上述原始触摸事件后,可将该触摸事件封装为应用程序框架层(即Framework层)能够读取的高级触摸事件,即touch event,touch event中包含触摸点的坐标以及本次触摸事件的类型,例如,action down事件、action move事件以及action up事件等。并将该高级触摸事件发送给应用程序框架层中的输入管理器(InputManager)。Exemplarily, as shown in (a) of FIG. 4, the display interface 301 of the WeChat APP is running in the application layer. When the user's finger slides on the display interface 301 of the WeChat APP, the touch screen can obtain information about a series of touch points related to this touch operation, for example, the coordinates (x, y) of the touch points. Furthermore, the touch screen can report the original touch event generated by the user's touch operation to the kernel layer. After the kernel layer obtains the above-mentioned original touch event, it can encapsulate the touch event as an advanced touch event that can be read by the application framework layer (ie Framework layer), namely touch event, which contains the coordinates of the touch point and this touch event Types of events, for example, action down events, action move events, and action up events. And send the advanced touch event to the input manager (InputManager) in the application framework layer.
输入管理器获取到上述高级触摸事件后,可根据高级触摸事件中触摸点的坐标和触摸事件的类型实时计算用户手指的滑动轨迹和滑动距离。例如,当输入管理器检测到action down事件时,说明用户手指接触触摸屏,当输入管理器检测到action up事件时,说明用户手指离开触摸屏。那么,输入管理器可根据相邻的action down事件和action up事件之间触摸点的坐标识别出用户手指在触摸屏上的滑动轨迹和滑动距离。如果检测到用户手指沿y轴方向(例如y轴正方向)的滑动距离D达到预设值,说明用户希望进入单手操作模式控制显示界面301顶部的操作控件。此时,输入管理器可根据视图系统中记录的显示界面301的视图信息确定此时需要被激活的具体操作控件。After the input manager obtains the above-mentioned advanced touch event, it can calculate the sliding track and sliding distance of the user's finger in real time according to the coordinates of the touch point in the advanced touch event and the type of the touch event. For example, when the input manager detects an action down event, it means that the user's finger touches the touch screen. When the input manager detects an action up event, it means that the user's finger leaves the touch screen. Then, the input manager can recognize the sliding track and sliding distance of the user's finger on the touch screen according to the coordinates of the touch point between the adjacent action down event and the action up event. If it is detected that the sliding distance D of the user's finger along the y-axis direction (for example, the positive direction of the y-axis) reaches a preset value, it indicates that the user wants to enter the single-handed operation mode to control the operation controls on the top of the display interface 301. At this time, the input manager can determine the specific operation control that needs to be activated at this time according to the view information of the display interface 301 recorded in the view system.
例如,如果检测到用户手指的触摸点位于显示屏的左半部分,比如,用户手指在显示界面301中滑动时触摸点的横坐标x位于显示界面301的左半部分,则输入管理器可请求视图系统查询位于显示界面301顶部最左侧的操作控件。视图系统根据显示界面301的视图信息可确定出显示界面301顶部最左侧的操作控件为返回按钮302,即此时需要被激活的操作控件为返回按钮302。For example, if it is detected that the touch point of the user's finger is located in the left half of the display screen, for example, when the user's finger slides in the display interface 301, the horizontal coordinate x of the touch point is located in the left half of the display interface 301, the input manager may request The view system queries the operation control located on the leftmost side of the top of the display interface 301. The view system can determine, according to the view information of the display interface 301, that the leftmost operation control at the top of the display interface 301 is the return button 302, that is, the operation control that needs to be activated at this time is the return button 302.
相应的,检测到用户手指的触摸点位于显示屏的右半部分,比如,如果用户手指在显示界面301中滑动时触摸点的横坐标x位于显示界面301的右半部分,则输入管理器可请求视图系统查询位于显示界面301顶部最右侧的操作控件。视图系统根据显示界面301的视图信息可确定出显示界面301顶部最右侧的操作控件为添加按钮303,即此时需要被激活的操作控件为添加按钮303。Correspondingly, it is detected that the touch point of the user's finger is located in the right half of the display screen. For example, if the horizontal coordinate x of the touch point is located in the right half of the display interface 301 when the user's finger slides in the display interface 301, the input manager can The view system is requested to query the operation control located at the far right of the top of the display interface 301. The view system can determine, according to the view information of the display interface 301, that the rightmost operation control at the top of the display interface 301 is the add button 303, that is, the operation control that needs to be activated at this time is the add button 303.
以需要被激活的操作控件为返回按钮302举例,如图4中的(b)所示,输入管理器可调用视图系统在显示界面301中将返回按钮302显示为激活状态,使用户获知返回按钮302被激活。例如,视图系统可以通过改变返回按钮302的大小、形状或颜色等方式将返回按钮302显示为激活状态。Taking the operation control that needs to be activated as an example of the return button 302, as shown in (b) in Figure 4, the input manager can call the view system to display the return button 302 in the active state in the display interface 301, so that the user knows the return button 302 is activated. For example, the view system can display the return button 302 as an active state by changing the size, shape, or color of the return button 302.
当返回按钮302被激活后,如果用户希望实现点击返回按钮302的相关功能,则用户可结束本次滑动操作,将手指离开显示界面301。触摸屏检测到这一操作后可逐层向输入管理器上报用户手指离开显示界面301的输入事件。输入管理器响应于该输入事件,可模拟用户点击当前被激活的返回按钮302的操作,向正在运行的微信APP上报对应的触摸事件。例如,该触摸事件中触摸点的坐标可以为返回按钮302上的任意坐标,该触摸事件的类型可以为单击事件。那么,微信APP响应于该触摸事件可调用与单击返回按钮302这一触摸事件对应的回调函数实现对应的返回功能。After the return button 302 is activated, if the user wishes to implement the related function of clicking the return button 302, the user can end this sliding operation and remove the finger from the display interface 301. After the touch screen detects this operation, it can report the input event of the user's finger leaving the display interface 301 to the input manager layer by layer. In response to the input event, the input manager can simulate the operation of the user clicking the currently activated return button 302, and report the corresponding touch event to the running WeChat APP. For example, the coordinates of the touch point in the touch event can be any coordinates on the return button 302, and the type of the touch event can be a click event. Then, in response to the touch event, the WeChat APP can call the callback function corresponding to the touch event of clicking the return button 302 to implement the corresponding return function.
在一些实施例中,当显示界面301中的某一操作控件被激活后,由于用户手指还未离开显示界面301,那么,用户还可继续输入滑动操作切换被激活的操作控件。例如,当返回按钮302被激活后,如果检测到用户手指继续沿x轴正方向滑动,且滑动距离大于预设值,则视图系统可根据显示界面301的视图信息将返回按钮302沿x轴正方向最近的操作控件(例如搜索按钮303)确定为此时需要被激活的操作控件,并将搜索按钮303显示为激活状态。In some embodiments, after a certain operation control in the display interface 301 is activated, since the user's finger has not left the display interface 301, the user can continue to input a sliding operation to switch the activated operation control. For example, after the return button 302 is activated, if it is detected that the user's finger continues to slide along the positive direction of the x-axis, and the sliding distance is greater than the preset value, the view system can move the return button 302 to the positive direction along the x-axis according to the view information of the display interface 301. The operation control with the closest direction (for example, the search button 303) is determined to be the operation control that needs to be activated at this time, and the search button 303 is displayed in an activated state.
也就是说,用户可以通过在显示界面中输入滑动操作触发电子设备激活显示界面中的各个操作控件,使电子设备进入单手操作模式。当检测到用户输入的滑动操作结束,即用户手指离开显示界面时,说明用户需要点击此时被激活的操作控件,则电子设备可模拟点击对应操作控件的方法实现该操作控件的相应功能。In other words, the user can trigger the electronic device to activate various operation controls in the display interface by inputting a sliding operation in the display interface, so that the electronic device enters a one-handed operation mode. When the end of the sliding operation input by the user is detected, that is, when the user's finger leaves the display interface, it indicates that the user needs to click the operation control activated at this time, and the electronic device can simulate the method of clicking the corresponding operation control to realize the corresponding function of the operation control.
这样,在不改变显示界面中显示内容的情况下,电子设备为用户提供了一种在显示界面中快捷控制操作控件实现单手操作的交互方式,从而在保证显示内容和显示效果的同时提高了用户单手操作时的使用体验。In this way, without changing the display content in the display interface, the electronic device provides the user with an interactive way to quickly control the operation controls in the display interface to achieve one-handed operation, thereby improving the display content and display effect while ensuring User experience when operating with one hand.
以下将以手机作为上述电子设备100举例,结合附图详细阐述本申请实施例提供的一种控件的操作方法。In the following, a mobile phone will be taken as an example of the above-mentioned electronic device 100, and a method for operating a control provided by an embodiment of the present application will be described in detail with reference to the accompanying drawings.
如图5所示,本申请实施例提供的一种控件的操作方法可包括下述步骤S501-S507:As shown in FIG. 5, a control operation method provided by an embodiment of the present application may include the following steps S501-S507:
S501、手机显示第一应用的第一界面。S501. The mobile phone displays the first interface of the first application.
其中,上述第一界面可以是手机中安装的任意APP运行时显示出的界面。Wherein, the above-mentioned first interface may be an interface displayed when any APP installed in the mobile phone is running.
例如,如图6所示,第一界面可以为手机在运行微信APP时正在显示的首页601。首页601中可以包括一个或多个控件。例如,首页601的顶部设置有返回按钮602、标题603、搜索按钮604以及添加按钮605等。其中,返回按钮602、搜索按钮604以及添加按钮605均为可以响应用户触摸操作的操作控件;而标题603为无法响应用户触摸操作的非操作控件。For example, as shown in FIG. 6, the first interface may be the home page 601 being displayed when the mobile phone is running the WeChat APP. The home page 601 may include one or more controls. For example, the top of the home page 601 is provided with a back button 602, a title 603, a search button 604, an add button 605, and the like. Among them, the return button 602, the search button 604, and the add button 605 are all operation controls that can respond to the user's touch operation; and the title 603 is a non-operation control that cannot respond to the user's touch operation.
当手机的触摸屏较大时,用户使用单手点击首页601顶部的各个操作控件将变得较为困难。对此,在本申请实施例中,当用户希望控制正在显示的第一界面(例如首页601)中的操作控件时,可向首页601中输入滑动操作,从而触发手机继续执行下述步骤S502-S507。When the touch screen of the mobile phone is large, it will become more difficult for the user to click each operation control on the top of the home page 601 with one hand. In this regard, in the embodiment of the present application, when the user wants to control the operation controls in the first interface (for example, the home page 601) being displayed, he can input a sliding operation into the home page 601, thereby triggering the mobile phone to continue to perform the following steps S502- S507.
S502、手机检测用户在第一界面中输入的滑动操作。S502: The mobile phone detects the sliding operation input by the user in the first interface.
仍以微信APP的首页601为第一界面举例,手机在显示首页601的同时可通过触摸屏上的触摸传感器实时检测用户输入的滑动操作。该滑动操作是指从用户手指接触触摸屏开始,用户手指在触摸屏上产生一定的位移,直至用户手指离开触摸屏的整个过程。Still taking the home page 601 of the WeChat APP as the first interface as an example, the mobile phone can detect the sliding operation input by the user in real time through the touch sensor on the touch screen while displaying the home page 601. The sliding operation refers to the entire process from when the user's finger touches the touch screen, and the user's finger generates a certain displacement on the touch screen, until the user's finger leaves the touch screen.
如图7所示,以首页601的左上角为坐标原点O(0,0)举例,该直角坐标系的x轴与手机的较短边平行,该直角坐标系的y轴与手机的较长边平行。当检测到用户手指接触触摸屏时,手机可基于上述直角坐标系采集触摸点A0的坐标:A0(x0,y0)。触摸点A0为用户输入滑动操作时的起始位置。用户手指在首页601上从触摸点A0开始输入滑动操作的过程中,手机可实时采集触摸点A1、触摸点A2、触摸点A3等一系列触摸点的坐标。手机可根据采集到的这些触摸点的坐标确定用户手指在首页601中的滑动方向、滑动距离以及滑动轨迹等。As shown in Figure 7, taking the upper left corner of the homepage 601 as the coordinate origin O(0,0) for example, the x-axis of the rectangular coordinate system is parallel to the shorter side of the mobile phone, and the y-axis of the rectangular coordinate system is parallel to the longer side of the mobile phone. The sides are parallel. When it is detected that the user's finger touches the touch screen, the mobile phone can collect the coordinates of the touch point A0 based on the above-mentioned rectangular coordinate system: A0(x0, y0). The touch point A0 is the starting position when the user inputs the sliding operation. When the user's finger starts to input a sliding operation from the touch point A0 on the home page 601, the mobile phone can collect the coordinates of a series of touch points such as the touch point A1, the touch point A2, and the touch point A3 in real time. The mobile phone can determine the sliding direction, sliding distance, and sliding track of the user's finger on the home page 601 according to the collected coordinates of these touch points.
当然,手机在采集上述滑动操作中各个触摸点的坐标的同时,还可以记录对应触摸点的触摸时间等信息,手机可根据触摸点的触摸时间确定用户输入滑动操作时在不同位置手指停留的时间、速度等,本申请实施例对此不作任何限制。Of course, while the mobile phone collects the coordinates of each touch point in the above sliding operation, it can also record the touch time and other information of the corresponding touch point. The mobile phone can determine the time the user stays at different positions when the user inputs the sliding operation according to the touch time of the touch point. , Speed, etc. The embodiments of this application do not impose any restrictions on this.
S503、响应于上述滑动操作中用户手指的第一滑动过程,手机将第一界面中的第一操作控件显示为激活状态。S503. In response to the first sliding process of the user's finger in the aforementioned sliding operation, the mobile phone displays the first operation control in the first interface as an activated state.
在本申请实施例中,手机可根据检测到的滑动操作中触摸点(A0、A1、A2……)的坐标将本次滑动操作划分为不同的滑动过程。也就是说,用户向触摸屏输入的一次滑动操作可分阶段被划分为不同的滑动过程,在各个滑动过程中用户手指均未离开触摸屏,直至检测到用户手指离开触摸屏时说明本次滑动操作结束。手机可响应于不同的滑动过程实现用户对第一界面中操作控件的控制功能。In the embodiment of the present application, the mobile phone can divide the current sliding operation into different sliding processes according to the coordinates of the touch points (A0, A1, A2...) in the detected sliding operation. That is to say, a sliding operation input by the user to the touch screen can be divided into different sliding processes in stages. In each sliding process, the user's finger does not leave the touch screen until it is detected that the user's finger leaves the touch screen to indicate the end of the sliding operation. The mobile phone can respond to different sliding processes to implement the user's control function of the operation controls in the first interface.
示例性的,如图8所示,上述滑动操作的第一滑动过程是指:从用户手指接触第一界面(例如首页601)开始至用户手指在y轴正方向上滑动了预设距离D1这一过程。手机获取到滑动操作的起始位置A0(x0,y0)后,可以A0(x0,y0)为起点,根据后续采集到的触摸点的坐标实时计算用户手指在y轴正方向上的滑动距离。例如,当手机采集到触摸点A1(x1,y1)后,可计算起始位置A0与触摸点A1之间在y轴正方向上的滑动距离为y1-y0。当y1-y0≥D1时,手机可确定用户在首页601中完成了滑动操作的第一滑动过程,说明用户此时希望进入单手操作模式控制首页601中的操作控件。此时,用户手指仍与触摸屏接触未离开触摸屏,即用户在首页601中的滑动操作尚未结束。Exemplarily, as shown in FIG. 8, the first sliding process of the above-mentioned sliding operation refers to the time from the user's finger touching the first interface (such as the home page 601) to the user's finger sliding the preset distance D1 in the positive direction of the y-axis. process. After the mobile phone obtains the starting position A0 (x0, y0) of the sliding operation, it can use A0 (x0, y0) as the starting point, and calculate the sliding distance of the user's finger in the positive direction of the y-axis in real time according to the coordinates of the subsequently collected touch points. For example, when the mobile phone collects the touch point A1 (x1, y1), the sliding distance between the starting position A0 and the touch point A1 in the positive direction of the y-axis can be calculated as y1-y0. When y1-y0≥D1, the mobile phone can determine that the user has completed the first sliding process of the sliding operation on the home page 601, indicating that the user wants to enter the one-handed operation mode to control the operation controls on the home page 601 at this time. At this time, the user's finger is still in contact with the touch screen and has not left the touch screen, that is, the user's sliding operation on the home page 601 has not yet ended.
那么,响应于上述滑动操作的第一滑动过程,手机可将首页601顶部的第一操作控件显示为激活状态,从而提示用户已经进入单手操作模式,且当前被激活的控件为第一操作控件。示例性的,手机可以通过改变第一操作控件的形状、大小或颜色等方式将第一操作控件显示为激活状态。或者,手机还可以通过文字、振动或提示音等方式提示用户当前的第一操作控件为激活状态。Then, in response to the first sliding process of the above-mentioned sliding operation, the mobile phone can display the first operation control on the top of the home page 601 as an activated state, thereby prompting the user that the one-hand operation mode has been entered, and the currently activated control is the first operation control . Exemplarily, the mobile phone may display the first operation control in an activated state by changing the shape, size, or color of the first operation control. Alternatively, the mobile phone may also prompt the user that the current first operation control is in the activated state by means of text, vibration, or prompt sound.
仍如图8所示,检测到用户输入滑动操作的第一滑动过程后,手机可默认激活首页601顶部最左侧的控件,即返回按钮602,那么,手机可将返回按钮602的底色加深,使得返回按钮602被显示为激活状态。当然,手机也可默认激活首页601顶部最右侧的操作控件或首页601中的任一操作控件,本申请实施例对此不做任何限制。As shown in FIG. 8, after detecting the first sliding process of the user input sliding operation, the mobile phone can activate the leftmost control at the top of the home page 601 by default, that is, the back button 602, then the mobile phone can darken the background color of the back button 602 , So that the return button 602 is displayed as an active state. Of course, the mobile phone can also activate the operation control at the far right of the top of the home page 601 or any operation control in the home page 601 by default, and the embodiment of the present application does not impose any limitation on this.
示例性的,检测到用户输入滑动操作的第一滑动过程后,手机可调用应用程序框架层中的视图系统(view),查询视图系统在绘制首页601时记录的视图信息。该视图信息中记录了首页601中各个控件的位置、大小以及属性等信息。进而,手机根据首页601的视图信息可以确定出首页601内位于顶部最左侧的操作控件为返回按钮602,该返回按钮602为本次需要被激活的操作控件。进而,手机可继续调用视图系统重新绘制返回按钮602的底色,使得返回按钮602在首页601中被显示为激活状态。Exemplarily, after detecting the first sliding process of the user inputting the sliding operation, the mobile phone can call the view system (view) in the application framework layer to query the view information recorded by the view system when the homepage 601 is drawn. The view information records the position, size, and attribute information of each control on the home page 601. Furthermore, according to the view information of the home page 601, the mobile phone can determine that the operation control on the top leftmost side of the home page 601 is the return button 602, and the return button 602 is the operation control that needs to be activated this time. Furthermore, the mobile phone can continue to call the view system to redraw the background color of the back button 602, so that the back button 602 is displayed in the active state on the home page 601.
又或者,检测到用户输入滑动操作的第一滑动过程后,手机可调用截图应用对首页601执行截图操作,得到首页601的截图。进而,手机可通过OCR(optical character recognition,光学字符识别)算法或AI识别算法对本次截图中的操作控件进行识别,从而识别出首页601内的各个操作控件以及操作控件的位置。这样,手机可确定出位于首页601顶部最左侧的返回按钮602为需要激活的操作控件,从而将返回按钮602 显示为激活状态。Or, after detecting the first sliding process of the user inputting the sliding operation, the mobile phone can call the screenshot application to perform a screenshot operation on the home page 601 to obtain a screenshot of the home page 601. Furthermore, the mobile phone can recognize the operation controls in this screenshot through an OCR (optical character recognition) algorithm or an AI recognition algorithm, so as to recognize each operation control in the homepage 601 and the position of the operation control. In this way, the mobile phone can determine that the return button 602 at the leftmost top of the home page 601 is an operation control that needs to be activated, so that the return button 602 is displayed as an activated state.
当然,本领域技术人员还可以根据实际经验或实际应用场景设置其他能够识别出首页601内各个操作控件以及操作控件位置的方法,本申请实施例对此不做任何限制。Of course, those skilled in the art can also set other methods capable of identifying various operation controls and the positions of the operation controls in the home page 601 according to actual experience or actual application scenarios, and the embodiment of the present application does not impose any limitation on this.
例如,检测到用户输入滑动操作的第一滑动过程后,手机的操作系统可向正在运行的微信APP发送请求,该请求可用于查询位于首页601顶部最左侧的操作控件。微信APP可响应该请求确定出位于首页601顶部最左侧的操作控件为返回按钮602,进而,微信APP可将返回按钮602的标识返回给手机操作系统,使得手机操作系统可根据返回按钮602的标识调用视图系统将返回按钮602显示为激活状态。For example, after detecting the first sliding process of the user inputting the sliding operation, the operating system of the mobile phone may send a request to the running WeChat APP, and the request may be used to query the operation control located on the leftmost side of the top of the homepage 601. In response to the request, the WeChat APP can determine that the leftmost operation control at the top of the homepage 601 is the back button 602. Furthermore, the WeChat APP can return the identification of the back button 602 to the mobile phone operating system, so that the mobile phone operating system can follow the back button 602 The marking call view system displays the return button 602 as an active state.
在一些实施例中,当检测到用户输入滑动操作的第一滑动过程后,手机还可以根据第一滑动过程中触摸点的横坐标确定具体激活首页601中的哪个操作控件。In some embodiments, after detecting the first sliding process of the user inputting the sliding operation, the mobile phone may also determine which operation control on the home page 601 is specifically activated according to the abscissa of the touch point in the first sliding process.
例如,手机基于触摸点A0(x0,y0)和触摸点A1(x1,y1)可确定出用户完成了滑动操作的第一滑动过程,此时,第一滑动过程的起始位置为A0,结束位置为A1。那么,手机还可以确定第一滑动过程中起始位置A0的横坐标x0和结束位置A1的横坐标x1在首页601中的位置。以首页601在x轴上的长度为w个单位(例如,单位为像素)举例,如果横坐标x0和x1均位于0至w/2的区间内,说明用户在首页601的左半部分输入了第一滑动过程,则手机可将位于首页601顶部最左侧的操作控件(即返回按钮602)显示为激活状态。相应的,如果横坐标x0和x1均位于w/2至w的区间内,说明用户在首页601的右半部分输入了第一滑动过程,则手机可将位于首页601顶部最右侧的操作控件(即添加按钮605)显示为激活状态。For example, the mobile phone can determine that the user has completed the first sliding process of the sliding operation based on touch point A0 (x0, y0) and touch point A1 (x1, y1). At this time, the start position of the first sliding process is A0, and the end The location is A1. Then, the mobile phone can also determine the position of the abscissa x0 of the start position A0 and the abscissa x1 of the end position A1 in the home page 601 in the first sliding process. Taking the length of the homepage 601 on the x-axis as w units (for example, the unit is pixels) for example, if the abscissas x0 and x1 are both in the interval from 0 to w/2, it means that the user has typed in the left half of the homepage 601 In the first sliding process, the mobile phone can display the operation control (that is, the return button 602) at the leftmost top of the home page 601 as an active state. Correspondingly, if the abscissas x0 and x1 are both in the interval from w/2 to w, it means that the user has entered the first sliding process on the right half of the homepage 601, and the mobile phone can set the operation control located at the rightmost of the top of the homepage 601 (That is, the add button 605) is displayed as an active state.
在另一些实施例中,手机也可以根据第一滑动过程中起始位置A0的横坐标x0或结束位置A1的横坐标x1,确定具体激活首页601中的哪个操作控件。In other embodiments, the mobile phone may also determine which operation control on the home page 601 is specifically activated according to the abscissa x0 of the start position A0 or the abscissa x1 of the end position A1 in the first sliding process.
例如,当起始位置A0的横坐标x0(或结束位置A1的横坐标x1)位于0至w/2的区间内(即首页601的左半部分),则手机可将位于首页601顶部最左侧的返回按钮602显示为激活状态。当起始位置A0的横坐标x0(或结束位置A1的横坐标x1)位于w/2至w的区间内(即首页601的右半部分),则手机可将位于首页601顶部最右侧的添加按钮605显示为激活状态。For example, when the abscissa x0 of the start position A0 (or the abscissa x1 of the end position A1) is in the interval from 0 to w/2 (that is, the left half of the home page 601), the mobile phone can be located at the top left of the home page 601 The return button 602 on the side is displayed in an active state. When the abscissa x0 of the start position A0 (or the abscissa x1 of the end position A1) is within the interval from w/2 to w (that is, the right half of the homepage 601), the phone can set the rightmost position at the top of the homepage 601 The add button 605 is displayed in an activated state.
在另一些实施例中,手机还可以根据用户在输入第一滑动过程时的握持姿态,确定具体激活首页601中的哪个操作控件。In other embodiments, the mobile phone may also determine which operation control on the homepage 601 is specifically activated according to the user's holding posture when inputting the first sliding process.
例如,手机可以通过加速度传感器、触摸屏上的触摸传感器等器件检测用户的握持姿态为左手握持姿态或右手握持姿态。那么,手机检测到用户输入了滑动操作的第一滑动过程后,如果用户为左手握持姿态,为方便用户单手操作首页601顶部最右侧的操作控件,则手机可将位于首页601顶部最右侧的添加按钮605显示为激活状态。相应的,如果用户为右手握持姿态,为方便用户单手操作首页601顶部最左侧的操作控件,则手机可将位于首页601顶部最左侧的返回按钮602显示为激活状态。当然,也可以设置在左手握持姿态下激活首页601顶部最左侧的返回按钮602,在右手握持姿态下激活首页601顶部最右侧的添加按钮605,本申请实施例对此不做任何限制。For example, the mobile phone can detect whether the user's holding posture is a left-hand holding posture or a right-hand holding posture through an acceleration sensor, a touch sensor on a touch screen, and other devices. Then, after the mobile phone detects that the user has entered the first sliding process of the sliding operation, if the user is holding the left-hand posture, in order to facilitate the user to operate the operation controls on the rightmost top of the homepage 601 with one hand, the mobile phone can be located at the top of the homepage 601. The add button 605 on the right is displayed in an active state. Correspondingly, if the user is holding the right hand, in order to facilitate the user to operate the leftmost operation control on the top of the home page 601 with one hand, the mobile phone may display the return button 602 on the leftmost top of the home page 601 as an activated state. Of course, it can also be set to activate the left-most return button 602 at the top of the homepage 601 in the left-hand holding posture, and activate the add button 605 at the right-most top of the homepage 601 in the right-hand holding posture. The embodiment of this application does not do anything about this. limit.
也就是说,手机在第一界面中首次激活第一操作控件时,可按照不同的策略选择不同的第一操作控件激活。这样一来,用户可以将不同的第一操作控件作为入口进入单手操作模式,以便用户选择路径最短的方式在第一界面中选择最终需要点击的操作 控件。That is, when the mobile phone activates the first operation control in the first interface for the first time, different first operation controls can be selected for activation according to different strategies. In this way, the user can enter the one-handed operation mode with different first operation controls as the entrance, so that the user can select the operation control that needs to be clicked in the first interface in the shortest way.
另外,如图9所示,用户在首页601中输入第一滑动过程时,如果手机检测到用户手指在y轴正方向上的滑动距离还未达到预设值D1,则手机可通过文字、动画等方式提示用户继续下拉滑动以激活顶部的操作控件,从而指导用户快速完成滑动操作的第一滑动过程触发手机进入单手操作模式。当然,在用户输入滑动操作的第一滑动过程中,手机也可以根据用户手指在y轴正方向上滑动距离的增大,对第一操作控件(例如返回按钮602)的显示效果进行渐变或透明化处理,直至用户完成滑动操作的第一滑动过程后,手机最终将返回按钮602显示为激活状态。In addition, as shown in Figure 9, when the user enters the first sliding process on the homepage 601, if the mobile phone detects that the sliding distance of the user's finger in the positive direction of the y-axis has not reached the preset value D1, the mobile phone can use text, animation, etc. The method prompts the user to continue the pull-down sliding to activate the operation control at the top, thereby instructing the user to quickly complete the first sliding process of the sliding operation to trigger the mobile phone to enter the one-handed operation mode. Of course, in the first sliding process of the user inputting the sliding operation, the mobile phone can also gradient or transparentize the display effect of the first operation control (such as the return button 602) according to the increase in the sliding distance of the user's finger in the positive direction of the y-axis. After processing, until the user completes the first sliding process of the sliding operation, the mobile phone finally displays the return button 602 as an activated state.
或者,如果手机检测到用户手指在y轴正方向上的滑动距离在还未达到预设值D1时便离开了触摸屏,说明此时用户输入下拉操作的目的不是希望手机进入单手操作模式激活显示界面中的操作控件,则手机可按照现有的下拉操作的响应流程对首页601执行对应的操作指令,例如刷新指令、向下翻页的指令等。Or, if the mobile phone detects that the sliding distance of the user's finger in the positive direction of the y-axis has not reached the preset value D1 and left the touch screen, it means that the purpose of the user inputting the pull-down operation at this time is not to want the mobile phone to enter the one-handed operation mode to activate the display interface The mobile phone can execute corresponding operation instructions on the home page 601 according to the existing pull-down operation response process, such as refresh instructions, page-down instructions, and so on.
在一些实施例中,手机触摸屏在显示一些界面时可支持用户在界面上输入的上拉操作或下拉操作,以滑动显示出界面中不同位置的显示内容。如图10中的(a)所示,手机正在显示微信APP中首页601的第一内容,第一内容位于首页601的底部。此时,如果手机检测到用户手指在首页601的y轴正方向上从触摸点A0滑动至触摸点A1(即滑动操作的第一滑动过程),则手机可以查询当前显示的第一内容是否位于首页601的顶部。如果第一内容不在首页601的顶部,则用户输入第一滑动过程的意图有可能是希望执行下拉操作显示首页601顶部的内容。那么,如图10中(b)所示,响应于第一滑动过程,手机可滑动首页601显示首页601顶部的第二内容。相应的,如果当前显示的第一内容位于首页601的顶部,则手机可按照上述方法进入单手操作模式激活首页601中的操作控件。也就是说,手机检测到用户输入的滑动操作的第一滑动过程后,可根据当前显示界面中的显示内容判断是否需要激活首页601中的操作控件。In some embodiments, the touch screen of the mobile phone may support a pull-up operation or a pull-down operation input by the user on the interface when displaying some interfaces, so as to display contents in different positions in the interface by sliding. As shown in (a) of FIG. 10, the mobile phone is displaying the first content of the homepage 601 in the WeChat APP, and the first content is located at the bottom of the homepage 601. At this point, if the mobile phone detects that the user's finger slides from touch point A0 to touch point A1 in the positive direction of the y-axis of the homepage 601 (that is, the first sliding process of the sliding operation), the mobile phone can query whether the currently displayed first content is on the homepage The top of the 601. If the first content is not at the top of the home page 601, the user's intention to enter the first sliding process may be to perform a pull-down operation to display the content at the top of the home page 601. Then, as shown in FIG. 10(b), in response to the first sliding process, the mobile phone can slide the home page 601 to display the second content at the top of the home page 601. Correspondingly, if the currently displayed first content is at the top of the home page 601, the mobile phone can enter the one-handed operation mode according to the above method to activate the operation controls in the home page 601. That is to say, after the mobile phone detects the first sliding process of the sliding operation input by the user, it can determine whether it is necessary to activate the operation controls in the home page 601 according to the display content in the current display interface.
在一些实施例中,仍如图10中(b)所示,手机滑动首页601显示出首页601顶部的第二内容后,手机可自动将位于首页601顶部的第一操作控件(例如返回按钮602)显示为激活状态。这样,用户输入向下滑动的滑动操作既可以触发手机向上滑动当前显示界面中的显示内容,还可以触发手机进入单手操作模式激活显示界面中的操作控件。In some embodiments, as shown in FIG. 10(b), after the mobile phone slides the home page 601 to display the second content at the top of the home page 601, the mobile phone can automatically switch the first operation control located at the top of the home page 601 (for example, the back button 602). ) Is displayed as active. In this way, the sliding operation input by the user to slide down can trigger the mobile phone to slide up the display content in the current display interface, and can also trigger the mobile phone to enter the one-handed operation mode to activate the operation controls in the display interface.
或者,在一些实施例中,手机还可以根据用户在输入上述滑动操作的第一滑动过程中的滑动速度或触摸面积等参数,判断是否需要激活首页601中的操作控件。Alternatively, in some embodiments, the mobile phone may also determine whether it is necessary to activate the operation controls on the homepage 601 according to parameters such as the sliding speed or touch area of the user in the first sliding process of inputting the above-mentioned sliding operation.
例如,当检测到用户在上述第一滑动过程中的滑动速度大于速度阈值时,手机可激活位于首页601顶部的第一操作控件;如果用户在上述第一滑动过程中的滑动速度小于速度阈值,则手机可按现有流程向微信APP上报对应的滑动事件,触发微信APP执行与该滑动事件对应的翻页指令。又例如,当检测到用户在上述第一滑动过程中的用户手指的触摸面积大于面积阈值时,手机可激活位于首页601顶部的第一操作控件;如果在上述第一滑动过程中用户手指的触摸面积小于面积阈值,则手机可按现有流程向微信APP上报对应的滑动事件,触发微信APP执行与该滑动事件对应的翻页指令。For example, when it is detected that the user’s sliding speed during the aforementioned first sliding process is greater than the speed threshold, the mobile phone can activate the first operation control located at the top of the homepage 601; if the user’s sliding speed during the aforementioned first sliding process is less than the speed threshold, Then the mobile phone can report the corresponding sliding event to the WeChat APP according to the existing process, and trigger the WeChat APP to execute the page turning instruction corresponding to the sliding event. For another example, when it is detected that the touch area of the user’s finger during the first sliding process is greater than the area threshold, the mobile phone can activate the first operation control located at the top of the homepage 601; if the user’s finger touches during the first sliding process, If the area is less than the area threshold, the mobile phone can report the corresponding sliding event to the WeChat APP according to the existing process, and trigger the WeChat APP to execute the page turning instruction corresponding to the sliding event.
S504、响应于上述滑动操作中用户手指的第二滑动过程,手机将第一界面中的第二操作控件显示为激活状态。S504. In response to the second sliding process of the user's finger in the above-mentioned sliding operation, the mobile phone displays the second operation control in the first interface as an activated state.
以手机在步骤S503中将返回按钮602显示为激活状态举例,用户在首页601中完成滑动操作的第一滑动过程后,手机响应该第一滑动过程将返回按钮602显示为激活状态,此时用户输入的滑动操作尚未结束,用户手指尚未离开首页601。如果当前被激活的返回按钮602不是用户需要点击的操作控件,则用户可继续滑动手指输入滑动操作的第二滑动过程,以触发手机在首页601中切换被激活的操作控件。Taking the mobile phone displaying the return button 602 as an activated state in step S503 as an example, after the user completes the first sliding process of the sliding operation on the home page 601, the mobile phone displays the return button 602 as the active state in response to the first sliding process. The input sliding operation has not yet ended, and the user's finger has not left the home page 601. If the currently activated back button 602 is not the operation control that the user needs to click, the user can continue to slide the finger to input the second sliding process of the sliding operation to trigger the mobile phone to switch the activated operation control on the home page 601.
示例性的,如图11所示,手机可将上述第一滑动过程的结束位置A1作为第二滑动过程的起始位置,并实时检测用户手指在x轴或y轴上的滑动距离。如果用户手指在x轴或y轴上的滑动距离大于或等于预设值D2(D1与D2可以相同或不同),则说明用户完成了上述滑动操作中的第二滑动过程。此时,用户手指仍与触摸屏接触未离开触摸屏,即用户在首页601中的滑动操作尚未结束。Exemplarily, as shown in FIG. 11, the mobile phone may use the end position A1 of the above-mentioned first sliding process as the starting position of the second sliding process, and detect the sliding distance of the user's finger on the x-axis or y-axis in real time. If the sliding distance of the user's finger on the x-axis or y-axis is greater than or equal to the preset value D2 (D1 and D2 may be the same or different), it means that the user has completed the second sliding process in the above-mentioned sliding operation. At this time, the user's finger is still in contact with the touch screen and has not left the touch screen, that is, the user's sliding operation on the home page 601 has not yet ended.
示例性的,手机可以按照第二滑动过程中用户手指的滑动方向,将首页601中被激活的第一操作控件切换为第二操作控件。Exemplarily, the mobile phone may switch the activated first operation control on the home page 601 to the second operation control according to the sliding direction of the user's finger in the second sliding process.
例如,当上述第一滑动过程结束后,如果用户手指继续沿x轴方向输入滑动操作的第二滑动过程,则手机可沿x轴方向将首页601中被激活的第一操作控件切换为第二操作控件。For example, after the above-mentioned first sliding process ends, if the user's finger continues to input the second sliding process of the sliding operation along the x-axis direction, the mobile phone can switch the activated first operation control on the homepage 601 to the second along the x-axis direction. Operation controls.
仍如图11所示,手机可以上述第一滑动过程的结束位置A1(x1,y1)为起始位置开始检测用户是否输入第二滑动过程。当检测到起始位置A1(x1,y1)与触摸点A2(x2,y2)之间在x轴上的滑动距离x2-x1≥D2时,说明用户手指继续向x轴正方向移动了一段距离,完成了滑动操作中的第二滑动过程。此时,手机可响应第二滑动过程,将返回按钮602恢复为去激活状态,同时,手机可将返回按钮602沿x轴正方向相邻的搜索按钮604显示为激活状态。也就是说,手机可响应用户的第二滑动过程将被激活的操作控件从返回按钮602(即第一操作控件)切换为搜索按钮604(即第二操作控件)。As still shown in FIG. 11, the mobile phone can start to detect whether the user enters the second sliding process at the end position A1 (x1, y1) of the above-mentioned first sliding process as the starting position. When the sliding distance x2-x1≥D2 between the starting position A1 (x1, y1) and the touch point A2 (x2, y2) on the x-axis is detected, it means that the user's finger continues to move a certain distance in the positive direction of the x-axis , The second sliding process in the sliding operation is completed. At this time, the mobile phone can respond to the second sliding process to restore the return button 602 to the deactivated state, and at the same time, the mobile phone can display the search button 604 adjacent to the return button 602 in the positive x-axis direction as an active state. That is, the mobile phone can switch the activated operation control from the return button 602 (ie, the first operation control) to the search button 604 (ie, the second operation control) in response to the user's second sliding process.
示例性的,检测到用户完成本次滑动操作的第二滑动过程后,手机可根据第二滑动过程中的滑动方向(即x轴正方向),调用视图系统查询在x轴正方向上距离返回按钮602最近的操作控件为搜索按钮604。进而,手机可调用视图系在首页601中将搜索按钮604显示为激活状态,同时将已激活的返回按钮602恢复为去激活状态。Exemplarily, after detecting that the user has completed the second sliding process of this sliding operation, the mobile phone can call the view system to query the distance return button in the positive x-axis direction according to the sliding direction in the second sliding process (that is, the positive x-axis direction) The most recent operation control of 602 is the search button 604. Furthermore, the mobile phone callable view system displays the search button 604 on the home page 601 as an activated state, and at the same time restores the activated back button 602 to a deactivated state.
或者,当手机以上述第一滑动过程的结束位置A1(x1,y1)为起始位置,检测到用户手指沿x轴负方向完成本次滑动操作的第二滑动过程时,由于在x轴负方向上没有与返回按钮602相邻的操作控件,则手机可通过文字、振动等方式提示用户没有可操作的控件。或者,手机可将已激活的返回按钮602显示为去激活状态,退出单手操作模式。Or, when the mobile phone uses the end position A1 (x1, y1) of the above first sliding process as the starting position, and detects that the user's finger completes the second sliding process of this sliding operation in the negative direction of the x-axis, because the negative x-axis is If there is no operation control adjacent to the return button 602 in the direction, the mobile phone can prompt the user that there is no control that can be operated by means of text, vibration, or the like. Alternatively, the mobile phone may display the activated return button 602 as a deactivated state and exit the one-handed operation mode.
也就是说,手机通过判断第二滑动过程中起始位置A1的横坐标x1与结束位置A2的横坐标x2之间的位置关系,可在x轴方向上横向为用户切换被激活的操作控件,方便用户快速激活第一界面中需要点击的操作控件。In other words, the mobile phone determines the positional relationship between the abscissa x1 of the start position A1 and the abscissa x2 of the end position A2 in the second sliding process, and can switch the activated operation controls horizontally for the user in the x-axis direction. It is convenient for the user to quickly activate the operation controls that need to be clicked in the first interface.
类似的,当上述第一滑动过程结束后,如果用户手指继续沿y轴方向输入滑动操作的第二滑动过程,则手机可沿y轴方向将首页601中被激活的第一操作控件切换为第二操作控件。Similarly, after the above-mentioned first sliding process ends, if the user's finger continues to input the second sliding process of the sliding operation along the y-axis direction, the mobile phone can switch the activated first operation control on the homepage 601 to the first operation control along the y-axis direction. 2. Operation controls.
例如,手机激活首页601中的返回按钮602后,手机可以上述第一滑动过程的结 束位置A1(x1,y1)为起始位置,开始检测用户在y轴方向是否输入第二滑动过程。如图12所示,当检测到起始位置A1(x1,y1)与触摸点A3(x3,y3)之间在y轴上的滑动距离y3-y1≥D2时,说明用户手指继续向y轴正方向移动了一段距离,完成了本次滑动操作中的第二滑动过程。For example, after the mobile phone activates the return button 602 in the homepage 601, the mobile phone can start the first sliding process at the end position A1 (x1, y1) of the first sliding process, and start to detect whether the user enters the second sliding process in the y-axis direction. As shown in Figure 12, when the sliding distance y3-y1≥D2 between the starting position A1 (x1, y1) and the touch point A3 (x3, y3) on the y-axis is detected, it indicates that the user's finger continues to the y-axis Moved a certain distance in the positive direction, completing the second sliding process in this sliding operation.
响应该第二滑动过程,仍如图12所示,手机可将首页601中在y轴正方向上与返回按钮602距离最近的选项606作为需要被激活的操作控件,进而将选项606显示为激活状态,同时将已激活的返回按钮602恢复为去激活状态。In response to the second sliding process, as shown in FIG. 12, the mobile phone can use the option 606 on the homepage 601 that is closest to the return button 602 in the positive direction of the y-axis as the operation control to be activated, and then display the option 606 as the activated state. At the same time, the activated return button 602 is restored to the deactivated state.
示例性的,如果用户在y轴方向输入了滑动操作的第二滑动过程,则手机可根据已激活的返回按钮602在首页601中的位置确定此时需要被激活的操作控件。例如,如果返回按钮602位于首页601的左侧,则手机可优先将首页601左侧位于返回按钮602下方的操作控件确定为需要被激活的操作控件;如果返回按钮602位于首页601的右侧,则手机可优先将首页601右侧位于返回按钮602下方的操作控件确定为需要被激活的操作控件。Exemplarily, if the user inputs the second sliding process of the sliding operation in the y-axis direction, the mobile phone can determine the operation control that needs to be activated at this time according to the position of the activated return button 602 on the home page 601. For example, if the return button 602 is located on the left side of the home page 601, the mobile phone can prioritize the operation controls on the left side of the home page 601 below the return button 602 as the operation controls that need to be activated; if the return button 602 is located on the right side of the home page 601, Then, the mobile phone can firstly determine the operation control on the right side of the homepage 601 below the return button 602 as the operation control that needs to be activated.
也就是说,手机通过判断第二滑动过程中起始位置A1的纵坐标y1与结束位置A3的纵坐标y3之间的位置关系,可在y轴方向上纵向为用户切换被激活的操作控件,方便用户快速激活第一界面中需要点击的操作控件。That is to say, by determining the positional relationship between the ordinate y1 of the start position A1 and the ordinate y3 of the end position A3 in the second sliding process, the mobile phone can switch the activated operation controls for the user in the longitudinal direction along the y axis. It is convenient for the user to quickly activate the operation controls that need to be clicked in the first interface.
可以理解的是,在进入单手操作模式后,用户可按照步骤S504所述的方法在一次滑动操作中连续输入多次滑动过程切换第一界面中被激活的操作控件,直至被激活的操作控件为用户本次希望点击的操作控件为止。It is understandable that after entering the single-handed operation mode, the user can switch the activated operation control in the first interface by continuously inputting multiple sliding processes in one sliding operation according to the method described in step S504, until the activated operation control is activated. Up to the operation control that the user wants to click this time.
需要说明的是,手机响应用户输入的第二滑动过程将被激活的操作控件从第一操作控件(例如返回按钮602)切换为第二操作控件(例如选项606)后,用户还可以通过输入与第二滑动过程方向相反的滑动过程,触发手机将被激活的操作控件从选项606回退为返回按钮602。例如,如图13中的(a)所示,手机响应于用户输入的第二滑动过程将选项606显示为激活状态后,可将第二滑动过程的结束位置A3作为起始位置继续检测用户输入的滑动过程。如果检测到用户手指从起始位置A3开始沿y轴的负方向移动了预设距离D2,则如图13中的(b)所示,手机可重新将返回按钮602显示为激活状态,同时将已激活的选项606显示为去激活状态。It should be noted that after the mobile phone switches the activated operation control from the first operation control (for example, the back button 602) to the second operation control (for example, option 606) in response to the second sliding process of the user input, the user can also input and The second sliding process with the opposite direction of the sliding process triggers the mobile phone to return the activated operation control from the option 606 to the return button 602. For example, as shown in Figure 13 (a), after the mobile phone displays option 606 as active in response to the second sliding process input by the user, the end position A3 of the second sliding process can be used as the starting position to continue detecting user input The sliding process. If it is detected that the user's finger has moved the preset distance D2 along the negative direction of the y-axis from the starting position A3, as shown in (b) in Figure 13, the mobile phone can display the return button 602 as active again, and at the same time The activated option 606 is displayed in a deactivated state.
另外,如图14中的(a)所示,手机响应于用户本次滑动操作的第一滑动过程或第二滑动过程,将首页601顶部的返回按钮602显示为激活状态。此时,用户手指尚未离开首页601,如果手机检测到用户手指继续沿y轴负方向滑动,由于首页601中在返回按钮602的y轴负方向上已经没有其他操作控件,说明用户此时的操作意图可能是需要退出单手操作模式,则手机可将已激活的返回按钮602显示为去激活状态,此时首页601中没有被激活的操作控件,即手机退出了单手操作模式。In addition, as shown in (a) of FIG. 14, the mobile phone displays the return button 602 at the top of the home page 601 as an active state in response to the first sliding process or the second sliding process of the user's current sliding operation. At this time, the user's finger has not left the homepage 601. If the mobile phone detects that the user's finger continues to slide in the negative direction of the y-axis, since there are no other operation controls in the negative direction of the y-axis of the return button 602 in the homepage 601, it indicates the user's operation at this time The intention may be to exit the one-handed operation mode, and the mobile phone can display the activated return button 602 as a deactivated state. At this time, there are no activated operation controls on the home page 601, that is, the mobile phone exits the one-handed operation mode.
相应的,如图14中的(b)所示,手机响应于用户本次滑动操作的第一滑动过程或第二滑动过程,将首页601顶部的添加按钮605显示为激活状态。此时,用户手指尚未离开首页601,如果手机检测到用户手指继续沿x轴正方向滑动,由于首页601中在添加按钮605的x轴负方向上已经没有其他操作控件,因此,手机可将已激活的添加按钮605显示为去激活状态,从而退出单手操作模式。或者,手机将首页601顶部的添加按钮605显示为激活状态后,如果手机检测到用户手指继续沿x轴正方向滑 动,手机也可以将y轴方向距离添加按钮605最近的操作控件(例如选项606)显示为激活状态。Correspondingly, as shown in (b) of FIG. 14, the mobile phone displays the add button 605 at the top of the home page 601 as an active state in response to the first sliding process or the second sliding process of the user's current sliding operation. At this point, the user’s finger has not left the home page 601. If the mobile phone detects that the user’s finger continues to slide in the positive direction of the x-axis, since there are no other operation controls in the negative x-axis direction of the add button 605 in the home page 601, the mobile phone can change the The activated add button 605 is displayed in a deactivated state, thereby exiting the one-handed operation mode. Or, after the mobile phone displays the add button 605 at the top of the homepage 601 as active, if the mobile phone detects that the user's finger continues to slide along the positive x-axis, the mobile phone can also move the y-axis direction to the operation control closest to the add button 605 (for example, option 606). ) Is displayed as active.
示例性的,在手机响应用户输入的滑动操作执行上述步骤S503-S504的过程中,如果手机在首页601中激活的操作控件为用户本次希望点击的操作控件(例如返回按钮602),则如图15所示,用户可将手指离开首页601,即结束本次滑动操作。此时,手机可响应用户手指离开的操作,执行点击返回按钮602的操作。例如,手机可向正在运行的微信APP发送触摸事件,该触摸事件中携带的触摸点的坐标可以为返回按钮602上的任意坐标点,该触摸事件的类型可以为单击事件。那么,微信APP响应于该触摸事件可实现单击返回按钮602的功能,此时,手机可显示出单击返回按钮602后首页601的上一级菜单。如图15所示,微信APP中首页601的上一级菜单可以为桌面701。Exemplarily, when the mobile phone executes the above steps S503-S504 in response to the sliding operation input by the user, if the operation control activated by the mobile phone on the home page 601 is the operation control that the user wants to click this time (for example, the return button 602), such as As shown in FIG. 15, the user can remove the finger from the home page 601 to end this sliding operation. At this time, the mobile phone can respond to the operation of the user's finger leaving, and perform the operation of clicking the return button 602. For example, the mobile phone may send a touch event to the running WeChat APP, the coordinates of the touch point carried in the touch event may be any coordinate point on the return button 602, and the type of the touch event may be a click event. Then, the WeChat APP can realize the function of clicking the back button 602 in response to the touch event. At this time, the mobile phone can display the upper-level menu of the home page 601 after clicking the back button 602. As shown in FIG. 15, the upper-level menu of the home page 601 in the WeChat APP may be the desktop 701.
这样一来,用户通过输入一次滑动操作,可激活显示界面中需要控制的操作控件,并对被激活的操作控件执行对应的点击操作,从而在保证显示内容和显示效果的同时提高了用户单手操作时的使用体验。In this way, the user can activate the operation controls that need to be controlled in the display interface by entering a sliding operation, and perform corresponding click operations on the activated operation controls, thereby improving the user's one-handed operation while ensuring the display content and display effect. User experience during operation.
S505、响应于上述滑动操作中用户手指的停留操作,手机在第一界面中显示第二操作控件被点击后的二级菜单。S505: In response to the operation of the user's finger in the above sliding operation, the mobile phone displays a secondary menu after the second operation control is clicked on the first interface.
在一些实施例中,被激活的操作控件可以是含有二级菜单的操作控件。也就是说,当用户点击这类操作控件时,手机可响应用户的点击操作在当前的显示界面中显示该操作控件触发的二级菜单。In some embodiments, the activated operation control may be an operation control containing a secondary menu. In other words, when the user clicks on this type of operation control, the mobile phone can display the secondary menu triggered by the operation control in the current display interface in response to the user's click operation.
以手机在首页601中激活的第二操作控件为添加按钮605举例,如图16中的(a)所示,手机响应上述滑动操作的第二滑动过程可将添加按钮605显示为激活状态,此时用户手指尚未离开首页601,即用户本次输入的滑动操作尚未结束。由于添加按钮605为含有二级菜单的操作控件,添加按钮605被激活后,手机可继续检测用户手指在第二滑动过程的结束位置(例如触摸点A4)的停留时间。Taking the second operation control activated by the mobile phone on the home page 601 as an example of the add button 605, as shown in Figure 16 (a), the mobile phone can display the add button 605 as an activated state in response to the second sliding process of the above-mentioned sliding operation. At this time, the user's finger has not left the home page 601, that is, the sliding operation input by the user this time has not ended. Since the add button 605 is an operation control containing a secondary menu, after the add button 605 is activated, the mobile phone can continue to detect the dwell time of the user's finger at the end position of the second sliding process (for example, touch point A4).
如果用户手指在触摸点A4的停留时间超过预设的停留时间(例如1s),说明用户在本次滑动操作中输入了预设的停留操作,用户很可能需要点击当前被激活的操作控件,即添加按钮605。此时,如图16中的(b)所示,手机可响应用户手指的停留操作,执行点击添加按钮605的操作,从而在首页601中显示添加按钮605被点击后的二级菜单1601。例如,检测到用户手指在触摸点A4的停留时间超过1s后,手机可向微信APP上报添加按钮605的点击事件,使得微信APP可响应该点击事件在首页601中显示出二级菜单1601。此时用户手指尚未离开触摸屏,即用户本次输入的滑动操作尚未结束。If the user's finger stays at the touch point A4 for longer than the preset stay time (for example, 1s), it means that the user has entered a preset stay operation during this sliding operation, and the user probably needs to click the currently activated operation control, namely Add button 605. At this time, as shown in (b) of FIG. 16, the mobile phone can perform the operation of clicking the add button 605 in response to the staying operation of the user's finger, thereby displaying the secondary menu 1601 after the add button 605 has been clicked on the home page 601. For example, after detecting that the user's finger stays at the touch point A4 for more than 1 second, the mobile phone can report the click event of the add button 605 to the WeChat APP, so that the WeChat APP can display the secondary menu 1601 on the home page 601 in response to the click event. At this time, the user's finger has not left the touch screen, that is, the sliding operation input by the user this time has not ended.
另外,除了可以根据用户手指的停留时间触发手机打开添加按钮605的二级菜单1601之外,手机还可以设置其他方式打开添加按钮605的二级菜单1601。例如,手机可检测用户手指在第二滑动过程的结束位置(例如触摸点A4)的按压力度。当用户手指在触摸点A4的按压力度大于压力阈值时,手机可执行点击添加按钮605的操作,在首页601中显示添加按钮605被点击后的二级菜单1601。In addition, in addition to triggering the mobile phone to open the secondary menu 1601 of the add button 605 according to the dwell time of the user's finger, the mobile phone can also set other methods to open the secondary menu 1601 of the add button 605. For example, the mobile phone can detect the pressing force of the user's finger at the end position of the second sliding process (for example, touch point A4). When the pressing force of the user's finger at the touch point A4 is greater than the pressure threshold, the mobile phone can perform the operation of clicking the add button 605, and the secondary menu 1601 after the add button 605 has been clicked is displayed on the home page 601.
又例如,当上述第二滑动过程结束后,手机可继续检测用户手指在触摸屏上的滑动操作。如果检测到用户手指的滑动操作,则手机可查询当前被激活的添加按钮605 是否包含二级菜单。如果包含二级菜单,则手机可执行点击添加按钮605的操作,在首页601中显示添加按钮605被点击后的二级菜单1601。相应的,如果当前被激活的添加按钮605不包含二级菜单,则手机可按照用户的滑动方向将被激活的操作控件切换为添加按钮605周边的操作控件。For another example, after the above-mentioned second sliding process ends, the mobile phone can continue to detect the sliding operation of the user's finger on the touch screen. If the sliding operation of the user's finger is detected, the mobile phone can query whether the currently activated add button 605 contains a secondary menu. If the secondary menu is included, the mobile phone can perform the operation of clicking the add button 605, and the secondary menu 1601 after the add button 605 is clicked is displayed on the home page 601. Correspondingly, if the currently activated add button 605 does not include a secondary menu, the mobile phone can switch the activated operation control to the operation control around the add button 605 according to the sliding direction of the user.
在一些实施例中,对于不包含二级菜单的操作控件,例如上述返回按钮601,手机将这类操作控件显示为激活状态后,也可继续检测用户手指在首页601中的停留时间。如果用户手指的停留时间超过预设的停留时间,也可触发手机执行点击该操作控件的操作。也就是说,手机可以响应用户手指离开触摸屏的操作对被激活的操作控件执行点击操作,也可以响应用户手指的停留操作对被激活的操作控件执行点击操作,本申请实施例对此不做任何限制。In some embodiments, for operation controls that do not include a secondary menu, such as the aforementioned return button 601, after the mobile phone displays this type of operation control in an activated state, it can also continue to detect the dwell time of the user's finger on the home page 601. If the dwell time of the user's finger exceeds the preset dwell time, the mobile phone can also be triggered to perform the operation of tapping the operation control. In other words, the mobile phone can perform a click operation on the activated operation control in response to the operation of the user's finger leaving the touch screen, and can also perform a click operation on the activated operation control in response to the stay operation of the user's finger. This embodiment of the application does not do anything about this limit.
S506、响应于上述滑动操作中用户手指的第三滑动过程,手机将上述二级菜单中的第三操作控件显示为激活状态。S506: In response to the third sliding process of the user's finger in the aforementioned sliding operation, the mobile phone displays the third operation control in the aforementioned secondary menu as an activated state.
仍以上述添加按钮605的二级菜单1601举例,如图17所示,用户手指停留在触摸点A4后触发手机在首页601中显示出二级菜单1601。该二级菜单1601中的各个操作控件(例如图17中的扫一扫按钮、收付款按钮以及添加按钮)可以沿y轴横向布局,也可以沿x轴纵向布局(图17中未示出)。手机可以触摸点A4为起始位置继续检测用户手指在x轴或y轴上的滑动距离。与上述第二滑动过程类似的,如果用户手指在x轴或y轴上的滑动距离大于或等于预设值D3(D1、D2以及D3可以相同或不同),则说明用户完成了本次滑动操作中的第三滑动过程。Still taking the above-mentioned secondary menu 1601 of the add button 605 as an example, as shown in FIG. 17, after the user's finger stays at the touch point A4, the mobile phone is triggered to display the secondary menu 1601 on the home page 601. The various operation controls in the secondary menu 1601 (such as the scan button, the payment button, and the add button in Figure 17) can be laid out horizontally along the y-axis, or longitudinally along the x-axis (not shown in Figure 17) . The mobile phone can touch point A4 as the starting position to continue to detect the sliding distance of the user's finger on the x-axis or y-axis. Similar to the second sliding process described above, if the sliding distance of the user's finger on the x-axis or y-axis is greater than or equal to the preset value D3 (D1, D2, and D3 can be the same or different), it means that the user has completed this sliding operation The third sliding process in.
仍如图17所示,当手机检测到用户手指从起始位置A4(x4,y4)移动至触摸点A5(x5,y5)时,可计算出用户手指在y轴上的滑动距离y5-y4≥D3,说明手机显示二级菜单1601后用户手指继续向y轴正方向移动了一段距离,完成了本次滑动操作中的第三滑动过程。此时,手机可响应该第三滑动过程,进入首页601中二级菜单1601的单手操作模式,将二级菜单1601中沿y轴正方向上与添加按钮605距离最近的操作控件(例如扫一扫按钮1701)显示为激活状态。As shown in Figure 17, when the mobile phone detects that the user's finger moves from the starting position A4 (x4, y4) to the touch point A5 (x5, y5), the sliding distance y5-y4 of the user's finger on the y axis can be calculated ≥D3, it means that after the mobile phone displays the second-level menu 1601, the user's finger continues to move a certain distance in the positive direction of the y-axis, completing the third sliding process in this sliding operation. At this time, the mobile phone can respond to the third sliding process to enter the one-handed operation mode of the secondary menu 1601 on the homepage 601, and move the operation control (for example, swipe one) in the secondary menu 1601 that is closest to the add button 605 in the positive direction of the y-axis. Scan button 1701) is displayed as active.
示例性的,手机将二级菜单1601中的扫一扫按钮1701显示为激活状态后,可继续响应用户手指在首页601中输入的滑动过程切换二级菜单1601中被激活的操作控件。其中,手机在二级菜单1601中切换被激活的操作控件的具体方法,可参见步骤S504中手机在首页601中切换被激活的操作控件的具体方法,故此处不再详述。Exemplarily, after the mobile phone displays the scan button 1701 in the secondary menu 1601 as an activated state, it can continue to respond to the sliding process input by the user's finger on the home page 601 to switch the activated operation controls in the secondary menu 1601. For the specific method for the mobile phone to switch the activated operation control in the secondary menu 1601, please refer to the specific method for the mobile phone to switch the activated operation control on the home page 601 in step S504, so it will not be described in detail here.
示例性的,如图18中的(a)所示,当二级菜单1601中的收付款按钮1801被激活后,手机可以此时用户手指在首页601中的触摸点B1为起始位置,检测用户手指在x轴或y轴上的滑动距离。如果检测到用户手指从触摸点B1沿y轴负方向移动了预设距离后移动至触摸点B2,则如图18中的(b)所示,手机可在二级菜单1601中将被激活的操作控件回退为扫一扫按钮1701,并将收付款按钮1801显示为去激活状态。Exemplarily, as shown in (a) of Figure 18, when the payment button 1801 in the secondary menu 1601 is activated, the mobile phone can detect that the user’s finger touches the point B1 on the home page 601 at this time as the starting position. The sliding distance of the user's finger on the x-axis or y-axis. If it is detected that the user's finger moves from the touch point B1 along the negative direction of the y-axis by a preset distance and then moves to the touch point B2, as shown in Figure 18 (b), the mobile phone can be activated in the secondary menu 1601 The operation control returns to the sweep button 1701, and the payment and receipt button 1801 is displayed in a deactivated state.
仍如图18中的(b)所示,当二级菜单1601中的扫一扫按钮1701被激活后,手机可以此时用户手指在首页601中的触摸点B2为起始位置,检测用户手指在x轴或y轴上的滑动距离。如果检测到用户手指从触摸点B2沿y轴负方向移动了预设距离后移动至触摸点B3,由于扫一扫按钮1701已经为二级菜单1601中沿y轴方向最顶部的 操作控件,那么,如图18中的(c)所示,手机可响应该滑动过程退出二级菜单1601,回退至首页601中添加按钮605被激活的状态。Still as shown in (b) in Figure 18, when the sweep button 1701 in the secondary menu 1601 is activated, the mobile phone can detect the user's finger at the touch point B2 of the user's finger on the home page 601 at this time. The sliding distance on the x-axis or y-axis. If it is detected that the user's finger has moved a preset distance from touch point B2 in the negative direction of the y-axis to touch point B3, since the sweep button 1701 is already the top operation control along the y-axis in the secondary menu 1601, then As shown in (c) in FIG. 18, the mobile phone can exit the secondary menu 1601 in response to the sliding process, and return to the state where the add button 605 on the home page 601 is activated.
可以看出,本申请实施例中,用户通过输入下拉滑动操作不仅可以触发手机激活显示界面中的各个操作控件,还可以触发手机激活显示界面中操作控件的二级菜单,在二级菜单中根据用户手指的滑动过程激活相应的操作控件。这样,用户只需要执行一次滑动操作便可以进入显示界面的二级菜单中通过单手操作控制相应的操作控件,简化了在多级菜单之间进行单手操作的交互流程。It can be seen that in this embodiment of the application, the user can not only trigger the mobile phone to activate each operation control in the display interface by inputting a pull-down sliding operation, but also trigger the mobile phone to activate the secondary menu of the operation control in the display interface. The sliding process of the user's finger activates the corresponding operation control. In this way, the user only needs to perform a sliding operation once to enter the secondary menu of the display interface to control the corresponding operation control through one-handed operation, which simplifies the interactive process of one-handed operation between multi-level menus.
S507、响应于上述滑动操作中用户手指离开的操作,手机显示上述第三操作控件被点击后的第二界面。S507. In response to the operation of leaving the user's finger in the aforementioned sliding operation, the mobile phone displays a second interface after the aforementioned third operation control is clicked.
以用户输入滑动操作的第三滑动过程后触发手机激活二级菜单1601中的扫一扫按钮1701举例,如图19中的(a)所示,如果当前被激活的扫一扫按钮1701为用户本次需要点击的操作控件,则用户可将手指离开首页601,即结束本次滑动操作。Take the user’s input of the third sliding process of the sliding operation to trigger the mobile phone to activate the scan button 1701 in the secondary menu 1601 as an example, as shown in Figure 19 (a), if the currently activated scan button 1701 is the user For the operation control that needs to be clicked this time, the user can leave the home page 601 with the finger to end this sliding operation.
此时,手机可响应用户手指离开的操作,执行点击扫一扫按钮1701的操作。例如,手机可向正在运行的微信APP发送扫一扫按钮1701的点击事件,进而,如图19中的(b)所示,微信APP响应于该点击事件可显示扫一扫按钮1701被点击后进入的扫一扫界面1901。At this time, the mobile phone can perform the operation of clicking the sweep button 1701 in response to the operation of the user's finger leaving. For example, the mobile phone can send a click event of the sweep button 1701 to the running WeChat APP. Furthermore, as shown in (b) in Figure 19, the WeChat APP can display that the sweep button 1701 is clicked in response to the click event. Enter the scan interface 1901.
在一些实施例中,一些APP的显示界面中可能隐藏有下拉刷新的控件。如图20中的(a)所示,手机正在显示音乐APP的主页2001。主页2001的顶部设置有设置按钮2002、搜索栏2003以及更多选项2004这三个操作控件。在这三个操作控件的下方隐藏有下拉刷新控件。一般,如果检测到用户在主页2001中输入沿y轴正方向的滑动操作(即下拉操作),则手机可显示隐藏的下拉刷新控件并执行刷新操作。In some embodiments, a pull-down refresh control may be hidden in the display interface of some APPs. As shown in (a) in FIG. 20, the mobile phone is displaying the homepage 2001 of the music APP. The top of the homepage 2001 is provided with three operation controls: a setting button 2002, a search bar 2003, and more options 2004. There is a pull-down refresh control hidden under the three operation controls. Generally, if it is detected that the user inputs a sliding operation (ie, a pull-down operation) in the positive direction of the y-axis on the homepage 2001, the mobile phone can display the hidden pull-down refresh control and perform a refresh operation.
在本申请实施例中,仍如图20中的(a)所示,如果手机检测到用户手指沿y轴正方向从触摸点C1移动了D1距离至触摸点C2,说明用户完成了本次滑动操作的第一滑动过程,则如步骤S503所述,手机可响应该第一滑动过程在主页2001中将顶部的操作控件(例如设置按钮2002)显示为激活状态。In the embodiment of the present application, as shown in (a) in Figure 20, if the mobile phone detects that the user's finger moves along the positive direction of the y-axis from the touch point C1 to the touch point C2 by a distance of D1, it means that the user has completed the slide For the first sliding process of the operation, as described in step S503, the mobile phone can respond to the first sliding process to display the top operation control (for example, the setting button 2002) in the active state in the homepage 2001 in response to the first sliding process.
进而,如果用户需要沿y轴纵向切换主页2001中被激活的操作控件,则如图20中的(b)所示,用户可以触摸点C2为起始位置沿y轴正方向继续滑动D2距离至触摸点C3,即完成本次滑动操作的第二滑动过程。此时,如步骤S504所述,手机可查询沿y轴正方向与已激活的设置按钮2002距离最近的操作控件为隐藏的下拉刷新控件2005。此时,仍如图20中的(b)所示,手机可在主页2001中显示出隐藏的下拉刷新控件2005,并将下拉刷新控件2005显示为激活状态,将设置按钮2002显示为去激活状态。此时,如果检测到用户手指离开主页2001,即本次滑动操作结束,则手机可执行与下拉刷新控件2005对应的刷新操作。Furthermore, if the user needs to switch the activated operation controls in the homepage 2001 along the y-axis longitudinally, as shown in (b) in Figure 20, the user can touch point C2 as the starting position and continue to slide D2 along the positive direction of the y-axis to Touch point C3 to complete the second sliding process of this sliding operation. At this time, as described in step S504, the mobile phone can query that the operation control closest to the activated setting button 2002 along the positive direction of the y-axis is the hidden pull-down refresh control 2005. At this time, as shown in (b) in Figure 20, the mobile phone can display the hidden pull-down refresh control 2005 on the homepage 2001, and display the pull-down refresh control 2005 as an activated state, and the setting button 2002 as a deactivated state. . At this time, if it is detected that the user's finger leaves the homepage 2001, that is, this sliding operation ends, the mobile phone can perform a refresh operation corresponding to the pull-down refresh control 2005.
或者,如图20中的(c)所示,如果用户手指未离开主页2001,手机可继续检测用户手指以触摸点C3为起始位置沿y轴正方向的滑动过程,此时,手机可仍然在主页2001中显示出隐藏的下拉刷新控件2005,并将下拉刷新控件2005显示为激活状态。当然,如果检测用户手指以触摸点C3为起始位置沿x轴正方向滑动,则手机可将被激活的操作控件从设置按钮2002切换为x轴正方向的搜索栏2003或更多选项2004。其中,切换被激活的操作控件的具体方法可参见步骤S504的相关描述。Or, as shown in Figure 20(c), if the user's finger does not leave the homepage 2001, the mobile phone can continue to detect the sliding process of the user's finger in the positive direction of the y-axis with the touch point C3 as the starting position. At this time, the mobile phone can still The hidden pull-down refresh control 2005 is displayed in the home page 2001, and the pull-down refresh control 2005 is displayed as an active state. Of course, if it is detected that the user's finger slides in the positive x-axis direction with the touch point C3 as the starting position, the mobile phone can switch the activated operation control from the setting button 2002 to the search bar 2003 or more options 2004 in the positive x-axis direction. For the specific method of switching the activated operation control, please refer to the related description of step S504.
也就是说,在进入单手操作模式后,下拉刷新控件2005为主页2001中最后一个能够沿y轴纵向切换的操作控件。这样,用户输入下拉操作后既可以触发手机进入单手操作模式控制显示界面顶部的操作控件,还可以支持显示界面中的下拉刷新操作,避免在同一显示界面中用户进入单手操作模式的滑动操作与该显示界面支持的下拉刷新操作发生冲突。That is to say, after entering the one-handed operation mode, the pull-down refresh control 2005 is the last operation control in the homepage 2001 that can be switched longitudinally along the y-axis. In this way, after the user enters the pull-down operation, the mobile phone can be triggered to enter the one-handed operation mode to control the operation controls on the top of the display interface, and it can also support the pull-down refresh operation in the display interface, avoiding the sliding operation of the user entering the one-handed operation mode on the same display interface It conflicts with the pull-down refresh operation supported by the display interface.
或者,在另一些实施例中,如图21中的(a)所示,当手机检测到用户手指从触摸点C1滑动至触摸点C2完成了滑动操作的第一滑动过程后,手机可查询当前的主页2001中是否隐藏有下拉刷新控件2005。如果主页2001中没有隐藏下拉刷新控件2005,则如上述步骤S503所述,手机可响应该第一滑动过程进入单手操作模式,在主页2001中将顶部的操作控件(例如设置按钮2002)显示为激活状态。Or, in other embodiments, as shown in (a) of FIG. 21, when the mobile phone detects that the user's finger slides from the touch point C1 to the touch point C2 to complete the first sliding process of the sliding operation, the mobile phone can query the current Is there a pull-down refresh control 2005 hidden in the homepage 2001? If the pull-down refresh control 2005 is not hidden in the homepage 2001, as described in step S503 above, the mobile phone can enter the one-handed operation mode in response to the first sliding process, and display the top operation control (for example, the setting button 2002) in the homepage 2001 as Active state.
相应的,如果主页2001中隐藏有下拉刷新控件2005,则如图21中的(b)所示,手机可在主页2001中显示出隐藏的下拉刷新控件2005,并将下拉刷新控件2005显示为激活状态,从而提示用户已经选中了下拉刷新控件2005。此时,如果检测到用户手指离开主页2001,则手机可执行与下拉刷新控件2005对应的刷新操作。Correspondingly, if there is a pull-down refresh control 2005 hidden in the homepage 2001, as shown in Figure 21 (b), the mobile phone can display the hidden pull-down refresh control 2005 on the homepage 2001, and display the pull-down refresh control 2005 as active Status, prompting the user that the pull-down refresh control 2005 has been selected. At this time, if it is detected that the user's finger leaves the homepage 2001, the mobile phone can perform a refresh operation corresponding to the pull-down refresh control 2005.
或者,仍如图21中的(b)所示,如果手机在激活下拉刷新控件2005后,检测到用户手指继续沿y轴从触摸点C2滑动至触摸点C3,则说明用户此时输入的下拉操作或上拉操作并不是希望刷新当前的主页2001,而是希望进入单手操作模式控制主页2001中的操作控件。此时,如图21中的(c)所示,手机可在主页2001中重新隐藏下拉刷新控件2005,并按照步骤S503中所述的方法将主页2001顶部的操作控件(例如设置按钮2002)显示为激活状态。后续,手机可按照步骤S504-S507所述的方法响应用户输入的滑动操作控制主页2001中的操作控件。Or, as shown in (b) of Figure 21, if the mobile phone detects that the user's finger continues to slide along the y-axis from touch point C2 to touch point C3 after activating the pull-down refresh control 2005, it indicates that the user has input pull-down at this time The operation or the pull-up operation is not to refresh the current homepage 2001, but to enter the one-handed operation mode to control the operation controls in the homepage 2001. At this time, as shown in (c) in Figure 21, the mobile phone can hide the pull-down refresh control 2005 in the homepage 2001 again, and display the operation controls (such as the setting button 2002) at the top of the homepage 2001 according to the method described in step S503 Is active. Subsequently, the mobile phone can control the operation controls in the homepage 2001 in response to the sliding operation input by the user according to the method described in steps S504-S507.
需要说明的是,上述实施例中是以下拉刷新控件2005隐藏在主页2001中举例说明的。可以理解的是,手机也可以将相应的刷新控件显示在APP的显示界面中。此时,用户输入滑动操作激活显示界面中刷新控件的方法与上述实施例中用户激活隐藏在主页2001中下拉刷新控件2005的方法相同,故此处不再赘述。It should be noted that, in the above embodiment, the pull-down refresh control 2005 is hidden in the homepage 2001 as an example. It is understandable that the mobile phone can also display the corresponding refresh control on the display interface of the APP. At this time, the method for the user to enter the sliding operation to activate the refresh control in the display interface is the same as the method for the user to activate the pull-down refresh control 2005 hidden in the homepage 2001 in the above embodiment, so it will not be repeated here.
可以看出,在本申请实施例中,用户通过输入一次完整的滑动操作,手机可响应该滑动操作中不同阶段的滑动过程激活显示界面(或显示界面的二级菜单)中用户需要点击的操作控件,并对被激活的操作控件执行对应的点击操作,实现对操作控件的单手控制功能,同时不会影响显示界面中的显示内容和显示效果,从而在保证显示内容和显示效果的同时提高了用户单手操作时的使用体验。It can be seen that in this embodiment of the application, the user inputs a complete sliding operation, and the mobile phone can activate the operation that the user needs to click on the display interface (or the secondary menu of the display interface) in response to the sliding process at different stages in the sliding operation. Controls, and perform corresponding click operations on the activated operation controls to realize the one-handed control function of the operation controls without affecting the display content and display effect in the display interface, thereby improving the display content and display effect while ensuring This improves the user experience when operating with one hand.
本申请实施例公开了一种电子设备,包括处理器,以及与处理器相连的存储器、输入设备和输出设备。其中,输入设备和输出设备可集成为一个设备,例如,可将触摸传感器作为输入设备,将显示屏作为输出设备,并将触摸传感器和显示屏集成为触摸屏。The embodiment of the application discloses an electronic device including a processor, and a memory, an input device, and an output device connected to the processor. Among them, the input device and the output device can be integrated into one device. For example, a touch sensor can be used as an input device, a display screen can be used as an output device, and the touch sensor and display screen can be integrated into a touch screen.
此时,如图22所示,上述电子设备可以包括:触摸屏2201,所述触摸屏2201包括触摸传感器2206和显示屏2207;一个或多个处理器2202;存储器2203;一个或多个应用程序(未示出);以及一个或多个计算机程序2204,上述各器件可以通过一个或多个通信总线2205连接。其中该一个或多个计算机程序2204被存储在上述存储器2203中并被配置为被该一个或多个处理器2202执行,该一个或多个计算机程序2204 包括指令,上述指令可以用于执行上述实施例中的各个步骤。其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应实体器件的功能描述,在此不再赘述。At this time, as shown in FIG. 22, the above-mentioned electronic device may include: a touch screen 2201 including a touch sensor 2206 and a display screen 2207; one or more processors 2202; a memory 2203; one or more application programs (not shown) Shown); and one or more computer programs 2204, each of the above-mentioned devices can be connected through one or more communication buses 2205. The one or more computer programs 2204 are stored in the aforementioned memory 2203 and configured to be executed by the one or more processors 2202, and the one or more computer programs 2204 include instructions, and the aforementioned instructions can be used to execute the aforementioned implementations. The steps in the example. Among them, all relevant content of the steps involved in the above method embodiments can be cited in the functional description of the corresponding physical device, and will not be repeated here.
示例性的,上述处理器2202具体可以为图1B所示的处理器110,上述存储器2203具体可以为图1B所示的内部存储器121,上述显示屏2207具体可以为图1B所示的显示屏194,上述触摸传感器2206具体可以为图1B所示的传感器模块180中的触摸传感器,本申请实施例对此不做任何限制。Exemplarily, the processor 2202 may be the processor 110 shown in FIG. 1B, the memory 2203 may be the internal memory 121 shown in FIG. 1B, and the display screen 2207 may be the display screen 194 shown in FIG. 1B. The above-mentioned touch sensor 2206 may specifically be a touch sensor in the sensor module 180 shown in FIG. 1B, which is not limited in the embodiment of the present application.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and brevity of the description, only the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned functions can be allocated according to needs. It is completed by different functional modules, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. For the specific working process of the above-described system, device, and unit, reference may be made to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请实施例各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。The functional units in the various embodiments of the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:快闪存储器、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application are essentially or the part that contributes to the prior art, or all or part of the technical solutions can be embodied in the form of software products, and the computer software products are stored in a storage The medium includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: flash memory, mobile hard disk, read-only memory, random access memory, magnetic disk or optical disk and other media that can store program codes.
以上所述,仅为本申请实施例的具体实施方式,但本申请实施例的保护范围并不局限于此,任何在本申请实施例揭露的技术范围内的变化或替换,都应涵盖在本申请实施例的保护范围之内。因此,本申请实施例的保护范围应以所述权利要求的保护范围为准。The above are only specific implementations of the embodiments of the present application, but the protection scope of the embodiments of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the embodiments of the present application shall be covered by this application. Within the protection scope of the application embodiments. Therefore, the protection scope of the embodiments of the present application should be subject to the protection scope of the claims.

Claims (28)

  1. 一种控件的操作方法,其特征在于,包括:An operation method of a control, which is characterized in that it comprises:
    显示应用的第一界面,其中,所述应用安装在具有触摸屏的电子设备中,所述第一界面的顶部设置有第一操作控件;Displaying a first interface of an application, wherein the application is installed in an electronic device with a touch screen, and a first operation control is provided on the top of the first interface;
    接收用户在所述第一界面上输入的滑动操作;Receiving a sliding operation input by the user on the first interface;
    当检测到所述滑动操作满足第一滑动过程时,将所述第一操作控件显示为激活状态,所述第一滑动过程是指触摸体接触所述第一界面后沿第一方向滑动第一预设距离的过程;When it is detected that the sliding operation satisfies the first sliding process, the first operation control is displayed as an activated state. The first sliding process refers to the first sliding of the first operation control in the first direction after the touch body contacts the first interface. The process of presetting the distance;
    当所述滑动操作结束时,响应于所述滑动操作的结束,显示第二界面,其中,所述第二界面是所述第一操作控件被点击后将显示的界面。When the sliding operation ends, in response to the end of the sliding operation, a second interface is displayed, where the second interface is an interface that will be displayed after the first operation control is clicked.
  2. 根据权利要求1所述的方法,其特征在于,在将所述第一操作控件显示为激活状态之后,还包括:The method according to claim 1, wherein after displaying the first operation control as an activated state, the method further comprises:
    检测到所述滑动操作满足第二滑动过程,所述第二滑动过程的起始位置为所述第一滑动过程的结束位置,其中,在所述第一滑动过程和所述第二滑动过程中,所述触摸体保持触摸在所述电子设备的触摸屏上;It is detected that the sliding operation satisfies the second sliding process, and the starting position of the second sliding process is the ending position of the first sliding process, wherein during the first sliding process and the second sliding process , The touch body keeps touching on the touch screen of the electronic device;
    响应于检测到所述滑动操作满足所述第二滑动过程,将所述第一界面中的第二操作控件显示为激活状态,并将所述第一操作控件显示为去激活状态。In response to detecting that the sliding operation satisfies the second sliding process, the second operation control in the first interface is displayed as an activated state, and the first operation control is displayed as a deactivated state.
  3. 根据权利要求2所述的方法,其特征在于,The method of claim 2, wherein:
    当所述第二滑动过程中的滑动距离在第二方向上的投影大于第二预设距离时,所述第二操作控件为沿所述第二方向上与所述第一操作控件距离最近的操作控件,所述第二方向与所述第一方向相同或不同。When the projection of the sliding distance in the second direction in the second sliding process is greater than the second preset distance, the second operation control is the closest to the first operation control in the second direction Operating the control, the second direction is the same or different from the first direction.
  4. 根据权利要求2或3所述的方法,其特征在于,在将所述第一界面中的第二操作控件显示为激活状态,并将所述第一操作控件显示为去激活状态之后,还包括:The method according to claim 2 or 3, wherein after displaying the second operation control in the first interface as an activated state and displaying the first operation control as a deactivated state, the method further comprises :
    检测到所述滑动操作满足第三滑动过程,所述第三滑动过程的滑动方向与所述第二滑动过程的滑动方向与相反,所述第三滑动过程的滑动距离与所述第二滑动过程的滑动距离的差小于预设值,在所述第三滑动过程中,所述触摸体保持触摸在所述电子设备的触摸屏上;It is detected that the sliding operation satisfies the third sliding process, the sliding direction of the third sliding process is opposite to the sliding direction of the second sliding process, and the sliding distance of the third sliding process is the same as that of the second sliding process The difference in the sliding distance of is smaller than the preset value, and during the third sliding process, the touch body keeps touching on the touch screen of the electronic device;
    响应于检测到所述滑动操作满足所述第三滑动过程,重新将所述第一操作控件显示为激活状态,并将所述第二操作控件显示为去激活状态。In response to detecting that the sliding operation satisfies the third sliding process, the first operation control is redisplayed as an activated state, and the second operation control is displayed as a deactivated state.
  5. 根据权利要求1-4中任一项所述的方法,其特征在于,所述第一操作控件为包含二级菜单的控件;在将所述第一操作控件显示为激活状态之后,还包括:The method according to any one of claims 1 to 4, wherein the first operation control is a control including a secondary menu; after displaying the first operation control in an activated state, the method further comprises:
    检测所述触摸体在所述第一滑动过程的结束位置的停留时间;Detecting the dwell time of the touch body at the end position of the first sliding process;
    若所述停留时间大于预设时间,则在所述第一界面中显示所述第一操作控件的二级菜单。If the stay time is greater than the preset time, the secondary menu of the first operation control is displayed on the first interface.
  6. 根据权利要求5所述的方法,其特征在于,在所述第一界面中显示所述第一操作控件的二级菜单之后,还包括:The method according to claim 5, wherein after displaying the secondary menu of the first operation control in the first interface, the method further comprises:
    检测到所述滑动操作满足第四滑动过程,所述第四滑动过程的起始位置为所述第一滑动过程的结束位置,在所述第四滑动过程中,所述触摸体保持触摸在所述电子设备的触摸屏上;It is detected that the sliding operation satisfies the fourth sliding process, the starting position of the fourth sliding process is the ending position of the first sliding process, and during the fourth sliding process, the touch body remains touched at all On the touch screen of the electronic device;
    响应于所述滑动操作满足所述第四滑动过程,将所述二级菜单中的第三操作控件显示为激活状态。In response to the sliding operation satisfying the fourth sliding process, the third operation control in the secondary menu is displayed as an activated state.
  7. 根据权利要求1-6中任一项所述的方法,其特征在于,所述第一界面内隐藏有刷新按钮,所述刷新按钮在第三方向上与所述第一操作控件相邻,所述第三方向与所述第一方向相同或不同;The method according to any one of claims 1-6, wherein a refresh button is hidden in the first interface, and the refresh button is adjacent to the first operation control in the third direction, and the The third direction is the same as or different from the first direction;
    其中,在将所述第一操作控件显示为激活状态之后,还包括:Wherein, after displaying the first operation control as an activated state, the method further includes:
    检测到所述滑动操作满足第五滑动过程,所述第五滑动过程是指从所述第一滑动过程的结束位置开始沿所述第三方向移动第三预设距离的过程,在所述第五滑动过程中,所述触摸体保持触摸在所述电子设备的触摸屏上;It is detected that the sliding operation satisfies the fifth sliding process, and the fifth sliding process refers to a process of moving a third preset distance in the third direction from the end position of the first sliding process. 5. During the sliding process, the touch body keeps touching on the touch screen of the electronic device;
    响应于检测到所述滑动操作满足所述第五滑动过程,在所述第一界面中显示出所述刷新按钮,并将所述刷新按钮显示为激活状态。In response to detecting that the sliding operation satisfies the fifth sliding process, the refresh button is displayed in the first interface, and the refresh button is displayed in an activated state.
  8. 根据权利要求7所述的方法,其特征在于,在所述第一界面中显示出所述刷新按钮,并将所述刷新按钮显示为激活状态之后,还包括:8. The method according to claim 7, wherein after the refresh button is displayed on the first interface and the refresh button is displayed in an activated state, the method further comprises:
    若检测到所述触摸体离开所述第一界面,则执行与点击所述刷新按钮对应的刷新操作;If it is detected that the touch body leaves the first interface, perform a refresh operation corresponding to clicking the refresh button;
    若检测到所述触摸体继续滑动,则继续将所述刷新按钮显示为激活状态。If it is detected that the touch body continues to slide, then continue to display the refresh button as an activated state.
  9. 根据权利要求1-8中任一项所述的方法,其特征在于,The method according to any one of claims 1-8, wherein:
    当所述第一滑动过程的起始位置位于所述第一界面的左半部分时,所述第一操作控件为所述第一界面顶部最左侧的操作控件;当所述第一滑动过程的起始位置位于所述第一界面的右半部分时,所述第一操作控件为所述第一界面顶部最右侧的操作控件;或者,When the starting position of the first sliding process is in the left half of the first interface, the first operation control is the leftmost operation control at the top of the first interface; when the first sliding process When the starting position of is located in the right half of the first interface, the first operation control is the rightmost operation control at the top of the first interface; or,
    当所述第一滑动过程的结束位置位于所述第一界面的左半部分时,所述第一操作控件为所述第一界面顶部最左侧的操作控件;当所述第一滑动过程的结束位置位于所述第一界面的右半部分时,所述第一操作控件为所述第一界面顶部最右侧的操作控件。When the end position of the first sliding process is in the left half of the first interface, the first operation control is the leftmost operation control at the top of the first interface; when the first sliding process is When the end position is located in the right half of the first interface, the first operation control is the rightmost operation control at the top of the first interface.
  10. 根据权利要求1-8中任一项所述的方法,其特征在于,The method according to any one of claims 1-8, wherein:
    当用户的握持姿态为左手握持姿态时,所述第一操作控件为所述第一界面顶部最右侧的操作控件;When the user's holding posture is a left-hand holding posture, the first operation control is the rightmost operation control at the top of the first interface;
    当用户的握持姿态为右手握持姿态时,所述第一操作控件为所述第一界面顶部最左侧的操作控件。When the user's holding posture is a right-hand holding posture, the first operation control is the leftmost operation control at the top of the first interface.
  11. 根据权利要求1-10中任一项所述的方法,其特征在于,将所述第一操作控件显示为激活状态,包括:The method according to any one of claims 1-10, wherein displaying the first operation control in an activated state comprises:
    通过改变所述第一操作控件的形状、大小、颜色或背景,将所述第一操作控件显示为激活状态。By changing the shape, size, color or background of the first operation control, the first operation control is displayed in an activated state.
  12. 根据权利要求1-11中任一项所述的方法,其特征在于,所述滑动操作的结束是指所述触摸体离开所述电子设备的触摸屏;The method according to any one of claims 1-11, wherein the end of the sliding operation means that the touch body leaves the touch screen of the electronic device;
    其中,响应于所述滑动操作的结束,显示第二界面,包括:Wherein, in response to the end of the sliding operation, displaying the second interface includes:
    当检测到所述触摸体离开所述电子设备的触摸屏时,向所述应用上报所述第一操作控件的点击事件,以使得所述应用响应所述点击事件显示所述第一操作控件被点击后将显示的第二界面。When it is detected that the touch body leaves the touch screen of the electronic device, the click event of the first operation control is reported to the application, so that the application displays that the first operation control is clicked in response to the click event The second interface will be displayed later.
  13. 根据权利要求1-12中任一项所述的方法,其特征在于,所述第一方向是指从所述第一界面的顶部指向所述第一界面的底部的方向。The method according to any one of claims 1-12, wherein the first direction refers to a direction from the top of the first interface to the bottom of the first interface.
  14. 一种电子设备,其特征在于,包括:An electronic device, characterized in that it comprises:
    触摸屏,其中,所述触摸屏包括触摸传感器和显示屏;A touch screen, wherein the touch screen includes a touch sensor and a display screen;
    一个或多个处理器;One or more processors;
    存储器;Memory
    其中,所述存储器中存储有一个或多个计算机程序,所述一个或多个计算机程序包括指令,当所述指令被所述电子设备执行时,使得所述电子设备执行以下步骤:Wherein, one or more computer programs are stored in the memory, and the one or more computer programs include instructions, and when the instructions are executed by the electronic device, the electronic device is caused to perform the following steps:
    显示应用的第一界面,所述第一界面的顶部设置有第一操作控件;Displaying a first interface of the application, and a first operation control is provided on the top of the first interface;
    接收用户在所述第一界面上输入的滑动操作;Receiving a sliding operation input by the user on the first interface;
    当检测到所述滑动操作满足第一滑动过程时,将所述第一操作控件显示为激活状态,所述第一滑动过程是指触摸体接触所述第一界面后沿第一方向滑动第一预设距离的过程;When it is detected that the sliding operation satisfies the first sliding process, the first operation control is displayed as an activated state. The first sliding process refers to the first sliding of the first operation control in the first direction after the touch body contacts the first interface. The process of presetting the distance;
    当所述滑动操作结束时,响应于所述滑动操作的结束,显示第二界面,其中,所述第二界面是所述第一操作控件被点击后将显示的界面。When the sliding operation ends, in response to the end of the sliding operation, a second interface is displayed, where the second interface is an interface that will be displayed after the first operation control is clicked.
  15. 根据权利要求14所述的电子设备,其特征在于,在将所述第一操作控件显示为激活状态之后,所述电子设备还用于执行:The electronic device according to claim 14, wherein after the first operation control is displayed as an activated state, the electronic device is further configured to execute:
    检测到所述滑动操作满足第二滑动过程,所述第二滑动过程的起始位置为所述第一滑动过程的结束位置,其中,在所述第一滑动过程和所述第二滑动过程中,所述触摸体保持触摸在所述触摸屏上;It is detected that the sliding operation satisfies the second sliding process, and the starting position of the second sliding process is the ending position of the first sliding process, wherein, during the first sliding process and the second sliding process , The touch body keeps touching on the touch screen;
    响应于检测到所述滑动操作满足所述第二滑动过程,将所述第一界面中的第二操作控件显示为激活状态,并将所述第一操作控件显示为去激活状态。In response to detecting that the sliding operation satisfies the second sliding process, the second operation control in the first interface is displayed as an activated state, and the first operation control is displayed as a deactivated state.
  16. 根据权利要求15所述的电子设备,其特征在于,当所述第二滑动过程中的滑动距离在第二方向上的投影大于第二预设距离时,所述第二操作控件为沿所述第二方向上与所述第一操作控件距离最近的操作控件,所述第二方向与所述第一方向相同或不同。The electronic device according to claim 15, wherein when the projection of the sliding distance in the second direction in the second sliding process is greater than a second preset distance, the second operation control is along the The operation control in the second direction that is closest to the first operation control, and the second direction is the same as or different from the first direction.
  17. 根据权利要求15或16所述的电子设备,其特征在于,在将所述第一界面中的第二操作控件显示为激活状态,并将所述第一操作控件显示为去激活状态之后,所述电子设备还用于执行:The electronic device according to claim 15 or 16, wherein after displaying the second operation control in the first interface as an activated state, and displaying the first operation control as a deactivated state, the The electronic equipment is also used to perform:
    检测到所述滑动操作满足第三滑动过程,所述第三滑动过程的滑动方向与所述第二滑动过程的滑动方向与相反,所述第三滑动过程的滑动距离与所述第二滑动过程的滑动距离的差小于预设值,在所述第三滑动过程中,所述触摸体保持触摸在所述触摸屏上;It is detected that the sliding operation satisfies the third sliding process, the sliding direction of the third sliding process is opposite to the sliding direction of the second sliding process, and the sliding distance of the third sliding process is the same as that of the second sliding process The difference in the sliding distance of is smaller than the preset value, and during the third sliding process, the touch body keeps touching on the touch screen;
    响应于检测到所述滑动操作满足所述第三滑动过程,重新将所述第一操作控件显示为激活状态,并将所述第二操作控件显示为去激活状态。In response to detecting that the sliding operation satisfies the third sliding process, the first operation control is redisplayed as an activated state, and the second operation control is displayed as a deactivated state.
  18. 根据权利要求14-17中任一项所述的电子设备,其特征在于,所述第一操作控件为包含二级菜单的控件;The electronic device according to any one of claims 14-17, wherein the first operation control is a control including a secondary menu;
    在将所述第一操作控件显示为激活状态之后,所述电子设备还用于执行:After displaying the first operation control as an activated state, the electronic device is further used to execute:
    检测所述触摸体在所述第一滑动过程的结束位置的停留时间;Detecting the dwell time of the touch body at the end position of the first sliding process;
    若所述停留时间大于预设时间,则在所述第一界面中显示所述第一操作控件的二级菜单。If the stay time is greater than the preset time, the secondary menu of the first operation control is displayed on the first interface.
  19. 根据权利要求18所述的电子设备,其特征在于,在所述第一界面中显示所述第一操作控件的二级菜单之后,所述电子设备还用于执行:The electronic device according to claim 18, wherein after displaying the secondary menu of the first operation control in the first interface, the electronic device is further configured to execute:
    检测到所述滑动操作满足第四滑动过程,所述第四滑动过程的起始位置为所述第一滑动过程的结束位置,在所述第四滑动过程中,所述触摸体保持触摸在所述触摸屏上;It is detected that the sliding operation satisfies the fourth sliding process, the starting position of the fourth sliding process is the ending position of the first sliding process, and during the fourth sliding process, the touch body remains touched at all Said on the touch screen;
    响应于所述滑动操作满足所述第四滑动过程,将所述二级菜单中的第三操作控件显示为激活状态。In response to the sliding operation satisfying the fourth sliding process, the third operation control in the secondary menu is displayed as an activated state.
  20. 根据权利要求14-19中任一项所述的电子设备,其特征在于,所述第一界面内隐藏有刷新按钮,所述刷新按钮在第三方向上与所述第一操作控件相邻,所述第三方向与所述第一方向相同或不同;The electronic device according to any one of claims 14-19, wherein a refresh button is hidden in the first interface, and the refresh button is adjacent to the first operation control in the third direction, so The third direction is the same or different from the first direction;
    在将所述第一操作控件显示为激活状态之后,所述电子设备还用于执行:After displaying the first operation control as an activated state, the electronic device is further used to execute:
    检测到所述滑动操作满足第五滑动过程,所述第五滑动过程是指从所述第一滑动过程的结束位置开始沿所述第三方向移动第三预设距离的过程,在所述第五滑动过程中,所述触摸体保持触摸在所述触摸屏上;It is detected that the sliding operation satisfies the fifth sliding process, and the fifth sliding process refers to a process of moving a third preset distance in the third direction from the end position of the first sliding process. 5. During the sliding process, the touch body keeps touching on the touch screen;
    响应于检测到所述滑动操作满足所述第五滑动过程,在所述第一界面中显示出所述刷新按钮,并将所述刷新按钮显示为激活状态。In response to detecting that the sliding operation satisfies the fifth sliding process, the refresh button is displayed in the first interface, and the refresh button is displayed in an activated state.
  21. 根据权利要求20所述的电子设备,其特征在于,在所述第一界面中显示出所述刷新按钮,并将所述刷新按钮显示为激活状态之后,所述电子设备还用于执行:22. The electronic device according to claim 20, wherein after the refresh button is displayed on the first interface and the refresh button is displayed in an activated state, the electronic device is further configured to execute:
    若检测到所述触摸体离开所述第一界面,则执行与点击所述刷新按钮对应的刷新操作;If it is detected that the touch body leaves the first interface, perform a refresh operation corresponding to clicking the refresh button;
    若检测到所述触摸体继续滑动,则继续将所述刷新按钮显示为激活状态。If it is detected that the touch body continues to slide, then continue to display the refresh button as an activated state.
  22. 根据权利要求14-21中任一项所述的电子设备,其特征在于,The electronic device according to any one of claims 14-21, wherein:
    当所述第一滑动过程的起始位置位于所述第一界面的左半部分时,所述第一操作控件为所述第一界面顶部最左侧的操作控件;当所述第一滑动过程的起始位置位于所述第一界面的右半部分时,所述第一操作控件为所述第一界面顶部最右侧的操作控件;或者,When the starting position of the first sliding process is in the left half of the first interface, the first operation control is the leftmost operation control at the top of the first interface; when the first sliding process When the starting position of is located in the right half of the first interface, the first operation control is the rightmost operation control at the top of the first interface; or,
    当所述第一滑动过程的结束位置位于所述第一界面的左半部分时,所述第一操作控件为所述第一界面顶部最左侧的操作控件;当所述第一滑动过程的结束位置位于所述第一界面的右半部分时,所述第一操作控件为所述第一界面顶部最右侧的操作控件。When the end position of the first sliding process is in the left half of the first interface, the first operation control is the leftmost operation control at the top of the first interface; when the first sliding process is When the end position is located in the right half of the first interface, the first operation control is the rightmost operation control at the top of the first interface.
  23. 根据权利要求14-21中任一项所述的电子设备,其特征在于,The electronic device according to any one of claims 14-21, wherein:
    当用户的握持姿态为左手握持姿态时,所述第一操作控件为所述第一界面顶部最右侧的操作控件;When the user's holding posture is a left-hand holding posture, the first operation control is the rightmost operation control at the top of the first interface;
    当用户的握持姿态为右手握持姿态时,所述第一操作控件为所述第一界面顶部最左侧的操作控件。When the user's holding posture is a right-hand holding posture, the first operation control is the leftmost operation control at the top of the first interface.
  24. 根据权利要求14-23中任一项所述的电子设备,其特征在于,所述电子设备将所述第一操作控件显示为激活状态,具体包括:The electronic device according to any one of claims 14-23, wherein the electronic device displaying the first operation control in an activated state specifically comprises:
    通过改变所述第一操作控件的形状、大小、颜色或背景,将所述第一操作控件显 示为激活状态。By changing the shape, size, color or background of the first operation control, the first operation control is displayed in an activated state.
  25. 根据权利要求14-24中任一项所述的电子设备,其特征在于,所述滑动操作结束是指所述触摸体离开所述触摸屏;The electronic device according to any one of claims 14-24, wherein the end of the sliding operation means that the touch body leaves the touch screen;
    其中,响应于所述滑动操作的结束,所述电子设备显示第二界面,具体包括:Wherein, in response to the end of the sliding operation, the electronic device displays the second interface, which specifically includes:
    当检测到所述触摸体离开所述触摸屏时,向所述应用上报所述第一操作控件的点击事件,以使得所述应用响应所述点击事件显示所述第一操作控件被点击后将显示的第二界面。When it is detected that the touch body leaves the touch screen, the click event of the first operation control is reported to the application, so that the application responds to the click event and displays that the first operation control is clicked The second interface.
  26. 根据权利要求14-25中任一项所述的电子设备,其特征在于,所述第一方向是指从所述第一界面的顶部指向所述第一界面的底部的方向。The electronic device according to any one of claims 14-25, wherein the first direction refers to a direction from the top of the first interface to the bottom of the first interface.
  27. 一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,其特征在于,当所述指令在电子设备上运行时,使得所述电子设备执行如权利要求1-13中任一项所述的控件的操作方法。A computer-readable storage medium having instructions stored in the computer-readable storage medium, wherein when the instructions run on an electronic device, the electronic device is caused to execute any one of claims 1-13. The operation method of the control described in the item.
  28. 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在电子设备上运行时,使得所述电子设备执行如权利要求1-13中任一项所述的控件的操作方法。A computer program product containing instructions, characterized in that, when the computer program product runs on an electronic device, the electronic device is caused to execute the control operation method according to any one of claims 1-13.
PCT/CN2020/133858 2019-12-04 2020-12-04 Control operation method and electronic device WO2021110133A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911230192.4 2019-12-04
CN201911230192.4A CN111147660B (en) 2019-12-04 2019-12-04 Control operation method and electronic equipment

Publications (1)

Publication Number Publication Date
WO2021110133A1 true WO2021110133A1 (en) 2021-06-10

Family

ID=70517659

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/133858 WO2021110133A1 (en) 2019-12-04 2020-12-04 Control operation method and electronic device

Country Status (2)

Country Link
CN (1) CN111147660B (en)
WO (1) WO2021110133A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111147660B (en) * 2019-12-04 2021-06-15 华为技术有限公司 Control operation method and electronic equipment
CN111679778A (en) * 2020-06-01 2020-09-18 掌阅科技股份有限公司 Interactive display method of electronic book comment information, electronic equipment and storage medium
CN111782327A (en) * 2020-06-30 2020-10-16 百度在线网络技术(北京)有限公司 Display control method, display control device, electronic equipment and readable medium
CN113093795B (en) * 2021-03-30 2022-04-22 华南理工大学 Semi-automatic wireless control method and device for unmanned surface vehicle
CN113190230B (en) * 2021-05-21 2024-05-03 广东群创信息科技有限公司 Medical display method and system for user-defined setting of UI (user interface)
CN117950565A (en) * 2022-10-28 2024-04-30 Oppo广东移动通信有限公司 Application interface control method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120174025A1 (en) * 2005-02-18 2012-07-05 Zumobi, Inc. Single-Handed Approach for Navigation of Application Tiles Using Panning and Zooming
CN102625931A (en) * 2009-07-20 2012-08-01 惠普发展公司,有限责任合伙企业 User interface for initiating activities in an electronic device
CN105224187A (en) * 2015-09-23 2016-01-06 北京金山安全软件有限公司 Menu execution control method and terminal equipment
CN106406656A (en) * 2016-08-30 2017-02-15 维沃移动通信有限公司 Application program toolbar control method and mobile terminal
CN107111423A (en) * 2015-01-06 2017-08-29 甲骨文国际公司 Select the operable item in the graphic user interface of mobile computer system
CN111147660A (en) * 2019-12-04 2020-05-12 华为技术有限公司 Control operation method and electronic equipment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7423628B2 (en) * 2004-02-27 2008-09-09 Research In Motion Limited Track wheel with reduced space requirements
US20090033633A1 (en) * 2007-07-31 2009-02-05 Palo Alto Research Center Incorporated User interface for a context-aware leisure-activity recommendation system
US9367205B2 (en) * 2010-02-19 2016-06-14 Microsoft Technolgoy Licensing, Llc Radial menus with bezel gestures
CN106155452A (en) * 2015-03-23 2016-11-23 华为技术有限公司 The implementation method of a kind of one-handed performance and terminal
CN105094801B (en) * 2015-06-12 2019-12-24 阿里巴巴集团控股有限公司 Application function activation method and device
CN109753326B (en) * 2017-11-06 2023-04-07 斑马智行网络(香港)有限公司 Processing method, device, equipment and machine readable medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120174025A1 (en) * 2005-02-18 2012-07-05 Zumobi, Inc. Single-Handed Approach for Navigation of Application Tiles Using Panning and Zooming
CN102625931A (en) * 2009-07-20 2012-08-01 惠普发展公司,有限责任合伙企业 User interface for initiating activities in an electronic device
CN107111423A (en) * 2015-01-06 2017-08-29 甲骨文国际公司 Select the operable item in the graphic user interface of mobile computer system
CN105224187A (en) * 2015-09-23 2016-01-06 北京金山安全软件有限公司 Menu execution control method and terminal equipment
CN106406656A (en) * 2016-08-30 2017-02-15 维沃移动通信有限公司 Application program toolbar control method and mobile terminal
CN111147660A (en) * 2019-12-04 2020-05-12 华为技术有限公司 Control operation method and electronic equipment

Also Published As

Publication number Publication date
CN111147660B (en) 2021-06-15
CN111147660A (en) 2020-05-12

Similar Documents

Publication Publication Date Title
JP7414842B2 (en) How to add comments and electronic devices
WO2021110133A1 (en) Control operation method and electronic device
WO2020238774A1 (en) Notification message preview method and electronic device
WO2021115194A1 (en) Application icon display method and electronic device
WO2021032097A1 (en) Air gesture interaction method and electronic device
WO2021244443A1 (en) Split-screen display method, electronic device, and computer readable storage medium
US20170116987A1 (en) Electronic device and method for executing function using speech recognition thereof
WO2021121052A1 (en) Multi-screen cooperation method and system, and electronic device
WO2021063098A1 (en) Touch screen response method, and electronic device
EP2869181A1 (en) Method for executing functions in response to touch input and electronic device implementing the same
CN113132526B (en) Page drawing method and related device
KR102215178B1 (en) User input method and apparatus in a electronic device
WO2021057699A1 (en) Method for controlling electronic device with flexible screen, and electronic device
CN114816200A (en) Display method and electronic equipment
EP4365722A1 (en) Method for displaying dock bar in launcher and electronic device
WO2022222688A1 (en) Window control method and device
WO2022228043A1 (en) Display method, electronic device, storage medium and program product
CN115185440B (en) Control display method and related equipment
WO2022002213A1 (en) Translation result display method and apparatus, and electronic device
US12001612B2 (en) Air gesture-based interaction method and electronic device
WO2024037542A1 (en) Touch input method, system, electronic device, and storage medium
WO2024109481A1 (en) Window control method and electronic device
WO2023246604A1 (en) Handwriting input method and terminal
CN117707454A (en) Method for transmitting information and electronic equipment
CN116610248A (en) Gesture control method and electronic device

Legal Events

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

Ref document number: 20895631

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20895631

Country of ref document: EP

Kind code of ref document: A1