CN117076017A - Scroll bar display method and electronic equipment - Google Patents
Scroll bar display method and electronic equipment Download PDFInfo
- Publication number
- CN117076017A CN117076017A CN202310852422.0A CN202310852422A CN117076017A CN 117076017 A CN117076017 A CN 117076017A CN 202310852422 A CN202310852422 A CN 202310852422A CN 117076017 A CN117076017 A CN 117076017A
- Authority
- CN
- China
- Prior art keywords
- application
- interface
- animation
- blanking
- scroll bar
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 87
- 230000004044 response Effects 0.000 claims abstract description 10
- 230000008859 change Effects 0.000 claims description 49
- 238000004590 computer program Methods 0.000 claims description 7
- 230000008569 process Effects 0.000 abstract description 35
- 230000000694 effects Effects 0.000 abstract description 15
- 238000004891 communication Methods 0.000 description 18
- 230000006870 function Effects 0.000 description 16
- 238000007726 management method Methods 0.000 description 15
- 238000010586 diagram Methods 0.000 description 11
- 238000010295 mobile communication Methods 0.000 description 9
- 238000012545 processing Methods 0.000 description 8
- 230000003068 static effect Effects 0.000 description 6
- 230000008034 disappearance Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 5
- 238000005096 rolling process Methods 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000004904 shortening Methods 0.000 description 3
- 241000282326 Felis catus Species 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 2
- 230000003190 augmentative effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000008033 biological extinction Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 210000000988 bone and bone Anatomy 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000001537 neural effect Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000005855 radiation Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/32—Means for saving power
- G06F1/3203—Power management, i.e. event-based initiation of a power-saving mode
- G06F1/3234—Power saving characterised by the action undertaken
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction 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/0485—Scrolling or panning
- G06F3/04855—Interaction with scrollbars
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The application provides a display method of a scroll bar and electronic equipment, and relates to the technical field of display. The method comprises the following steps: displaying a first interface of a first application, and receiving a first operation of sliding a first area on the first interface; in response to a first operation, the first region and the scrollbar slide; wherein, when the first area is stationary, the scroll bar is stationary, and the vanishing animation is displayed on the first interface; if the first application is a preset application, the vanishing animation is a first vanishing animation, and the duration of the first vanishing animation is a first duration; if the first application is not the preset application, the disappearing animation is a second disappearing animation, the duration of the second disappearing animation is a second duration, and the first duration is smaller than the second duration. Because the first time length is smaller than the second time length, the power consumption of the preset application in the page sliding process is smaller than that of the non-preset application in the page sliding process. That is, the application achieves the effect of reducing the overall power consumption of the electronic device by reducing the power consumption of the preset application.
Description
Technical Field
The present application relates to the field of display technologies, and in particular, to a method for displaying a scroll bar and an electronic device.
Background
With the continuous development of technology, the terminal device can display various acquired information to the user in the form of page content through various applications (such as browser applications, social applications and the like). When the content of the page is so large that the display screen of the terminal device cannot display all the content of the page at one time, part of the content of the page is usually hidden and a scroll bar is displayed on the page, wherein the scroll bar is used for representing the position of the currently displayed content of the page in all the content of the page. When a user slides a page, the content of the currently displayed page is adjusted according to the sliding of the page, the scroll bar changes position according to the sliding of the page, and when the sliding page is static, the scroll bar is static and gradually disappears.
At present, when the page slides, the position of the scroll bar can be changed according to the sliding of the page, and after the page is static, the scroll bar can gradually disappear. The process of changing the position of the scroll bar and the process of disappearing the scroll bar are animation display processes, and the power consumption of the equipment is larger.
Disclosure of Invention
The embodiment of the application provides a display method of a scroll bar and electronic equipment, which are used for reducing power consumption in a page sliding process.
In order to achieve the above purpose, the embodiment of the present application adopts the following technical scheme:
in a first aspect, the present application provides a method for displaying a scroll bar, applied to an electronic device, where the method includes: a first interface of a first application is displayed, the first interface including a corresponding scroll bar and first region. The first area may be a partial area of the first interface or an entire area of the first interface. Receiving a first operation of sliding the first region; in response to a first operation, the first region and the scrollbar slide; wherein, when the first area is stationary, the scroll bar is stationary, and the vanishing animation is displayed on the first interface; if the first application is a preset application, the vanishing animation is a first vanishing animation, and the duration of the first vanishing animation is a first duration; if the first application is not the preset application, the disappearing animation is a second disappearing animation, the duration of the second disappearing animation is a second duration, and the first duration is smaller than the second duration.
The power consumption of the preset application in the page sliding process is smaller than that of the non-preset application in the page sliding process because the first time period is smaller than the second time period. That is, the application achieves the effect of reducing the overall power consumption of the electronic device by reducing the power consumption of the preset application.
In one implementation manner provided in the first aspect, before displaying the first interface of the first application, the method further includes: acquiring a blanking parameter of a first application; if the first application is a preset application, the blanking parameters of the first application comprise first blanking parameters, and if the first application is not the preset application, the blanking parameters of the first application comprise second blanking parameters, and the first blanking parameters are different from the second blanking parameters; before the first interface displays the disappearing animation, the method further comprises: and constructing the vanishing animation according to the blanking parameters of the first application.
In the embodiment of the application, the electronic equipment can construct the vanishing animation according to the blanking parameters of the first application, and the power consumption of the preset application and the power consumption of the non-preset application in the page sliding process are different due to the fact that the first blanking parameters and the second blanking parameters are different.
In an embodiment provided in the first aspect, the first blanking parameter includes a first duration and first transparency change information, the second blanking parameter includes a second duration and second transparency change information, the first transparency change information and the second transparency change information are both used for indicating a transparency change condition of the scroll bar, and a transparency mean value corresponding to the first transparency change information is greater than a transparency mean value corresponding to the second transparency change information; if the first application is a preset application, constructing the vanishing animation according to the blanking parameter of the first application includes: constructing a first vanishing animation according to the first duration and the first transparency change information; if the first application is not the preset application, constructing the vanishing animation according to the blanking parameter of the first application includes: and constructing a second vanishing animation according to the second duration and the second transparency change information.
The power consumption of the electronic device for displaying the first vanishing animation is lower than that of the electronic device for displaying the second vanishing animation because the first time is shorter than the second time. Further, since the transparency mean value corresponding to the first transparency change information is smaller than the transparency mean value corresponding to the second transparency change information, and the lower the visibility of the scroll bar is, the lower the consumed power consumption is, the lower the power consumption of the electronic device for displaying the first disappearing animation is, so that the power consumption of the preset application is lower than the power consumption of the non-preset application.
In an implementation manner provided in the first aspect, the first blanking parameter packet further includes a third duration, and the second blanking parameter packet further includes a fourth duration, where the third duration is less than the fourth duration; if the first application is a preset application, displaying the vanishing animation on the first interface, including: displaying a first disappearing animation on the first interface at the end of a third period of time since the scrollbar was stationary; if the first application is not the preset application, displaying the disappearing animation on the first interface, including: at the end of the fourth time period since the scrollbar was stationary, a second disappearing animation is displayed on the first interface.
In the embodiment of the application, by shortening the time of gradually disappearing after the rolling bar is stationary (namely, the third time length is smaller than the fourth time length), the rolling bar of the preset application can disappear rapidly after rolling, the draggy feeling caused by the fact that the rolling bar is delayed and not disappeared is reduced, and the user experience is improved.
In one embodiment provided in the first aspect, the method further comprises: acquiring interface configuration information of a first application, wherein the interface configuration information of the first application comprises a control included in an interface of the first application and a display mode adopted by the control; obtaining a blanking parameter of a first application, including: if the interface of the first application comprises a scroll bar adopting a preset display mode, acquiring blanking parameters of the first application.
It can be understood that, for an application that does not include a scroll bar in a preset display manner in the interface, the sliding process of the scroll bar or the disappearing process of the scroll bar after standing are not involved in the interface of the application, so that the blanking parameters of the application do not need to be acquired, unnecessary I/O operations are reduced, and I/O resources are saved.
In one embodiment provided in the first aspect, the method further comprises: when the scroll bar slides, a sliding animation is displayed on the first interface, the sliding animation including an animation of the first region and the scroll bar sliding.
In an implementation manner provided in the first aspect, the electronic device includes a sliding control and a view controller, and constructs a vanishing animation according to a blanking parameter of the first application, including: the sliding control sends a parameter acquisition request to the view controller; if the blanking parameters of the first application comprise first blanking parameters, the view controller sends the first blanking parameters to the sliding control, wherein the first blanking parameters comprise first duration, first transparency change information and third duration; the sliding control constructs a first vanishing animation according to the first duration and the first transparency change information; displaying a disappearing animation at a first interface, comprising: the slider control displays the first disappearing animation at the end of the third time period since the scrollbar was stationary.
According to the foregoing, if the first application is the preset application, the blanking parameters of the first application include the first blanking parameters, otherwise include the second blanking parameters. The view controller preferentially sends the first blanking parameter to the sliding control when the blanking parameter of the first application comprises the first blanking parameter, and sends the second blanking parameter to the sliding control when the blanking parameter of the first application does not comprise the first blanking parameter, so that the effect of providing the first blanking parameter for preset applications and providing the second blanking parameter for non-preset applications is achieved.
In an implementation manner provided in the first aspect, the constructing a vanishing animation according to the blanking parameters of the first application further includes: if the blanking parameters of the first application do not include the first blanking parameters, the view controller sends second blanking parameters to the sliding control, wherein the second blanking parameters include a second duration, second transparency change information and a fourth duration; constructing a second vanishing animation by the sliding control according to the second duration and the second transparency change information; displaying a disappearing animation at a first interface, comprising: the slider control displays a second disappearing animation at the end of a fourth time period since the scrollbar was stationary.
In an implementation manner provided in the first aspect, the electronic device further includes a power consumption policy application, and the obtaining the blanking parameter of the first application includes: responding to the operation of starting the first application, and sending a drawing instruction to the view controller by the first application; the view controller acquires interface configuration information of a first application, wherein the interface configuration information of the first application comprises a control and a display mode adopted by the control, wherein the control is included in an interface of the first application; the view controller judges whether a scroll bar using a preset display mode is included in an interface of the first application; if the interface of the first application comprises a scroll bar in a preset display mode, the view controller sends an instruction for acquiring blanking parameters to the power consumption strategy application; and if the first application is a preset application, the power consumption strategy application sends a first blanking parameter to the view controller.
In an implementation manner provided in the first aspect, obtaining the blanking parameter of the first application further includes: if the first application is not the preset application, the power consumption strategy application sends feedback information to the view controller, wherein the feedback information does not carry the first blanking parameter; the view controller obtains a second blanking parameter.
In a second aspect, the present application further provides a method for displaying a scroll bar, which is applied to an electronic device, and the method includes: displaying a first interface of a first application, the first interface including a scroll bar; receiving a first operation of a sliding scroll bar; in response to the first operation, displaying a scroll animation on the first interface when the scroll bar is slid, and displaying a vanishing animation on the first interface when the scroll bar is stationary;
wherein, the disappearing animation is a first disappearing animation under the condition that the first application is a preset application, and the duration of the first disappearing animation is a first disappearing duration; and if the first application is not the preset application, the disappearing animation is a second disappearing animation, the duration of the second disappearing animation is a second disappearing duration, and the first disappearing duration is smaller than the second disappearing duration.
In a third aspect, the present application also provides an electronic device, including: a memory and a processor; the processor is coupled with the memory; wherein the memory is for storing computer program code, the computer program code comprising computer instructions; the computer instructions, when executed by a processor, cause an electronic device to perform the method as in any of the embodiments of the first and second aspects.
In a fourth aspect, the present application also provides a computer-readable storage medium comprising computer instructions; when executed on an electronic device, the computer instructions cause the electronic device to perform the method as in any of the embodiments of the first and second aspects.
In a fifth aspect, the present application provides a computer program product for, when run on a terminal device, causing the terminal device to perform a method as in the first aspect, the second aspect and any of its embodiments.
The technical effects of any one of the design manners of the second aspect to the fifth aspect may be referred to the technical effects of the different design manners of the first aspect, and will not be repeated here.
Drawings
FIG. 1 is a schematic illustration of a page sliding process;
FIG. 2 is a set of interface schematic diagrams;
FIG. 3 is a schematic illustration of an interface;
FIG. 4 is a schematic diagram of the current consumption of the related art;
fig. 5A is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 5B is a schematic software structure of an electronic device according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a set of interfaces provided in an embodiment of the present application;
fig. 7 is a flowchart illustrating a method for displaying a scroll bar according to an embodiment of the present application;
Fig. 8 is a second flow chart of a method for displaying a scroll bar according to an embodiment of the present application;
fig. 9 is a flowchart illustrating a method for displaying a scroll bar according to an embodiment of the present application;
FIG. 10 is a schematic diagram of a page sliding process according to an embodiment of the present application;
fig. 11 is a schematic diagram of current consumption according to an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present application will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present application are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Currently, when the content is so large that the display screen of the electronic device cannot display all the content at one time, the electronic device may hide part of the content and display a scroll bar on the page, where the scroll bar is used to represent the position of the content currently displayed on the display screen in all the content. In response to receiving an operation of a user to slide a page, the electronic device may adjust content currently displayed according to the operation of the slide page, and adjust a position of a scroll bar according to the operation of the slide page. When the page slides, the scroll bar also scrolls; while the page is stationary, the scrollbar will be stationary and fade away.
Referring to fig. 1, a schematic diagram of a page sliding process is shown. In which fig. 1 illustrates a sliding process of a page by taking a search page of a browser as an example. As shown in fig. 1 (a), the interface 101 is a search page of a browser. Wherein the interface 101 may comprise a scroll bar 102. The scroll bar 102 is used to characterize the location of the content currently displayed by the display in all content. The position of the scroll bar 102 will vary as the position of the currently displayed content varies among all content. Optionally, the interface 101 may further include a search box and a content presentation area. Wherein the search box is used for the user to input keywords, such as "cat". The content display area is used for displaying content related to the keyword 'cat'.
In response to the user's up-slide operation, as shown in (b) in fig. 1, the position of the scroll bar 102 is changed from the position in the interface 101 to the position in the interface 103, and the currently displayed content is changed from the content in the interface 101 to the content in the interface 103. The interface 103 may be any interface in the page sliding process, for example, an interface when the page is sliding, or an interface when the page is stationary.
When the page is stationary, the scroll bar 102 is also stationary and begins to fade at the first time after the scroll bar 102 is stationary. For example, as shown in fig. 2, taking the interface 103 as an interface when the page is static as an example, the interface after the scroll bar 102 disappears is, for example, the interface 104, where two stages need to be performed from the interface 102 to the interface 104, respectively: stage 1, which includes the time when the scroll bar 102 just is stationary to a first time, during which the scroll bar 102 is in a stationary state; and phase 2, comprising a first moment to a second moment, during which the scroll bar 102 gradually disappears. For example, when the time difference between the moment when the scroll bar 102 is just stationary and the first moment is 300ms and the time difference between the second moment and the first moment is 250ms, the mobile phone switches from the interface 102 to the interface 104 after 550ms of the interface 102 is displayed.
After the scroll bar 102 disappears, the user re-operates the page and the scroll bar 102 can be re-displayed. Illustratively, as shown by interface 105 in FIG. 3, when the user re-manipulates the page, scrollbar 102 is re-displayed, with the position of scrollbar 102 being the position shown by interface 105.
Referring to fig. 4, a schematic diagram of current consumption during page sliding is shown. Wherein there is one page swipe during 0-t 4. Wherein, during the period of 0-t 1, the page and the scroll bar slide; at time t1, the page and the scroll bar stop sliding (i.e. the page and the scroll bar are stationary); during t 1-t 2, the page, scroll bar remain stationary; during the period from t2 to t3, the scroll bar gradually disappears, and at the moment t3, the scroll bar completely disappears; during t 3-t 4, the page remains stationary.
As can be seen from fig. 4, there are two current consumption times during the page sliding, respectively, during the period of 0 to t1 and during the period of t1 to t 2. In the case where the time difference between the time t1 and the time t2 is 0.25s, the average current in the period t2 to t3 is 441.23mA (milliamperes), and the average current in the period t1 to t2 is 325mA, the current consumption in the period t1 to t2 is: (441.23-325)/(0.25) ≡29mAs ≡0.008 mAh). That is, each time the page slides, a loss of 0.008mAh is caused, so that the power consumption of the electronic device increases.
It can be seen that the related art has increased power consumption of the electronic device because there is a process of gradually disappearing the scroll bar after the page is stationary.
In view of this, the embodiment of the application provides a method for displaying a scroll bar, which shortens the time required by the scroll bar disappearance process (i.e. the time period from t2 to t3 in fig. 4) so that the scroll bar disappears rapidly, thereby achieving the effect of reducing the power consumption.
In the embodiment of the application, the electronic equipment can also shorten the time difference (namely the duration of t 1-t 2 in fig. 4) between the moment when the scroll bar is stationary and the moment when the scroll bar begins to disappear, so that the effect that the scroll bar can disappear synchronously when the page is stationary is achieved, and the man-machine interaction experience of a user is improved.
It should be noted that, the electronic device provided in the embodiments of the present application may be a device such as a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (personal digital assistant, PDA), an augmented reality (augmented reality, AR) device, a Virtual Reality (VR) device, an artificial intelligence (artificial intelligence, AI) device, a wearable device, a vehicle-mounted device, an intelligent home device, and/or a smart city device, and the specific type of the electronic device is not limited in the embodiments of the present application.
Fig. 5A is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 5A, the electronic device may include: processor 110, external memory interface 120, internal memory 121, universal serial bus (universal serial bus, USB) interface 130, charge management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headset interface 170D, sensor module 180, keys 190, motor 191, indicator 192, camera 193, display 194, and subscriber identity module (subscriber identification module, SIM) card interface 195, etc.
The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural hub and command center of the electronic device. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces 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 (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
It should be understood that the connection relationship between the modules illustrated in this embodiment is only illustrative, and does not limit the structure of the electronic device. In other embodiments, the electronic device may also use different interfacing manners in the foregoing embodiments, or a combination of multiple interfacing manners.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 121 may be used to store computer executable program code including instructions. The processor 110 executes various functional applications of the electronic device and data processing by executing instructions stored in the internal memory 121. For example, in an embodiment of the present application, the processor 110 may include a storage program area and a storage data area by executing instructions stored in the internal memory 121.
The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device (e.g., audio data, phonebook, etc.), and so forth. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like. For another example, the internal memory 121 may store power consumption policy configuration information, application information, and the like.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like. In some embodiments, the power management module 141 and the charge management module 140 may also be provided in the same device.
The wireless communication function of the electronic device may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like. In some embodiments, the antenna 1 and the mobile communication module 150 of the electronic device are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the electronic device can communicate with the network and other devices through wireless communication technology.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc. applied on an electronic device. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation.
The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication including WLAN (e.g., (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc. for application on an electronic device.
The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
The electronic device implements display functions via a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. 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 194 includes a display panel. The display 194 may be used to display pages, slide animations during the sliding of the scrollbar, disappearing animations after the scrollbar is stationary, other interfaces, etc.
The electronic device may implement shooting functions through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like. The ISP is used to process data fed back by the camera 193. The camera 193 is used to capture still images or video. In some embodiments, the electronic device may include 1 or N cameras 193, N being a positive integer greater than 1.
The electronic device may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc. The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys. Or may be a touch key. The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration alerting as well as for touch vibration feedback. The indicator 192 may be an indicator light, may be used to indicate a state of charge, a change in charge, a message indicating a missed call, a notification, etc. The SIM card interface 195 is used to connect a SIM card. The SIM card may be inserted into the SIM card interface 195, or removed from the SIM card interface 195 to enable contact and separation with the electronic device. The electronic device may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support Nano SIM cards, micro SIM cards, and the like.
The sensor module 180 may include a pressure sensor, a gyroscope sensor, a barometric sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.
It is to be understood that the configuration illustrated in this embodiment does not constitute a specific limitation on the electronic apparatus. In other embodiments, the electronic device may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The software system of the electronic device may adopt a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. Here, the software structure of the electronic device is exemplified in a layered architecture shown in fig. 5B.
The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate via interfaces. In some embodiments, the terminal device may include an application layer, an application framework layer, and a kernel layer. It should be noted that the layered architecture shown in fig. 5B is merely illustrative, and that in different operating systems (e.g. android TM A system, an IOS system, etc.), the scheme of the present application can be implemented as long as the functions implemented by the respective functional modules are similar to those of the embodiment of the present application.
The application layer may include a series of applications, among others. As shown in fig. 5B, the application layer may include applications such as desktop (desktop), browser, power consumption policy, and the like. Among other things, the power consumption policy application may be used to provide various policies for reducing the power consumption of a device, such as power consumption policy configuration information.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer also includes some predefined functions. As shown in FIG. 5B, the application framework layer may include a view controller (ViewRootImpl), an activity management service (activity manager service, AMS), and a slider control, among others.
The view controller is used for loading page layout of an application, drawing pages and the like. The campaign management service is used to pull (launch) applications. The slide control is used for constructing and displaying a slide animation, a vanishing animation, and the like according to the slide configuration information of the application.
The kernel layer is a layer between hardware and software. The kernel layer at least contains display drivers and the like.
As shown in fig. 5B, the electronic device further includes a hardware layer. The hardware layers may include the display 194 described above.
The following describes in detail a display method of a scroll bar according to an embodiment of the present application with reference to the accompanying drawings.
The method for displaying a scroll bar according to the embodiment of the present application may be divided into two processes of obtaining a blanking parameter, and constructing and displaying a vanishing animation according to the blanking parameter, and the two processes will be described in detail below.
In the embodiment of the application, the electronic device can acquire the blanking parameters of the first application after the first application is started.
The blanking parameters include, among others, a disappearing period of the scroll bar, a time interval between a time when the scroll bar is stationary and a time when the scroll bar starts to disappear (hereinafter, simply referred to as a time interval), transparency change information of the scroll bar, and the like. The time when the scroll bar is stationary is the time when the scroll bar is switched from the sliding state to the stationary state.
Wherein the disappearing process of the scroll bar may be embodied by a disappearing animation including all image frames of the scroll bar from the beginning of disappearing to the complete disappearing process. The disappearing duration of the scroll bar is the duration of the disappearing animation and is used for representing the duration required by the scroll bar from the beginning of disappearing to the complete disappearing.
In an alternative embodiment, the disappearance of the scroll bar may be achieved by adjusting the transparency of the scroll bar. The process from the beginning of the disappearance of the scroll bar to the complete disappearance is understood as the process of changing the transparency of the scroll bar from the maximum value (not 0) to 0.
The time interval may be used to determine the moment when the scrollbar starts to disappear. For example, if the time interval is 0ms, the mobile phone may play a disappearing animation at the moment the scroll bar is stationary, so that the scroll bar starts to fade at the moment it is stationary. For another example, if the vanishing time is 30ms, the mobile phone may play the vanishing animation at 30ms after the scroll bar is stationary, so that the scroll bar starts to vanish gradually at 30ms after the scroll bar is stationary.
The transparency change information of the scroll bar is used for reflecting the transparency of the scroll bar corresponding to each moment in time in the process of gradually disappearing the scroll bar. Wherein, as time increases, the transparency of the scroll bar gradually increases to achieve the effect of gradually disappearing the scroll bar. It will be appreciated that the greater the transparency of the scrollbar, the lower the visibility of the scrollbar. For example, the transparency at the time when the scroll bar just starts to disappear is 0% and the transparency at the time when the scroll bar disappears is 100%, so that the scroll bar changes from visible to invisible.
In an alternative embodiment, the transparency change information may be presented in the form of a curve.
In an alternative embodiment, the first blanking parameter and the second blanking parameter are pre-stored in the electronic device. The first blanking parameter is a blanking parameter that can be used by a preset application, and the second blanking parameter is a blanking parameter that can be used by all applications (including the preset application and a non-preset application), for example, a system default blanking parameter.
The first blanking parameter includes a first vanishing time period (also referred to as a first time period), a first time interval (also referred to as a third time period), and first transparency change information, and the second blanking parameter includes a second vanishing time period (also referred to as a second time period), a second time interval (also referred to as a fourth time period), and second transparency change information.
In an alternative embodiment, the first vanishing period may be identified by an android: scrollbar duration in milliseconds; the first time interval may be in milliseconds by an android: scrolllbardefaultDelayBeforeFade.
The first vanishing duration is smaller than the second vanishing duration, and the first time interval is smaller than the second time interval. The first transparency change information is the same as the second transparency change information, or the transparency mean value corresponding to the first transparency change information is larger than the transparency mean value corresponding to the second transparency change information.
In the embodiment of the application, the electronic device can judge whether the first application is a preset application. If the first application is a preset application, the electronic device may acquire a first blanking parameter, that is, the blanking parameter of the first application includes the first blanking parameter; if the first application is not the preset application, the electronic device may acquire the second blanking parameter, that is, the blanking parameter of the first application includes the second blanking parameter.
The electronic equipment is pre-stored with application information, and the application information comprises application identifiers of preset applications. The electronic equipment can judge whether the application information comprises the application identifier of the first application, and if the application information comprises the application identifier of the first application, the first application is indicated to be a preset application; and if the application information does not comprise the application identifier of the first application, indicating that the first application is not the preset application.
It should be noted that the application identifier may include an application ID, an application name, a packet name of the application, and the like, which is not particularly limited herein.
In another alternative embodiment, the electronic device stores power consumption policy configuration information, where the power consumption policy configuration information includes an application identifier and a blanking parameter corresponding to the application identifier.
In the embodiment of the application, the power consumption policy configuration information may exist in a form of a table. Illustratively, the power consumption policy configuration information may include contents as shown in table 1.
TABLE 1
For example, if the application identifier of the first application is ID1, the electronic device may obtain the blanking parameter 1 from the power consumption policy configuration information, that is, the blanking parameter of the first application includes: the vanishing time period is 20ms, the time interval is 0ms, and the transparency change information is curve 1. If the application identifier of the first application is not ID1, ID2 and ID3, the electronic device may obtain the blanking parameter 2 from the power consumption policy configuration information, that is, the blanking parameter of the first application includes: the vanishing time is 250ms, the time interval is 300ms, and the transparency change information is curve 2.
The application identified as ID1, ID2 or ID3 is the preset application, and the corresponding blanking parameter 1 is the first blanking parameter; the application with the application identifier not being ID1, ID2 and ID3 is a non-preset application, and the corresponding blanking parameter 2 is a second blanking parameter.
In the embodiment of the application, after the electronic device starts the first application, a first interface can be displayed, and the first interface comprises a corresponding scroll bar and a first area. Wherein a corresponding scroll bar and first area may be understood as a scroll bar for indicating the position of the displayed content in the first area among all the content.
The electronic device may receive a first operation by a user to slide the first region, and in response to the first operation, the first region and the scroll bar slide.
In an alternative embodiment, the first area may be the entire area where the first interface is located. For example, the first application is the browser application shown in fig. 1, the first interface may be the interface 101 in fig. 1, the first area is an area where the interface 101 is located, and the first operation of the user sliding the first area may be a sliding operation of the user on the interface 101.
In another alternative embodiment, the first region may be a partial region of the first interface. For example, as shown in fig. 6 (a), the first interface may be an interface 601, the interface 601 including a scroll bar 602 and a first region 603. As shown in (b) of fig. 6, in response to the user's operation of sliding the first region 603, both the first region 603 and the scroll bar 602 slide.
In the embodiment of the application, when the first area and the scroll bar slide, the electronic equipment can display a sliding animation on the first interface.
Wherein the sliding animation comprises a sliding animation of an element on the first interface, which may comprise a scroll bar, content displayed on the first interface, or the like.
In the embodiment of the application, when the first area and the scroll bar are static, the electronic equipment can construct the vanishing animation according to the blanking parameters of the first application and display the vanishing animation on the first interface.
In the embodiment of the present application, if the first application is a preset application, the blanking parameters of the first application include a first vanishing duration, first transparency change information and a first time interval. Thus, the electronic device may construct a first vanishing animation according to the first vanishing time period and the first transparency change information, and display the first vanishing animation at the end of the first time interval when the scroll bar is stationary.
If the first application is not the preset application, the blanking parameters of the first application include a second vanishing duration, second transparency change information and a second time interval. Thus, the electronic device may construct a second vanishing animation according to the second vanishing time period and the second transparency change information, and display the second vanishing animation at the end of the second time interval when the scroll bar is stationary.
Therefore, the application achieves the effect of reducing the power consumption of the equipment by shortening the disappearing time of the scroll bar of the preset application.
Optionally, the electronic device may first obtain the interface configuration information of the first application before obtaining the blanking parameter of the first application.
In an alternative embodiment, the electronic device may obtain the interface configuration information of the first application from the data packets of the plurality of applications according to the application identifier of the first application. The interface configuration information includes page layouts of a plurality of interfaces related to the first application, for example, a control included in each interface, a display mode of the control, a position and a size of the control, and the like.
The controls included in the interface may include scroll bars, text-type controls, button-type controls, picture controls, and the like. For example, a scroll bar may be represented by a scroll view (ScrollView) field, a text class control may be represented by a text box (TextView) field, a Button class control may be represented by a Button (Button) field, and a picture control may be represented by a picture view (ImageView) field.
Wherein, different values of the field can be used to characterize whether the control corresponding to the field is included in the interface. For example, a value of 1 for the ScrollView field may indicate that a scrollbar is included in the interface of the first application; the value of the ScrollView field is 0, which may indicate that a scroll bar is not included in the interface of the first application. Other fields are the same and are not described in detail herein. In addition, the value of the field may be other, such as true, false, etc.
The display modes of the control may include disappearing after display (may also be referred to as a first display mode or a preset display mode) and not disappearing after display (may also be referred to as a second display mode).
Wherein, the disappearing after displaying means that the control can disappear after displaying the control; non-vanishable after display means that the control does not vanish after the control is displayed. For example, if the display mode of the scroll view in the interface configuration information is fade (disappearing), it indicates that the display mode of the scroll bar is disappearable after display; if the scroll view in the interface configuration information is displayed in the default (non-vanishing) manner, the scroll bar is displayed in the non-vanishing manner.
The position of the control can be represented by coordinates, and the coordinates can take the upper left corner of the display screen as an origin of coordinates, take the direction of the width of the display screen as an x axis and take the direction of the height of the display screen as a y axis as a reference coordinate system.
The size of the control may be represented by a width by a height.
In an alternative embodiment, the electronic device may obtain the blanking parameter of the first application in case a scroll bar is included in the interface of the first application. And in the case that the scroll bar is not included in the interface of the first application, not acquiring the blanking parameter of the first application.
It can be appreciated that, in the case that the interface of the first application does not include a scroll bar, the operation on the scroll bar will not necessarily be involved in the process of using the first application by the user, and the electronic device does not need to display the disappearing animation of the scroll bar after the page is stationary, so that unnecessary actions of the electronic device and consumption of CPU resources and memory resources can be reduced without acquiring the blanking parameters of the first application.
In an alternative embodiment, the electronic device may include a scroll bar in the interface of the first application, and obtain the blanking parameter of the first application when the scroll bar is displayed in a manner that the scroll bar disappears after display. And if the interface of the first application does not include a scroll bar or the interface of the first application includes a scroll bar and the display mode of the scroll bar is non-vanishable after display, not acquiring the blanking parameter of the first application.
It can be understood that, when the interface of the first application does not include a scroll bar, or when the interface of the first application includes a scroll bar and the display mode of the scroll bar is non-vanishable after display, the electronic device does not need to display the vanishing animation of the scroll bar after the page is static, so that unnecessary actions of the electronic device can be reduced and consumption of CPU resources and memory resources can be reduced without acquiring the blanking parameters of the first application.
Optionally, if the first application is a preset application, the electronic device may further acquire a second blanking parameter, that is, the blanking parameter of the first application includes the first blanking parameter and the second blanking parameter. Therefore, if the electronic device cannot acquire the first blanking parameter when constructing the vanishing animation, the vanishing animation can be constructed according to the second blanking parameter, so that the risk that the scroll bar cannot vanish due to the lack of the blanking parameter is reduced.
Referring to fig. 7, a flowchart of a method for displaying a scroll bar according to an embodiment of the application is shown. Fig. 7 shows a specific procedure in which the electronic device acquires the blanking parameters of the first application. As shown in fig. 7, the scroll bar display method includes S701 to S712.
S701, the desktop receives an operation of starting the first application by the user.
The desktop comprises icons of a plurality of applications, and the plurality of applications comprise a first application. The operation of the user to launch the first application may be an operation of the user to click an icon of the first application.
S702, the desktop sends an instruction for starting the first application to the activity management service.
In an alternative embodiment, the instruction for starting the first application includes an application identifier of the first application.
S703, the activity management service starts the first application.
The activity manager may initiate an activity (activty) of the first application according to the application identification of the first application to initiate the first application.
S704, the first application sends a drawing instruction to the view controller.
The drawing instruction carries an application identifier of the first application.
S705, the view controller obtains interface configuration information of the first application.
In the embodiment of the application, the view controller can inquire the data packet of the first application according to the application identifier of the first application and acquire the interface configuration information of the first application from the data packet of the first application.
S706, the view controller draws a second interface of the first application according to the interface configuration information of the first application.
The second interface may be a first interface displayed after the first application is started.
It should be noted that the first interface and the second interface may be the same interface or may be different interfaces, which is not particularly limited herein.
S707, the view controller determines whether the interface of the first application includes a scroll bar using the first display mode.
If the interface of the first application includes a scroll bar using the first display mode, S708 is executed; if the interface of the first application does not include the scroll bar using the first display mode, the interface of the first application is indicated not to involve the process of scroll bar disappearance, so that the view controller may not need to acquire the blanking parameter.
S708, the view controller sends an instruction to acquire the blanking parameter to the power consumption policy application.
The instruction for obtaining the blanking parameter carries an application identifier of the first application, for example, a name of a data packet of the first application.
S709, the power consumption strategy application judges whether the first application is a preset application.
In an alternative embodiment, after the power consumption policy application receives the instruction for acquiring the blanking parameter, application information may be acquired, where the application information includes an application identifier of a preset application.
The power consumption policy application can judge whether the application information comprises the application identifier of the first application, and if the application information comprises the application identifier of the first application, the power consumption policy application indicates that the first application is a preset application; and if the application information does not comprise the application identifier of the first application, indicating that the first application is not the preset application.
In the embodiment of the present application, if the first application is a preset application, the power consumption policy application executes S710; if the first application is not, the power consumption policy application may send feedback information to the view controller, which may be null.
S710, the power consumption policy application sends a first blanking parameter to the view controller.
S711, the view controller acquires the second blanking parameter.
In an alternative embodiment, the view controller may obtain the second blanking parameter from a configuration file of the operating system.
If the interface of the first application includes a scroll bar using the first display mode, the view controller may further perform S711.
It should be noted that, there is no strict sequence between S711 and S708 to S710, and the view controller may execute S711 first and then execute S708 to S710, or execute S708 to S710 first and then execute S711, or may execute S711 simultaneously, which is not limited herein.
S712, the view controller stores the first blanking parameter and the second blanking parameter.
It may be appreciated that, if the first application is not the preset application, S710 may be replaced by the power consumption policy application sending feedback information to the view controller, where the feedback information may be null; s712 may be replaced with: the view controller stores a second blanking parameter.
That is, the electronic device may obtain the blanking parameters of the first application after the first application is booted. In addition, the blanking parameters of the first application are also different according to the type of the first application (preset application/non-preset application).
Fig. 8 is a second flowchart of a method for displaying a scroll bar according to an embodiment of the present application. Fig. 8 shows a specific procedure in which the electronic device constructs, displaying a disappearing animation according to the blanking parameter. As shown in fig. 8, the scroll bar display method includes S801 to S811.
S801, a first application receives a first operation of a user sliding a page.
For example, the first application is the browser application shown in fig. 1, and the first operation of the user sliding the page may be the sliding operation of the user on the interface 101 in fig. 1.
S802, the first application sends a sliding instruction to the sliding control.
The sliding instruction carries sliding parameters. The sliding parameters may include a sliding distance corresponding to the first operation, a start coordinate of the first operation, an end coordinate of the first operation, and the like.
S803, the sliding control constructs and displays a sliding animation according to the sliding parameters.
In an embodiment of the present application, the sliding animation includes a sliding animation of an element on the first interface, which may include a scroll bar, content displayed on the first interface, and the like.
Wherein the sliding distance of the element on the first interface corresponds to the sliding distance corresponding to the first operation.
S804, the sliding control sends a parameter acquisition request to the view controller.
The parameter acquisition request carries an application identifier of the first application.
S805, the view controller determines whether the first blanking parameter is included in the blanking parameters of the first application.
According to the foregoing, the blanking parameters of the first application include the second blanking parameter or the first blanking parameter and the second blanking parameter according to whether the first application is a preset application or a non-preset application.
If the blanking parameter of the first application includes the first blanking parameter, then S806 is performed; if the blanking parameter of the first application does not include the first blanking parameter, S809 is performed.
S806, the view controller sends the first blanking parameter to the slider control.
S807, the slider control constructs a first vanishing animation according to the first vanishing time period and the first transparency change information.
S808, the slider control displays the first disappearing animation at the end of the first time interval from the rest of the scrollbar.
S809, the view controller sends a second blanking parameter to the slider control.
And S810, constructing a second vanishing animation by the sliding control according to the second vanishing time length and the second transparency change information.
S811, the slider control displays a second disappearing animation at the end of a second time interval from the rest of the scroll bar.
It can be appreciated that, since the first vanishing duration is smaller than the second vanishing duration defaulted by the system, the power consumption caused by the scroll bar vanishing process can be effectively reduced. In addition, as the first time interval is smaller than the second time interval, the scroll bar can disappear as soon as possible when being stationary, the phenomenon that the scroll bar is late and unresponsive is avoided to be brought to a user, and the human-computer interaction experience of the user is improved.
Referring to fig. 9, a flowchart of a method for displaying a scroll bar according to an embodiment of the present application is shown.
As shown in fig. 9, after the electronic device starts the first application, it may be determined whether the interface of the first application includes a scroll bar. If the interface of the first application comprises a scroll bar, further judging whether the display mode of the scroll bar is disappeared after display. If the interface of the first application does not include a scroll bar or the interface of the first application includes a scroll bar but the display mode is not disappeared after display, the electronic device does not acquire the blanking parameters of the first application. If the interface of the first application includes a scroll bar and the display mode of the scroll bar is disappeared after display, the electronic device may acquire the first blanking parameter and the second blanking parameter.
And the electronic device can detect whether the scroll bar slides, and can judge whether the first blanking parameter is acquired after detecting the scroll bar slides. If the electronic device acquires the first blanking parameter, the electronic device may construct a first vanishing animation according to the first vanishing duration and the first transparency change information, and display the first vanishing animation at the end of the first time interval from the rest of the scroll bar. If the electronic device acquires the second blanking parameter, the electronic device may construct a second vanishing animation according to the second vanishing duration and the second transparency change information, and display the second vanishing animation at the end of the second time interval from the rest of the scroll bar.
Exemplary, referring to fig. 10, a schematic diagram of a page sliding process according to an embodiment of the present application is provided. As shown in fig. 10 (a), the interface 301 is a search page of a browser. Wherein the interface 301 may comprise a scroll bar 302. In response to the user's up-slide operation, as shown in (b) in fig. 10, the position of the scroll bar 302 is changed from the position in the interface 301 to the position in the interface 303, and the currently displayed content is changed from the content in the interface 301 to the content in the interface 303. Taking interface 303 as an interface when the page is stationary as an example, the electronic device may display interface 304 20ms after interface 303 is displayed. As shown in fig. 10 (c), the scroll bar 302 has not been included in the interface 304, i.e., the scroll bar 302 has disappeared.
Referring to fig. 11, a schematic diagram of current consumption in the page sliding process shown in fig. 10 is shown. Wherein, the period of 0-t 4' corresponds to one page sliding. Wherein, during 0-t 1', the page and the scroll bar slide; at the time t1', the page and the scroll bar stop sliding; during t2 'to t3' the scrollbar quickly disappears, the consumed current being close to the current when the scrollbar is stationary.
As can be seen from fig. 11, the current consumed by the scroll bar extinction process is relatively close to the current consumed by the scroll bar at rest, and the power consumption of the page sliding process shown in fig. 11 is significantly lower than the current consumed by the scroll bar extinction process in fig. 4, which is higher than the current consumed by the scroll bar at rest.
In summary, the application achieves the purpose of reducing the power consumption of the preset application by shortening the disappearing duration of the scroll bar of the preset application.
The embodiment of the application also provides a chip system which comprises at least one processor and at least one interface circuit. The processors and interface circuits may be interconnected by wires. For example, the interface circuit may be used to receive signals from other devices (e.g., a memory of an electronic apparatus). For another example, the interface circuit may be used to send signals to other devices (e.g., processors). The interface circuit may, for example, read instructions stored in the memory and send the instructions to the processor. The instructions, when executed by a processor, may cause an electronic device or server to perform the various steps of the embodiments described above. Of course, the system-on-chip may also include other discrete devices, which are not particularly limited in accordance with embodiments of the present application.
The present embodiment also provides a computer-readable storage medium having stored therein computer instructions which, when executed on an electronic device, cause the electronic device to perform the functions or steps of the method embodiments described above.
The present embodiment also provides a computer program product which, when run on an electronic device, causes the electronic device to perform the functions or steps of the method embodiments described above.
In addition, embodiments of the present application also provide an apparatus, which may be embodied as a chip, component or module, which may include a processor and a memory coupled to each other; the memory is configured to store computer-executable instructions, and when the device is operated, the processor may execute the computer-executable instructions stored in the memory, so that the chip performs the functions or steps executed by the mobile phone in the above method embodiment.
The electronic device, the computer readable storage medium, the computer program product or the chip provided in this embodiment are used to execute the corresponding method provided above, so that the beneficial effects thereof can be referred to the beneficial effects in the corresponding method provided above, and will not be described herein.
From the foregoing description of the embodiments, it will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of functional modules is illustrated, and in practical application, the above-described functional allocation may be implemented by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to implement all or part of the functions described above.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts displayed as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated unit may be stored in a readable storage medium if implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present application and not for limiting the same, and although the present application has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present application without departing from the spirit and scope of the technical solution of the present application.
Claims (12)
1. A method of displaying a scroll bar, the method comprising:
displaying a first interface of a first application, wherein the first interface comprises a corresponding scroll bar and a first area;
receiving a first operation of sliding the first region;
in response to the first operation, the first region and the scrollbar slide; wherein, when the first area is stationary, the scroll bar is stationary, and a vanishing animation is displayed on the first interface;
if the first application is a preset application, the vanishing animation is a first vanishing animation, and the duration of the first vanishing animation is a first duration;
if the first application is not the preset application, the vanishing animation is a second vanishing animation, the duration of the second vanishing animation is a second duration, and the first duration is smaller than the second duration.
2. The method of claim 1, wherein prior to the displaying the first interface of the first application, the method further comprises:
acquiring blanking parameters of the first application; if the first application is a preset application, the blanking parameters of the first application comprise first blanking parameters, and if the first application is not the preset application, the blanking parameters of the first application comprise second blanking parameters, wherein the first blanking parameters are different from the second blanking parameters;
Before the first interface displays the disappearing animation, the method further comprises:
and constructing the vanishing animation according to the blanking parameters of the first application.
3. The method of claim 2, wherein the first blanking parameter includes the first duration and first transparency change information, the second blanking parameter includes the second duration and second transparency change information, the first transparency change information and the second transparency change information are each used to indicate a transparency change condition of the scroll bar, and a transparency mean value corresponding to the first transparency change information is greater than a transparency mean value corresponding to the second transparency change information;
if the first application is a preset application, the constructing the vanishing animation according to the blanking parameter of the first application includes:
constructing the first vanishing animation according to the first duration and the first transparency change information;
if the first application is not a preset application, the constructing the vanishing animation according to the blanking parameter of the first application includes:
and constructing the second vanishing animation according to the second duration and the second transparency change information.
4. The method of claim 3, wherein the first blanking parameter packet further comprises a third duration, wherein the second blanking parameter packet further comprises a fourth duration, and wherein the third duration is less than the fourth duration;
and if the first application is a preset application, displaying the vanishing animation on the first interface, including:
displaying the first disappearing animation on the first interface at the end of the third period of time since the rest of the scrollbar;
if the first application is not a preset application, displaying the vanishing animation on the first interface includes:
and displaying the second vanishing animation on the first interface at the end of the fourth time period from the rest of the scroll bar.
5. The method according to any one of claims 2-4, further comprising:
acquiring interface configuration information of the first application, wherein the interface configuration information of the first application comprises a control included in an interface of the first application and a display mode adopted by the control;
the obtaining the blanking parameter of the first application includes:
and if the interface of the first application comprises a scroll bar adopting a preset display mode, acquiring blanking parameters of the first application.
6. The method according to any one of claims 1-5, further comprising:
and when the scroll bar slides, displaying a sliding animation on the first interface, wherein the sliding animation comprises the first area and the animation of the scroll bar sliding.
7. The method of any of claims 2-6, wherein the electronic device comprises a slider control and a view controller, the constructing the vanishing animation according to the blanking parameters of the first application comprises:
the sliding control sends a parameter acquisition request to the view controller;
if the blanking parameters of the first application include a first blanking parameter, the view controller sends the first blanking parameter to the sliding control, wherein the first blanking parameter includes the first duration, first transparency change information and a third duration;
the sliding control constructs the first vanishing animation according to the first duration and the first transparency change information;
displaying the vanishing animation on the first interface, including:
the slider control displays the first disappearing animation at the end of the third time period since the scrollbar was stationary.
8. The method of claim 7, wherein the constructing the disappearing animation according to the blanking parameters of the first application further comprises:
if the first blanking parameter is not included in the blanking parameters of the first application, the view controller sends a second blanking parameter to the sliding control, wherein the second blanking parameter includes the second duration, second transparency change information and a fourth duration;
the sliding control constructs the second vanishing animation according to the second duration and the second transparency change information;
displaying the vanishing animation on the first interface, including:
the slider control displays the second disappearing animation at the end of the fourth time period from the rest of the scrollbar.
9. The method of claim 7 or 8, wherein the electronic device further comprises a power consumption policy application, and wherein the obtaining the blanking parameters of the first application comprises:
in response to an operation of starting the first application, the first application sends a drawing instruction to the view controller;
the view controller obtains interface configuration information of a first application, wherein the interface configuration information of the first application comprises a control included in an interface of the first application and a display mode adopted by the control;
The view controller judges whether a scroll bar using a preset display mode is included in an interface of a first application;
if the interface of the first application comprises a scroll bar using a preset display mode, the view controller sends an instruction for acquiring a blanking parameter to the power consumption strategy application;
and if the first application is a preset application, the power consumption strategy application sends the first blanking parameter to the view controller.
10. The method of claim 9, wherein the obtaining the blanking parameters of the first application further comprises:
if the first application is not a preset application, the power consumption strategy application sends feedback information to the view controller, wherein the feedback information does not carry the first blanking parameter;
the view controller obtains a second blanking parameter.
11. An electronic device, the electronic device comprising: a memory and a processor; the processor is coupled with the memory; wherein the memory is for storing computer program code, the computer program code comprising computer instructions; the computer instructions, when executed by the processor, cause the electronic device to perform the method of any of claims 1-10.
12. A computer-readable storage medium comprising computer instructions; the computer instructions, when run on an electronic device, cause the electronic device to perform the method of any one of claims 1-10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310852422.0A CN117076017A (en) | 2023-07-11 | 2023-07-11 | Scroll bar display method and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310852422.0A CN117076017A (en) | 2023-07-11 | 2023-07-11 | Scroll bar display method and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117076017A true CN117076017A (en) | 2023-11-17 |
Family
ID=88708668
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310852422.0A Pending CN117076017A (en) | 2023-07-11 | 2023-07-11 | Scroll bar display method and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117076017A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103391362A (en) * | 2013-07-11 | 2013-11-13 | Tcl通讯(宁波)有限公司 | Application classifying method based on power consumption and mobile terminal |
CN111324407A (en) * | 2020-01-23 | 2020-06-23 | 努比亚技术有限公司 | Animation display method, terminal and computer readable storage medium |
CN111338732A (en) * | 2020-02-24 | 2020-06-26 | 北京辰森世纪科技股份有限公司 | Display method and device for long list page |
CN112416231A (en) * | 2020-10-20 | 2021-02-26 | 华为技术有限公司 | Scroll bar display method and device, electronic equipment and readable storage medium |
CN113254132A (en) * | 2021-05-24 | 2021-08-13 | 青岛海信移动通信技术股份有限公司 | Application display method and related device |
CN114489879A (en) * | 2021-08-12 | 2022-05-13 | 荣耀终端有限公司 | Display method of playing interface and electronic equipment |
CN115798390A (en) * | 2023-02-01 | 2023-03-14 | 荣耀终端有限公司 | Screen display method and terminal equipment |
-
2023
- 2023-07-11 CN CN202310852422.0A patent/CN117076017A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103391362A (en) * | 2013-07-11 | 2013-11-13 | Tcl通讯(宁波)有限公司 | Application classifying method based on power consumption and mobile terminal |
CN111324407A (en) * | 2020-01-23 | 2020-06-23 | 努比亚技术有限公司 | Animation display method, terminal and computer readable storage medium |
CN111338732A (en) * | 2020-02-24 | 2020-06-26 | 北京辰森世纪科技股份有限公司 | Display method and device for long list page |
CN112416231A (en) * | 2020-10-20 | 2021-02-26 | 华为技术有限公司 | Scroll bar display method and device, electronic equipment and readable storage medium |
CN113254132A (en) * | 2021-05-24 | 2021-08-13 | 青岛海信移动通信技术股份有限公司 | Application display method and related device |
CN114489879A (en) * | 2021-08-12 | 2022-05-13 | 荣耀终端有限公司 | Display method of playing interface and electronic equipment |
CN115798390A (en) * | 2023-02-01 | 2023-03-14 | 荣耀终端有限公司 | Screen display method and terminal equipment |
Non-Patent Citations (2)
Title |
---|
__代码改变世界__: "App功耗优化", Retrieved from the Internet <URL:https://blog.csdn.net/zhang522802884/article/details/78744536> * |
袁宜霞: "移动终端App电量测试与优化", 电脑知识与技术, vol. 18, no. 24, 15 August 2022 (2022-08-15), pages 67 - 68 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021000881A1 (en) | Screen splitting method and electronic device | |
WO2021063237A1 (en) | Control method for electronic device, and electronic device | |
KR102540111B1 (en) | Electronic device and method for operating electronic device | |
CN111182614B (en) | Method and device for establishing network connection and electronic equipment | |
CN114638605A (en) | Method and electronic equipment for near field wireless communication | |
CN110727381A (en) | Application switching method and electronic equipment | |
KR20160027778A (en) | Electronic apparatus and display method thereof | |
CN110830645B (en) | Operation method, electronic equipment and computer storage medium | |
KR20170051950A (en) | Electronic device and method for controlling display thereof | |
CN114756359A (en) | Image processing method and electronic equipment | |
KR20180028165A (en) | Method fog playing content and electronic device thereof | |
CN114900737B (en) | Video progress adjustment method, electronic device and computer readable storage medium | |
CN114741039A (en) | Device control method and terminal device | |
CN111158815A (en) | Dynamic wallpaper fuzzy method, terminal and computer readable storage medium | |
WO2022247638A1 (en) | Method for controlling connection of stylus, and electronic device | |
CN114077529B (en) | Log uploading method and device, electronic equipment and computer readable storage medium | |
CN117076017A (en) | Scroll bar display method and electronic equipment | |
CN115083400A (en) | Voice assistant awakening method and device | |
CN114265540B (en) | Sliding control method of electronic equipment and electronic equipment | |
CN116301416B (en) | Touch scanning method, touch screen and electronic equipment | |
WO2022252805A1 (en) | Display method and electronic device | |
WO2024152676A1 (en) | Window management method and electronic device | |
WO2023029985A1 (en) | Method for displaying dock bar in launcher and electronic device | |
WO2022237315A1 (en) | Display method and electronic device | |
WO2022237308A1 (en) | Display method and electronic device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |