This application claims priority to Chinese Patent Application No. 201910704755.2, filed with the China National Intellectual Property Administration on Jul. 31, 2019 and entitled “INTERFACE DISPLAY METHOD AND ELECTRONIC DEVICE”, which is incorporated herein by reference in its entirety.
The embodiments relate to the field of terminal technologies, and in particular, to an interface display method and an electronic device.
A full-screen technology is one of the hottest technologies at present. Full-screen mobile phones are loved and pursued by a majority of users. The full-screen technology is a relatively broad definition of design of a mobile phone with an ultra-high screen-to-body ratio in the display industry. Literally, the entire front of the mobile phone is a screen, a display interface of the mobile phone is completely covered by the screen, and no frames are designed at four frame positions of the mobile phone, to seek an ultra-high screen-to-body ratio of approximately 100%.
Because other indispensable basic function requirements of a mobile phone need to be met for front-facing sensor interaction components such as a mobile phone front-facing camera, a mobile phone receiver, a distance sensor, and a light sensor, in a process of designing a current full-screen mobile phone, these front-facing sensor interaction components are hidden below a screen, and display areas corresponding to these front-facing sensor interaction components on the display may have different display effects from another area on the screen. Consequently, a sense of fragmentation may occur on the screen of the mobile phone. As shown in
In conclusion, how to alleviate the problem of the sense of fragmentation occurring on the screen of the full-screen mobile phone is a problem that urgently needs to be resolved at present.
The embodiments provide an interface display method and an electronic device, to resolve a problem of a sense of fragmentation on a screen in full-screen display in the conventional technology.
According to a first aspect, an embodiment provides an interface display method. The method may be applied to an electronic device in a full-screen display technology. The full-screen display means that the entire front of the electronic device is a screen, a display interface of the electronic device is completely covered by the screen, and no frames are designed at four frame positions of the electronic device, to seek an ultra-high screen-to-body ratio of approximately 100%. The method includes: first obtaining a first display position of a display shape of a front-facing sensor interaction component on a full-screen display; then searching a configuration file for a target function icon corresponding to the front-facing sensor interaction component, where the configuration file includes a display position, on the full-screen display, of a function icon corresponding to at least one function in an enabled state, and a second display position of the target function icon on the full-screen display is the same as or close to the first display position of the front-facing sensor interaction component on the full-screen display; and then displaying a processed target function icon on the full-screen display, where a display position of the processed target function icon is the same as or close to the first display position, and a display shape of the processed target function icon is the same as or similar to the display shape of the front-facing sensor interaction component on the full-screen display.
In the foregoing solution, the first display position of the display shape of the front-facing interaction component on the full-screen display is obtained, the configuration file is searched for the target function icon corresponding to the second display position that is the same as or close to the first display position, the shape of the target function icon is processed into a shape that is the same as or similar to that of the front-facing sensor interaction component corresponding to the first display position, and the position of the target function icon on the full-screen display is the same or close to the first display position. In this way, a sense of fragmentation of the full-screen display can be alleviated, and user experience of a user interface of a full-screen mobile phone can be improved.
The first display position may include a first width range and a first height range that are occupied by the display shape of the front-facing sensor interaction component on the display; the second display position includes a second width range and a second height range that are occupied by the target function icon on the display; and both a difference between the second width range and the first width range and a difference between the second height range and the first height range fall within specified ranges.
In the foregoing solution, the display position (that is, the width range and the height range that are occupied by the display shape) corresponding to the front-facing sensor interaction component on the full-screen display is the same as or close to the display position of the target function icon on the full-screen display. In this way, the front-facing sensor interaction component does not need to be separately displayed at a corresponding display position. Displaying the target function icon and the front-facing sensor interaction component at a same position or close positions can alleviate a sense of fragmentation of the full-screen display and improve user experience.
The front-facing sensor interaction component may include but is not limited to a front-facing camera, a receiver, a light sensor, and a distance sensor.
According to a second aspect, an embodiment provides an interface display method. The method may be applied to an electronic device in a full-screen display technology. The full-screen display means that the entire front of the electronic device is a screen, a display interface of the electronic device is completely covered by the screen, and no frames are designed at four frame positions of the electronic device, to seek an ultra-high screen-to-body ratio of approximately 100%. The method includes: obtaining a first display position of a display shape of a front-facing sensor interaction component on a full-screen display; obtaining a color and/or brightness of a user interface currently displayed on the full-screen display; and adjusting a display color and/or display brightness at the first display position to a color and/or brightness that are or is the same as or similar to the color and/or the brightness of the user interface currently displayed on the full-screen display.
In the foregoing solution, the first display position of the display shape of the front-facing sensor interaction component on the full-screen display and the color and/or the brightness of the current user interface are obtained, and the color and/or the brightness at the first display position are or is adjusted to color and/or brightness that are or is the same as or similar to the color and/or the brightness of the current user interface, so that a sense of fragmentation of the full-screen display can be alleviated, thereby improving user experience.
According to a third aspect, an electronic device is provided. The electronic device includes at least one front-facing sensor interaction component, a full-screen display, one or more processors, a memory, and one or more computer programs. The full-screen display is configured to: display a display shape of the front-facing sensor interaction component on the full-screen display, and display a function icon and/or a text of each function of the electronic device; and the one or more computer programs are stored in the memory, the one or more computer programs include instructions, and when the instructions are invoked and executed by the one or more processors, the electronic device can perform the method described in any one of the first aspect and the possible implementations of the first aspect or the second aspect.
According to a fourth aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores instructions, and when the instructions run on a computer, the computer performs the method in any one of the first aspect and the possible implementations of the first aspect or each implementation of the second aspect.
According to a fifth aspect, a computer program product including instructions is provided. When the computer program product runs on a computer, the computer performs the method in any one of the first aspect and the possible implementations of the first aspect or each implementation of the second aspect.
The following further describes in detail the embodiments with reference to the accompanying drawings.
The embodiments may be applied to a plurality of electronic devices. The electronic device may be a portable electronic device with functions of a personal digital assistant, a music player, and/or the like, for example, a mobile phone, a tablet computer, or a wearable device (such as a smart watch) that has a wireless communication function. An example embodiment of the portable electronic device includes but is not limited to a portable electronic device using iOS®, Android®, Microsoft®, or another operating system. Alternatively, the portable electronic device may be another portable electronic device, for example, a laptop (laptop) computer with a touch-sensitive surface (for example, a touch panel). It should be further understood that, in some other embodiments, the electronic device may alternatively be a desktop computer with a touch-sensitive surface (for example, a touch panel), but not a portable electronic device.
Front-facing sensor interaction components include but are not limited to a front-facing camera, a receiver, a light sensor, a distance sensor, and the like. These front-facing sensor interaction components are components with a function of collecting an image, sound, or the like on the front of an electronic device.
Currently, taking a front-facing camera of a mobile phone as an example, the electronic device may retain a position of the front-facing camera in a simple and crude manner of punching a hole, for example, on a currently used hole-punch screen. Consequently, a user experience effect of a user interface (UI) is poor, and a strong sense of fragmentation occurs. As shown in
The following first briefly describes a structure of an electronic device to which the embodiments may be applied, so that a person skilled in the art can easily understand a solution. For example, as shown in
The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a USB port 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communications module 151, a wireless communications module 152, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headset jack 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display 194, a SIM card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, an optical proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It can be understood that the structure shown in this embodiment does not constitute a limitation on the electronic device 100. In some other embodiments, the electronic device 100 may include more or fewer components than those shown in the figure, combine some components, split some components, or have different component arrangements. The components shown in the figure may be implemented by hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, a neural-network processing unit (NPU), and/or the like. Different processing units may be independent components or may be integrated into one or more processors.
The controller may be a nerve center and a command center of the electronic device 100. The controller may generate an operation control signal based on an instruction operation code and a time sequence signal, to complete control of instruction reading and instruction execution.
A memory may be further disposed in the processor 110 and is configured to store instructions and data. In some embodiments, the memory in the processor 110 is a cache. The memory may store instructions or data that has been used or is cyclically used by the processor 110. If the processor 110 needs to use the instructions or the data again, the processor 110 may directly invoke the instructions or the data from the memory. This avoids repeated access and reduces a waiting time of the processor 110, to improve system efficiency.
The processor 110 can run a prompt information display method provided in the embodiments, to reduce a probability that prompt information is eliminated because of an accidental touch of a user. When different components are integrated into the processor 110, for example, a CPU and the GPU are integrated, the CPU and the GPU may cooperate to perform an interface display method provided in the embodiments.
The display 194 is configured to display an image, a video, and the like. The display 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), a mini-LED, a micro-LED, a micro-OLED, quantum dot light emitting diodes (QLED), or the like. In some embodiments, the electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1. In this embodiment, the display 194 may be one integrated flexible display, or may be a spliced display including two rigid screens and one flexible screen located between the two rigid screens. The display 194 in this embodiment is a full-screen display, in other words, the entire front of the electronic device 100 is the screen, a display interface of the electronic device 100 is completely covered by the screen, no frames are designed at four frame positions of the mobile phone, to seek an ultra-high screen-to-body ratio of approximately 100%. The following embodiments are described by using the display 194. The display 194 herein may be a full-screen display.
The camera 193 (a front-facing camera, a rear-facing camera, or a camera that may serve as both a front-facing camera and a rear-facing camera) is configured to capture a static image or a video. The camera 193 may include photosensitive elements such as a lens group and an image sensor. The lens group includes a plurality of lenses (convex lenses or concave lenses) and is configured to: collect an optical signal reflected by a to-be-photographed object and transfer the collected optical signal to the image sensor. The image sensor generates an original image of the to-be-photographed object based on the optical signal.
The internal memory 121 may be configured to store computer-executable program code. The executable program code includes instructions. The processor 110 runs the instructions stored in the internal memory 121, to perform various function applications of the electronic device 100 and data processing. The internal memory 121 may include a program storage area and a data storage area. The program storage area may store an operating system, code of an application (for example, a camera application or a WeChat application), and the like. The data storage area may store data (for example, an image or a video collected by the camera application) created during use of the electronic device 100 and the like. The internal memory 121 may further store position information and the like stored in a configuration file in the embodiments.
In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory, for example, at least one magnetic disk storage device, a flash memory, and a universal flash storage (UFS).
The code of an algorithm provided in this embodiment may alternatively be stored in an external memory. In this case, the processor 110 may run, by using the external memory interface 120, the code that is of the algorithm and that is stored in the external memory, to perform accidental touch prevention processing on a touch operation.
The following describes functions of the sensor module 180.
The gyro sensor 180A may be configured to determine a motion posture of the electronic device 100. In some embodiments, angular velocities of the electronic device 100 around three axes (that is, an x axis, a y axis, and a z axis) may be determined by using the gyro sensor 180A. In other words, the gyro sensor 180A may be configured to detect a current motion state of the electronic device 100, for example, a shaken or static state.
The acceleration sensor 180B may detect accelerations in various directions (such as on three axes) of the electronic device 100. In other words, the gyro sensor 180A may be configured to detect the current motion state of the electronic device 100, for example, the shaken or static state.
The optical proximity sensor 180G may include, for example, a light-emitting diode (LED) and an optical detector such as a photodiode. The light-emitting diode may be an infrared light-emitting diode. The mobile phone emits infrared light by using the light-emitting diode. The mobile phone detects infrared reflected light from a nearby object by using the photodiode. When sufficient reflected light is detected, the mobile phone may determine that there is an object near the mobile phone. When insufficient reflected light is detected, the mobile phone may determine that there is no object near the mobile phone.
The gyro sensor 180A (or the acceleration sensor 180B) may send detected motion status information (for example, an angular velocity) to the processor 110. The processor 110 determines, based on the motion status information, whether the electronic device 100 is currently in a handheld state or a tripod state (for example, when the angular velocity is not 0, it indicates that the electronic device 100 is in the handheld state).
The fingerprint sensor 180H is configured to collect a fingerprint. The electronic device 100 may use a feature of the collected fingerprint to implement fingerprint-based unlocking, application lock access, fingerprint-based photographing, fingerprint-based call answering, and the like.
The touch sensor 180K is also referred to as a “touch panel”. The touch sensor 180K may be disposed on the display 194, and the touch sensor 180K and the display 194 form a touchscreen. The touch sensor 180K is configured to detect a touch operation performed on or near the touch sensor 180K. The touch sensor 180K may transfer the detected touch operation to the application processor, to determine a type of the touch event. A visual output related to the touch operation may be provided by using the display 194. In some other embodiments, the touch sensor 180K may alternatively be disposed on a surface of the electronic device 100 at a location different from a location of the display 194.
For example, the display 194 of the electronic device 100 displays a home screen, and the home screen includes icons of a plurality of applications (for example, a camera application and a WeChat application). The user taps the icon of the camera application on the home screen by using the touch sensor 180K, to trigger the processor 110 to open the camera application and turn on the camera 193. The display 194 displays an interface of the camera application, for example, a viewfinder interface. In this embodiment, when the display 194 displays prompt information, the processor 110 performs accidental touch prevention processing on a touch operation received by the touch sensor 180K.
A wireless communication function of the electronic device 100 may be implemented through the antenna 1, the antenna 2, the mobile communications module 151, the wireless communications module 152, the modem processor, the baseband processor, and the like.
The antenna 1 and the antenna 2 are configured to: transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 may be configured to cover one or more communication bands. Different antennas may be further multiplexed, to improve antenna utilization. For example, the antenna 1 may be multiplexed as a diversity antenna in a wireless local area network. In some other embodiments, the antenna may be used in combination with a tuning switch.
The mobile communications module 151 may provide a wireless communication solution that includes 2G/3G/4G/5G or the like and that is applied to the electronic device 100. The mobile communications module 151 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), and the like. The mobile communications module 151 may receive an electromagnetic wave through the antenna 1, perform processing such as filtering or amplification on the received electromagnetic wave, and transmit a processed electromagnetic wave to the modem processor for demodulation. The mobile communications module 151 may further amplify a signal modulated by the modem processor and convert the signal into an electromagnetic wave for radiation through the antenna 1. In some embodiments, at least some functional modules of the mobile communications module 151 may be disposed in the processor 110. In some embodiments, at least some functional modules of the mobile communications module 151 and at least some modules of the processor 110 may be disposed in a same device.
The modem processor may include a modulator and a demodulator. The modulator is configured to modulate a to-be-sent low-frequency baseband signal into a medium/high-frequency signal. The demodulator is configured to demodulate a received electromagnetic wave signal into a low-frequency baseband signal. Then, the demodulator transfers the low-frequency baseband signal obtained through demodulation to the baseband processor for processing. The low-frequency baseband signal is processed by the baseband processor, and then transferred to the application processor. The application processor outputs a sound signal by using an audio device (which is not limited to the speaker 170A, the receiver 170B, or the like), or displays an image or a video by using the display 194. In some embodiments, the modem processor may be an independent device. In some other embodiments, the modem processor may be independent of the processor 110 and is disposed in a same device as the mobile communications module 151 or another functional module.
The wireless communications module 152 may provide a wireless communication solution that includes a wireless local area network (WLAN) (for example, a wireless fidelity (Wi-Fi) network), Bluetooth (BT), a global navigation satellite system (GNSS), frequency modulation (FM), a near field communication (NFC) technology, an infrared (IR) technology, or the like and that is applied to the electronic device 100. The wireless communications module 152 may be one or more devices integrating at least one communications processing module. The wireless communications module 152 receives an electromagnetic wave through the antenna 2, performs frequency modulation and filtering processing on an electromagnetic wave signal, and sends a processed signal to the processor 110. The wireless communications module 152 may further receive a to-be-sent signal from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into an electromagnetic wave for radiation through the antenna 2.
In addition, the electronic device 100 may implement audio functions, for example, music playing and recording, by using the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headset jack 170D, the application processor, and the like. The electronic device 100 may receive an input of the button 190 and generate a key signal input related to a user setting and function control of the electronic device 100. The electronic device 100 may generate a vibration prompt (for example, an incoming call vibration prompt) by using the motor 191. The indicator 192 in the electronic device 100 may be an indicator light, may be configured to indicate a charging status and a power change, and may also be configured to indicate a message, a missed call, a notification, and the like. The SIM card interface 195 in the electronic device 100 is configured to connect to a SIM card. The SIM card may be inserted into the SIM card interface 195 or removed from the SIM card interface 195, to implement contact with or separation from the electronic device 100.
The interface display method provided in the embodiments may be applied to the foregoing electronic device shown in
In the descriptions of the embodiments, the terms “first” and “second” are merely intended for description and shall not be understood as an indication or implication of relative importance or implicit indication of a quantity of indicated features. Therefore, a feature limited by “first” or “second” may explicitly or implicitly include one or more features. In the descriptions of the embodiments, unless otherwise stated, “a plurality of” means two or more.
It should be noted that the front-facing camera is described as an example in the following descriptions of the embodiments. This is not limited. For example, another front-facing sensor interaction component such as a sensor may be used.
As shown in
A full-screen mobile phone in the embodiments is a full-screen mobile phone whose front-facing sensor interaction component is below a screen, in other words, an area corresponding to the front-facing sensor interaction component on the screen is a displayable area.
For example, an electronic device is a mobile phone, and a camera is a front-facing camera. On current full-screen mobile phones, front-facing cameras are generally placed in screen structures by using hole-punch screens. This design of a hardware structure provides a user with a relatively poor perception effect. In the embodiments, multiplexing may be performed on a display area of the front-facing camera on the screen and a function independent area on the screen, which may also mean that the hardware structure of the mobile phone is designed, so that the display area corresponding to the front-facing camera can be displayed in the function independent area on the screen.
It should be noted that, in an actual application, a position of the front-facing sensor interaction component may need to be adjusted by matching a position of a function icon or a text in a user interface.
In some embodiments, when the display area corresponding to the front-facing camera is displayed in a status bar area and the mobile phone is in a portrait mode, as shown in
As shown in
In the foregoing embodiment, for the electronic device, user interfaces in the landscape mode and the portrait mode may be the same, and pop-up directions of the front-facing camera 411 in the landscape mode and the portrait mode may be different.
Based on the descriptions in the foregoing embodiment, for front-facing sensor interaction components such as a front-facing camera 411, a mobile phone receiver, a distance sensor, and a light sensor, these front-facing sensor interaction components may be disposed in space inside a mobile phone in the embodiments. When a front-facing sensor interaction component needs to be used, an icon on the mobile phone may be correspondingly controlled or another instruction form may be used, to trigger the corresponding front-facing sensor interaction component to pop out of the mobile phone. After the front-facing sensor interaction component is used, an icon on the mobile phone is correspondingly controlled or another instruction form is used, to trigger the corresponding front-facing sensor interaction component to retract or hide inside the mobile phone. In this way, positions at which these front-facing sensor interaction components are disposed do not need to be avoided in a full-screen display interface, so that user experience of a user interface of the full-screen mobile phone is improved, and a sense of fragmentation is alleviated.
The foregoing embodiments are merely described by using a status bar as an example. A corresponding adjustment may be alternatively made based on a task bar, a virtual button area, or the like in this application. Details are not described herein.
In another embodiment, in addition to the foregoing described hardware design of the electronic device, an icon, a text, or the like displayed in an function-independent area may also be designed in software, so that a display area corresponding to the front-facing sensor interaction component can be displayed in some existing icons or texts in the function independent area, thereby alleviating a sense of fragmentation of the screen and improving user experience.
For ease of description, the display area corresponding to the front-facing interaction component is denoted as a special display area below. Because there are a plurality of display manners of an icon and a text of a specified function, in the embodiments, the icon and the text of the specified function may be redesigned based on characteristics such as a shape and performance of the special display area.
In some embodiments, the electronic device 100 may set, based on a position of the display area corresponding to the front-facing sensor interaction component on the display of the electronic device 100, a display manner of an icon displayed on a status bar. In an example, descriptions are provided by using an example in which the front-facing sensor interaction component is a front-facing camera 411 and the mobile phone is in the portrait mode. As shown in
The electronic device 100 may first obtain position information corresponding to the front-facing camera 411 on the screen, and then search, based on the position information corresponding to the front-facing camera 411 on the screen and position information of function icons on the status bar that correspond to different functions of the electronic device in an enabled state and/or a disabled state, a configuration file of the electronic device 100 for a corresponding icon that is on the status bar and that corresponds to the position information corresponding to the front-facing camera 411 on the screen. Assuming that the position information corresponding to the front-facing camera 411 on the screen is position information of a Wi-Fi signal icon on the status bar on the screen in a Wi-Fi enabled state, in this embodiment, after Wi-Fi is enabled, the electronic device 100 may display the Wi-Fi signal icon by using an icon 511 in a user interface 510 shown in
In another example, assuming that a user uses one SIM card on the mobile phone, and Wi-Fi is connected, a user interface 500 of the mobile phone may be shown in
The position information may be coordinate area information. Therefore, a position area corresponding to the front-facing camera 411 on the screen may be less than or equal to a position area corresponding to the Wi-Fi signal icon 511 on the screen.
It should be noted that the configuration file of the electronic device 100 may store position information, on the screen, of displaying an icon corresponding to each function of the electronic device 100 when the function is in an enabled state, and the position information may include position information of fixed functions in an enabled state, for example, time information and power information, and may also include corresponding position information of displaying each function on the screen when at least one function is enabled, for example, position information of an icon displayed on the status bar when Bluetooth is enabled and Wi-Fi is disabled and position information of a function icon displayed on the status bar when Bluetooth and Wi-Fi are enabled. The position information may be stored in the configuration file in a form of a list. This is not limited.
In another example, assuming that a user uses one SIM card on the mobile phone, Wi-Fi is connected, and a global positioning system (GPS) is enabled, a user interface 600 shown in
Alternatively, the electronic device 100 may first obtain position information corresponding to the front-facing camera 411 on the screen, and then search, based on the position information corresponding to the front-facing camera 411 on the screen and position information of a function icon corresponding to each function of the electronic device in an enabled state, a configuration file of the electronic device 100 for a function icon within the position information corresponding to the front-facing camera 411 on the screen. For example, if the GPS is not enabled on the mobile phone, when it is found that the position information of the front-facing camera 411 is position information displayed on the status bar when the GPS is in an enabled state, in this embodiment, after the GPS is enabled, the GPS icon 611 in the user interface 610 shown in
In some other embodiments, the electronic device 100 may also obtain shape information of the front-facing sensor interaction component, and set, based on the shape information of the front-facing sensor interaction component, a display manner of an icon displayed on the status bar. As shown in
Based on the foregoing embodiments, an embodiment provides an interface display method. A structure of an electronic device in the method may be the diagram of the structure of the electronic device 100 shown in
Step 901: The electronic device 100 obtains a first display position of a display shape of a front-facing sensor interaction component on the display 194. In this embodiment, the first display position of the display shape of the front-facing sensor interaction component on the display includes a first width range and a first height range that are occupied by the display shape of the front-facing sensor interaction component on the display. For example, the front-facing sensor interaction component may include a front-facing camera 411, a receiver, a light sensor, and a distance sensor, or the like. The front-facing sensor interaction component is not limited to the foregoing components. This is not limited.
Step 902: The electronic device 100 searches an internal configuration file for a target function icon corresponding to the front-facing sensor interaction component. A second display position of a target function icon on the display 194 may be the same as or close to the first display position of the front-facing sensor interaction component on the display 194. The configuration file includes a display position, on the display, of a function icon corresponding to at least one function in an enabled state.
The second display position includes a second width range and a second height range that are occupied by the target function icon on the display. Both a difference between the second width range and the first width range and a difference between the second height range and the first height range fall within specified ranges.
Step 903: The electronic device 100 displays a processed target function icon on the display 194.
In a possible implementation, the electronic device 100 may process the target function icon. A display position of the processed target function icon is the same as or close to the first display position, and a display shape of the processed target function icon is the same as or similar to the display shape of the front-facing sensor interaction component on the display 194.
Further, in this embodiment, to alleviate a sense of fragmentation between a special display area and a surrounding area, brightness of an icon or a text displayed in a function independent area may be adjusted, a color of a function icon may be adjusted, or both brightness and a color of a function icon may be adjusted.
In some embodiments, when a color and/or brightness of a signal icon or a text is adjusted, an adjustment may be made based on a background color and/or background brightness on the screen of the electronic device. For example, a specific adjustment range may be set based on a background color and/or background brightness on a screen of a mobile phone, and then an adjustment is made within the specified adjustment range. An adjustment manner is not limited to the foregoing manner.
When the electronic device is in a portrait mode, in an example, assuming that position information corresponding to the front-facing camera 411 on the screen falls within a position range in which a Wi-Fi signal icon 511 is located after Wi-Fi is enabled, to alleviate the sense of fragmentation between the special display area and the surrounding area, in this embodiment, brightness of a Wi-Fi signal icon 511 may be adjusted, a color of a Wi-Fi signal icon 511 may be adjusted, or both brightness and a color of a Wi-Fi signal icon 511 may be adjusted.
When the electronic device is in a landscape mode, as shown in
In some other embodiments, brightness and/or a color of a display area corresponding to a front-facing camera may be adjusted. The front-facing camera 502 in the user interface 500 shown in
Further, a status bar may be used as an example. When the special display area is displayed in a status bar area, in this embodiment, icons or texts in the status bar area may be displayed in corresponding colors in a color gradient manner based on a sequence of the icons or the texts on the status bar, for example, may be displayed from dark to light.
Icons or texts in a status bar area may be alternatively displayed in a brightness gradient manner. For example, brightness of icons in a status bar area included in the user interface 610 shown in
Icons or texts in a status bar area may be alternatively displayed in a color and brightness gradient manner. Taking
Both the brightness adjustment manner and the color adjustment manner in the foregoing embodiments are described by using examples. An adjustment may be made in another manner. This is not limited herein. In addition, the display manner in the foregoing embodiment is merely described by using an example of the display area corresponding to the front-facing camera. A display processing process of a display area of another front-facing sensor interaction component is similar to a processing process of the display area corresponding to the front-facing camera, and details are not described herein again.
Further, an embodiment provides an interface display method. A structure of an electronic device in the method may be the diagram of the structure of the electronic device 100 shown in
Step 1101: The electronic device 100 obtains a first display position of a display shape of a front-facing sensor interaction component on the display 194.
Step 1102: The electronic device 100 obtains a color and/or brightness of a user interface currently displayed on the display 194. There is no sequence of performing step 1101 and step 1102. In this embodiment, step 1101 may be performed before step 1102, step 1102 may be performed before step 1101, or step 1101 and step 1102 may be performed simultaneously.
Step 1103: The electronic device 100 adjusts a display color and/or display brightness at the first display position to a color and/or brightness that are or is the same as or similar to the color and/or the brightness of the user interface currently displayed on the display.
Based on the foregoing embodiments, an embodiment further provides an electronic device, and the electronic device is configured to implement the interface display method in the figures. As shown in
The memory 1202 stores one or more computer programs, and the one or more computer programs include instructions. The processor 1201 invokes the instructions stored in the memory 1202, so that the electronic device 1200 can execute the foregoing method embodiments shown in
In this embodiment, the processor 1201 may be a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array or another programmable logic device, a discrete gate or a transistor logic device, or a discrete hardware component, and can implement or perform the methods, steps, and logical block diagrams disclosed in the embodiments. The general-purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed with reference to the embodiments may be directly performed by using a hardware processor or may be performed by using a combination of hardware in the processor and a software module. The software module may be located in the memory 1202, and the processor 1201 reads program instructions in the memory 1202 and completes the steps in the foregoing methods in combination with hardware of the processor 1201.
In this embodiment, the memory 1202 may be a non-volatile memory such as a hard disk drive (HDD) or a solid-state drive (SSD), or may be a volatile memory such as a RAM. The memory may alternatively be any other medium that can be configured to carry or store expected program code in a form of an instruction or a data structure and that can be accessed by a computer but is not limited thereto. The memory in this embodiment may alternatively be a circuit or any other apparatus that can implement a storage function and is configured to store instructions and/or data.
It may be clearly understood by a person skilled in the art that for convenience and brevity of description, for a specific working process of the electronic device 1200 shown in
A computer storage medium stores a computer program, and when the computer program is executed by a computer, the computer executes the foregoing method embodiments shown in
An embodiment further provides a computer program product, including instructions. When the computer program product runs on a computer, the computer executes the foregoing method embodiments shown in
The embodiments are described with reference to the flowcharts and/or block diagrams of the method, the device (system), and the computer program product according to the embodiments. It should be understood that instructions may be used to implement each process and/or each block in the flowcharts and/or the block diagrams and a combination of a process and/or a block in the flowcharts and/or the block diagrams. These instructions may be provided for a general-purpose computer, a dedicated computer, an embedded processor, or a processor of another programmable data processing device to generate a machine, so that the instructions executed by a computer or a processor of another programmable data processing device generate an apparatus for implementing a specific function in one or more processes in the flowcharts and/or in one or more blocks in the block diagrams.
These computer program instructions may alternatively be stored in a computer-readable memory that can indicate a computer or another programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate an artifact that includes an instruction apparatus. The instruction apparatus implements a specific function in one or more processes in the flowcharts and/or in one or more blocks in the block diagrams.
These computer program instructions may alternatively be loaded onto a computer or another programmable data processing device, so that a series of operations and steps are performed on the computer or the another programmable device, to generate computer-implemented processing. Therefore, the instructions executed on the computer or the another programmable device provide steps for implementing a specific function in one or more processes in the flowcharts and/or in one or more blocks in the block diagrams
Number | Date | Country | Kind |
---|---|---|---|
201910704755.2 | Jul 2019 | CN | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/CN2020/105850 | 7/30/2020 | WO |