WO2021042978A1 - 一种主题切换方法以及主题切换装置 - Google Patents

一种主题切换方法以及主题切换装置 Download PDF

Info

Publication number
WO2021042978A1
WO2021042978A1 PCT/CN2020/109786 CN2020109786W WO2021042978A1 WO 2021042978 A1 WO2021042978 A1 WO 2021042978A1 CN 2020109786 W CN2020109786 W CN 2020109786W WO 2021042978 A1 WO2021042978 A1 WO 2021042978A1
Authority
WO
WIPO (PCT)
Prior art keywords
theme
screen
terminal device
folding
switching
Prior art date
Application number
PCT/CN2020/109786
Other languages
English (en)
French (fr)
Inventor
毕晟
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN202080070233.2A priority Critical patent/CN114556294A/zh
Priority to EP20860912.3A priority patent/EP4024209A4/en
Publication of WO2021042978A1 publication Critical patent/WO2021042978A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Definitions

  • This application relates to the field of terminal technology, and in particular to a theme switching method and a theme switching device.
  • the embodiments of the present application provide a theme switching method and a theme switching device, which are beneficial to improve the efficiency of theme switching.
  • an embodiment of the present application provides a theme switching method, which is applied to a terminal device, and the method includes: acquiring a switching parameter when a theme switching operation is detected; and determining a theme object to be activated according to the switching parameter, The subject object to be activated is in the loaded state; the subject object to be activated is switched to the subject object of the terminal device.
  • the theme object to be activated is in the loaded state before the theme object to be activated is switched to the theme object of the terminal device, it is possible to avoid the need to spend before the theme object to be activated is switched to the theme object of the terminal device. Time to load the theme object to be activated, thereby helping to improve the theme switching efficiency of the terminal device.
  • the terminal device stores a plurality of theme objects, each of the plurality of theme objects includes a class loader and path information, and the theme object is loaded by the class loader and indicated by the path information.
  • the theme package is obtained; where each theme package includes a resource identifier and a resource value.
  • the resource identifiers in different theme packages are the same and the resource values are different, and different theme objects include different class loaders.
  • the resource identifiers in different theme packages are the same and the resource values are different, so that Avoid selecting resource identifiers based on the number of theme objects, which helps reduce the amount of code and improves the efficiency of theme switching.
  • the Android operating system two identical resource identifiers cannot be defined, but because different subject objects in the embodiments of the present application are loaded through different class loaders. Therefore, even if the resource identifiers in different theme packages are the same, the different theme packages can be loaded in the terminal device at the same time.
  • the terminal device includes a folding screen, the folding screen includes a first screen and a second screen; the aforementioned theme switching operation includes one or more of the following operations: folding the folding screen;
  • the change in the folding angle between the first screen and the second screen is a folding operation at a first preset angle; the change in the folding angle between the first screen and the second screen reaches the second preset angle Folding operation.
  • the theme switching operation is a folding operation in which the change in the folding angle between the first screen and the second screen reaches the second preset angle
  • collision of the terminal device or other reasons can be avoided
  • the folding screen is shaken (the user does not want to switch the theme object of the terminal device at this time)
  • the folding angle between the first screen and the second screen changes, and the theme of the terminal device is switched, which is beneficial Avoid misoperation.
  • the switching parameter includes a folding angle of the folding operation and auxiliary information
  • the auxiliary information includes: one or more of time information, date information, and weather information
  • the theme object to be activated is determined according to the switching parameter
  • the specific implementation may be: determining the target theme object set corresponding to the folding angle of the folding operation according to the correspondence between the folding angle and the theme object set; and determining the target theme object set from the target theme object set according to the auxiliary information Enable subject objects.
  • the theme object to be activated is determined from the target theme object set, which is beneficial to improve the interest of the terminal.
  • the terminal device includes a folding screen, and the folding screen includes a first screen and a second screen; a specific implementation manner of switching the theme object to be activated to the theme object of the terminal device may be: Enabling the theme object switching is the theme object of the screen operated by the aforementioned theme switching operation.
  • the terminal device includes a folding screen, the folding screen includes a first screen and a second screen; the aforementioned subject object to be activated includes a first subject object and a second subject object, the first subject object and the second subject object 2.
  • the specific implementation manner of switching the aforementioned subject object to be activated to the subject object of the terminal device may be: switching the first subject object to the subject object of the first screen, and the second The second theme object is switched to the theme object of the second screen.
  • the first subject object when there is an association relationship between the first subject object and the second subject object, the first subject object is switched to the subject object of the first screen, and the second subject object is switched to the second subject object.
  • the subject of the screen is conducive to enhancing the fun of the terminal device.
  • an embodiment of the present application provides a theme switching device, which is a terminal device or a device (such as a chip) with a terminal device function.
  • the device has the function of realizing the theme switching method provided in the first aspect.
  • This function can be realized by hardware, or by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the above-mentioned functions.
  • an embodiment of the present application provides a computer-readable storage medium for storing computer program instructions used by the theme switching device described in the second aspect, which includes a program used to execute the program related to the first aspect.
  • an embodiment of the present application provides a theme switching device, which is a terminal device or a device (such as a chip) with a terminal device function.
  • the device includes a memory and a processor.
  • the memory stores program instructions.
  • the processor is connected to the memory via a bus.
  • the processor calls the program instructions stored in the memory to make the device execute the method described in the first aspect.
  • an embodiment of the present application provides a computer program product, the program product includes a program, and when the program is executed, the method described in the first aspect is implemented.
  • an embodiment of the present application further provides a processor.
  • the processor includes at least one circuit for acquiring a switching parameter when a theme switching operation is detected, and determining the theme object to be activated according to the switching parameter.
  • the activated theme object is in a loaded state; the processor further includes at least one circuit for switching the to-be-activated theme object to the theme object of the terminal device.
  • the foregoing processor may be a chip, and may execute instructions or programs for implementing the method involved in the foregoing first aspect.
  • the embodiments of the present application also provide a chip system, which includes a processor, for example, is applied to a terminal device, and is used to implement the functions or methods involved in the above-mentioned first aspect.
  • the chip system further includes a memory, which is used to store program instructions and data necessary to implement the functions of the method described in the first aspect.
  • the chip system can be composed of chips, and can also include chips and other discrete devices.
  • FIG. 1a is a schematic diagram of a main screen of a terminal device 100 according to an embodiment of the present application
  • FIG. 1b is a schematic diagram of a scenario where a user turns over the terminal device 100 shown in FIG. 1a;
  • FIG. 1c is a schematic structural diagram of a terminal device 100 disclosed in an embodiment of the present application.
  • FIG. 1d is a schematic diagram of a software system of a terminal device 100 disclosed in an embodiment of the present application.
  • Fig. 2a is a schematic flowchart of a theme switching method disclosed in an embodiment of the present application
  • Figure 2b is a schematic diagram of a scenario where a user sets theme parameters on a theme setting page disclosed in an embodiment of the present application
  • 2c is a schematic diagram of the main screen of the terminal device after the user clicks the confirm setting button 22 in the theme setting page according to an embodiment of the present application;
  • FIG. 3a is a schematic flowchart of another theme switching method disclosed in an embodiment of the present application.
  • FIG. 3b is a schematic diagram of a scenario where a folding operation is performed on the terminal device 100 shown in FIG. 1a according to an embodiment of the present application;
  • FIG. 3c is a schematic diagram of background images displayed on the first screen and the second screen when the folding angle between the first screen and the second screen is 30° according to an embodiment of the present application;
  • FIG. 3d is a schematic diagram of background images displayed on the first screen and the second screen when the folding angle between the first screen and the second screen is 0° according to an embodiment of the present application;
  • FIG. 4 is a schematic flowchart of another theme switching method disclosed in an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a theme switching device disclosed in an embodiment of the present application.
  • Fig. 6 is a schematic structural diagram of another theme switching device disclosed in an embodiment of the present application.
  • FIG. 1a is a schematic diagram of a main screen of a terminal device 100 according to an embodiment of this application.
  • the home screen of the terminal device 100 includes multiple application icons (such as video, file, camera, music, store, gallery, settings, applications, phone calls, and text messages) as well as time icons, communication signal icons, and wireless local area network ( wireless local area networks, WLAN) (such as wireless fidelity (Wi-Fi) network connection status icons, battery icons, etc.).
  • application icons such as video, file, camera, music, store, gallery, settings, applications, phone calls, and text messages
  • time icons such as video, file, camera, music, store, gallery, settings, applications, phone calls, and text messages
  • time icons such as time icons, communication signal icons, and wireless local area network ( wireless local area networks, WLAN) (such as wireless fidelity (Wi-Fi) network connection status icons, battery icons, etc.).
  • Wi-Fi wireless fidelity
  • the terminal device 100 can detect the theme switching operation and obtain the switching parameters, and then determine the theme object to be activated according to the switching parameters, and the theme object to be activated is in the loaded state. Then, the theme object to be activated is switched to the theme object of the terminal device 100.
  • the terminal can set the background color, standby picture, screen saver, ringtone, operation interface, icons, text, and screen layout of the terminal at the same time by setting the theme object, so that users can personalize the terminal more conveniently.
  • the screen layout can determine the display position of the elements displayed on the screen on the screen.
  • the terminal device 100 may store multiple theme objects, and the multiple theme objects include at least the theme object adopted by the terminal device 100 before being turned over (such as the theme object 1) and the theme object adopted by the terminal device 100 after being turned over. (That is, the aforementioned subject to be activated).
  • Fig. 1b is a schematic diagram of a scenario where a user turns over the terminal device 100 shown in Fig. 1a.
  • the embodiment of this application takes the subject object to be activated as subject object 2 as an example for introduction, and when the terminal device 100 adopts subject object 1, the background color of the main screen of the terminal device 100 is white, and when the terminal device 100 adopts subject object 2
  • the background color of the main screen of the terminal device 100 is gray as an example for introduction.
  • the background color of the main screen of the terminal device 100 is white
  • the background color of the main screen of the terminal device 100 Turns to gray.
  • the user flips the terminal device 100 shown in FIG. 1a (that is, the terminal device 100 detects the theme switching operation), and can switch the theme object 2 to the theme object of the terminal device 100, that is, the theme object of the terminal device 100 is changed from the theme object 1 For the subject object 2.
  • the switching parameters may include the flip angle in FIG. 1b.
  • the terminal device 100 may store the corresponding relationship between the flip angle and the subject object, and according to the corresponding relationship, use the subject object corresponding to the flip angle in Figure 1b as the subject object to be activated. .
  • the theme object to be activated is in the loaded state, and the theme object to be activated is in the loaded state means that the theme object to be activated has been loaded into the memory space of the terminal device 100.
  • the theme object to be activated before the theme object to be activated is switched to the theme object of the terminal device 100, the theme object to be activated is in the loaded state, which can avoid the need to spend time before switching the theme object to be activated to the theme object of the terminal device 100 Loading the theme object to be activated is beneficial to improve the theme switching efficiency of the terminal device 100.
  • the above theme switching operation including the user turning over the terminal device 100 shown in FIG. 1a is only for example, and does not constitute a limitation to the embodiment of the present application. In other feasible implementation manners, as long as it is used to trigger theme switching
  • the operations of are all the theme switching operations described in the embodiments of the present application.
  • the theme switching method proposed in the embodiment of the present application is applicable to any theme switching scenario.
  • the terminal device 100 may also be called a terminal (terminal), user equipment (UE), mobile station (mobile station, MS), mobile terminal (mobile terminal, MT), and so on.
  • the terminal device can be a mobile phone (mobile phone), smart TV, wearable device, tablet computer (Pad), computer with wireless transceiver function, virtual reality (virtual reality, VR) terminal device, augmented reality (augmented reality, AR) terminal Equipment, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grid, transportation Wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, and so on.
  • the embodiments of the present application do not limit the specific technology and specific device form adopted by the terminal device.
  • FIG. 1c shows a schematic diagram of the structure of the terminal device 100.
  • the terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2.
  • Mobile communication module 150 wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195, etc.
  • SIM Subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light Sensor 180L, bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal device 100.
  • the terminal device 100 may include more or fewer components than shown, or combine certain components, or split certain components, or arrange different components.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU), etc.
  • AP application processor
  • modem processor modem processor
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • the different processing units may be independent devices or integrated in one or more processors.
  • the controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 to store instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory can store instructions or data that the processor 110 has just used or used cyclically. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
  • the processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, and a universal asynchronous transmitter receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / Or Universal Serial Bus (USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • UART universal asynchronous transmitter receiver/transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB Universal Serial Bus
  • the I2C interface is a bidirectional synchronous serial bus, which includes a serial data line (SDA) and a serial clock line (SCL).
  • the processor 110 may include multiple sets of I2C buses.
  • the processor 110 may couple the touch sensor 180K, the charger, the flash, the camera 193, etc., respectively through different I2C bus interfaces.
  • the processor 110 may couple the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to implement the touch function of the terminal device 100.
  • the I2S interface can be used for audio communication.
  • the processor 110 may include multiple sets of I2S buses.
  • the processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170.
  • the audio module 170 may transmit audio signals to the wireless communication module 160 through an I2S interface, so as to realize the function of answering calls through a Bluetooth headset.
  • the PCM interface can also be used for audio communication to sample, quantize and encode analog signals.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus can be a two-way communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • the UART interface is generally used to connect the processor 110 and the wireless communication module 160.
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to realize the Bluetooth function.
  • the audio module 170 may transmit audio signals to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with the display screen 194, the camera 193 and other peripheral devices.
  • the MIPI interface includes a camera serial interface (camera serial interface, CSI), a display serial interface (display serial interface, DSI), and so on.
  • the processor 110 and the camera 193 communicate through a CSI interface to implement the shooting function of the terminal device 100.
  • the processor 110 and the display screen 194 communicate through a DSI interface to realize the display function of the terminal device 100.
  • the GPIO interface can be configured through software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface can be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and so on.
  • the GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface that complies with the USB standard specification, and specifically may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and so on.
  • the USB interface 130 can be used to connect a charger to charge the terminal device 100, and can also be used to transfer data between the terminal device 100 and peripheral devices. It can also be used to connect earphones and play audio through earphones. This interface can also be used to connect to other electronic devices, such as AR devices.
  • the interface connection relationship between the modules illustrated in the embodiment of the present application is merely a schematic description, and does not constitute a structural limitation of the terminal device 100.
  • the terminal device 100 may also adopt different interface connection modes in the foregoing embodiments, or a combination of multiple interface connection modes.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger can be a wireless charger or a wired charger.
  • the charging management module 140 may receive the charging input of the wired charger through the USB interface 130.
  • the charging management module 140 may receive the wireless charging input through the wireless charging coil of the terminal device 100. While the charging management module 140 charges the battery 142, it can also supply power to the terminal device through the power management module 141.
  • the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160.
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance).
  • the power management module 141 may also be provided in the processor 110.
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • the wireless communication function of the terminal device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
  • the antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in the terminal device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna can be used in combination with a tuning switch.
  • the mobile communication module 150 may provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the terminal device 100.
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.
  • the mobile communication module 150 can receive electromagnetic waves by the antenna 1, and perform processing such as filtering, amplifying and transmitting the received electromagnetic waves to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modem processor, and convert it into electromagnetic wave radiation via the antenna 1.
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110.
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor.
  • the application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays an image or video through the display screen 194.
  • the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide applications on the terminal device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), and global navigation satellites.
  • WLAN wireless local area networks
  • BT Bluetooth
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication technology
  • infrared technology infrared, IR
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110.
  • the wireless communication module 160 may also receive the signal to be sent from the processor 110, perform frequency modulation, amplify it, and convert it into electromagnetic waves to radiate through the antenna 2.
  • the antenna 1 of the terminal device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the terminal device 100 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • the GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite-based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite-based augmentation systems
  • the terminal device 100 implements a display function through a GPU, a display screen 194, and an application processor.
  • the GPU is an image processing microprocessor, which is connected to the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • the processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos, and the like.
  • the display screen 194 includes a display panel.
  • the display panel can use liquid crystal display (LCD), organic light-emitting diode (OLED), active matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • active-matrix organic light-emitting diode active-matrix organic light-emitting diode
  • AMOLED flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (QLED), etc.
  • the terminal device 100 may include one or N display screens 194, and N is a positive integer greater than one.
  • the terminal device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
  • the ISP is used to process the data fed back by the camera 193. For example, when taking a picture, the shutter is opened, the light is transmitted to the photosensitive element of the camera through the lens, the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing and is converted into an image visible to the naked eye.
  • ISP can also optimize the image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera 193.
  • the camera 193 is used to capture still images or videos.
  • the object generates an optical image through the lens and is projected to the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transfers the electrical signal to the ISP to convert it into a digital image signal.
  • ISP outputs digital image signals to DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
  • the terminal device 100 may include one or N cameras 193, and N is a positive integer greater than one.
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the terminal device 100 selects the frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
  • Video codecs are used to compress or decompress digital video.
  • the terminal device 100 may support one or more video codecs. In this way, the terminal device 100 can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
  • MPEG moving picture experts group
  • MPEG2 MPEG2, MPEG3, MPEG4, and so on.
  • NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • applications such as intelligent cognition of the terminal device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, and so on.
  • the external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, so as to expand the storage capacity of the terminal device 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, video and other files in an external memory card.
  • the internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions.
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, at least one application program (such as a sound playback function, an image playback function, etc.) required by at least one function.
  • the data storage area can store data (such as audio data, phone book, etc.) created during the use of the terminal device 100.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.
  • the processor 110 executes various functional applications and data processing of the terminal device 100 by running instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
  • the terminal device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. For example, music playback, recording, etc.
  • the audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal.
  • the audio module 170 can also be used to encode and decode audio signals.
  • the audio module 170 may be provided in the processor 110, or part of the functional modules of the audio module 170 may be provided in the processor 110.
  • the speaker 170A also called “speaker” is used to convert audio electrical signals into sound signals.
  • the terminal device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals.
  • the terminal device 100 answers a call or voice message, it can receive the voice by bringing the receiver 170B close to the human ear.
  • the microphone 170C also called “microphone”, “microphone”, is used to convert sound signals into electrical signals.
  • the user can make a sound by approaching the microphone 170C through the human mouth, and input the sound signal into the microphone 170C.
  • the terminal device 100 may be provided with at least one microphone 170C.
  • the terminal device 100 may be provided with two microphones 170C, which can implement noise reduction functions in addition to collecting sound signals.
  • the terminal device 100 may also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions.
  • the earphone interface 170D is used to connect wired earphones.
  • the earphone interface 170D may be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, and a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA, CTIA
  • the pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal.
  • the pressure sensor 180A may be provided on the display screen 194.
  • the capacitive pressure sensor may include at least two parallel plates with conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes.
  • the terminal device 100 determines the strength of the pressure according to the change in capacitance.
  • the terminal device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the terminal device 100 may also calculate the touched position based on the detection signal of the pressure sensor 180A.
  • touch operations that act on the same touch position but have different touch operation intensities can correspond to different operation instructions. For example, when a touch operation whose intensity of the touch operation is less than the first pressure threshold is applied to the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
  • the gyro sensor 180B may be used to determine the movement posture of the terminal device 100.
  • the angular velocity of the terminal device 100 around three axes ie, x, y, and z axes
  • the gyro sensor 180B can be used for image stabilization.
  • the gyro sensor 180B detects the shaking angle of the terminal device 100, and calculates the distance that the lens module needs to compensate according to the angle, so that the lens can counteract the shaking of the terminal device 100 through a reverse movement to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
  • the air pressure sensor 180C is used to measure air pressure.
  • the terminal device 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the terminal device 100 may use the magnetic sensor 180D to detect the opening and closing of the flip holster.
  • the terminal device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D.
  • features such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the terminal device 100 in various directions (generally three axes). When the terminal device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the terminal device, applied to horizontal and vertical screen switching, pedometer and other applications.
  • the terminal device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the terminal device 100 may use the distance sensor 180F to measure the distance to achieve fast focusing.
  • the proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector such as a photodiode.
  • the light emitting diode may be an infrared light emitting diode.
  • the terminal device 100 emits infrared light to the outside through the light emitting diode.
  • the terminal device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the terminal device 100. When insufficient reflected light is detected, the terminal device 100 can determine that there is no object near the terminal device 100.
  • the terminal device 100 can use the proximity light sensor 180G to detect that the user holds the terminal device 100 close to the ear to talk, so as to automatically turn off the screen to save power.
  • the proximity light sensor 180G can also be used in leather case mode, and the pocket mode will automatically unlock and lock the screen.
  • the ambient light sensor 180L is used to sense the brightness of the ambient light.
  • the terminal device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived brightness of the ambient light.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the terminal device 100 is in a pocket to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the terminal device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, access application locks, fingerprint photographs, fingerprint answering calls, and so on.
  • the temperature sensor 180J is used to detect temperature.
  • the terminal device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the terminal device 100 reduces the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection.
  • the terminal device 100 when the temperature is lower than another threshold, the terminal device 100 heats the battery 142 to avoid abnormal shutdown of the terminal device 100 due to low temperature.
  • the terminal device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • Touch sensor 180K also called “touch device”.
  • the touch sensor 180K can be provided on the display screen 194, and the touch screen is composed of the touch sensor 180K and the display screen 194, which is also called a "touch screen”.
  • the touch sensor 180K is used to detect touch operations acting on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • the visual output related to the touch operation can be provided through the display screen 194.
  • the touch sensor 180K may also be disposed on the surface of the terminal device 100, which is different from the position of the display screen 194.
  • the bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can obtain the vibration signal of the vibrating bone mass of the human voice.
  • the bone conduction sensor 180M can also contact the human pulse and receive the blood pressure pulse signal.
  • the bone conduction sensor 180M may also be provided in the earphone, combined with the bone conduction earphone.
  • the audio module 170 can parse the voice signal based on the vibration signal of the vibrating bone block of the voice obtained by the bone conduction sensor 180M, and realize the voice function.
  • the application processor can analyze the heart rate information based on the blood pressure beating signal obtained by the bone conduction sensor 180M, and realize the heart rate detection function.
  • the button 190 includes a power-on button, a volume button, and so on.
  • the button 190 may be a mechanical button. It can also be a touch button.
  • the terminal device 100 may receive key input, and generate key signal input related to user settings and function control of the terminal device 100.
  • the motor 191 can generate vibration prompts.
  • the motor 191 can be used for incoming call vibration notification, and can also be used for touch vibration feedback.
  • touch operations that act on different applications can correspond to different vibration feedback effects.
  • Acting on touch operations in different areas of the display screen 194, the motor 191 can also correspond to different vibration feedback effects.
  • Different application scenarios for example: time reminding, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, or to indicate messages, missed calls, notifications, and so on.
  • the SIM card interface 195 is used to connect to the SIM card.
  • the SIM card can be inserted into the SIM card interface 195 or pulled out from the SIM card interface 195 to achieve contact and separation with the terminal device 100.
  • the terminal device 100 may support 1 or N SIM card interfaces, and N is a positive integer greater than 1.
  • the SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.
  • the same SIM card interface 195 can insert multiple cards at the same time. The types of the multiple cards can be the same or different.
  • the SIM card interface 195 can also be compatible with different types of SIM cards.
  • the SIM card interface 195 may also be compatible with external memory cards.
  • the terminal device 100 interacts with the network through the SIM card to implement functions such as call and data communication.
  • the terminal device 100 adopts an eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the terminal device 100 and cannot be separated from the terminal device 100.
  • the software system of the terminal device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
  • the embodiment of the present application takes an Android system with a layered architecture as an example to illustrate the software structure of the terminal device 100 by way of example.
  • FIG. 1d is a block diagram of the software structure of the terminal device 100 according to an embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Communication between layers through software interface.
  • the Android system is divided into four layers, from top to bottom, the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
  • the application layer can include a series of application packages.
  • the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer can include a window manager, a content provider, a view system, a phone manager, a resource manager, and a notification manager.
  • the window manager is used to manage window programs.
  • the window manager can obtain the size of the display, determine whether there is a status bar, lock the screen, take a screenshot, etc.
  • the content provider is used to store and retrieve data and make these data accessible to applications.
  • the data may include videos, images, audios, phone calls made and received, browsing history and bookmarks, phone book, etc.
  • the view system includes visual controls, such as controls that display text, controls that display pictures, and so on.
  • the view system can be used to build applications.
  • the display interface can be composed of one or more views.
  • a display interface that includes a short message notification icon may include a view that displays text and a view that displays pictures.
  • the phone manager is used to provide the communication function of the terminal device 100. For example, the management of the call status (including connecting, hanging up, etc.).
  • the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
  • the notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and it can disappear automatically after a short stay without user interaction.
  • the notification manager is used to notify download completion, message reminders, and so on.
  • the notification manager can also be a notification that appears in the status bar at the top of the system in the form of a chart or a scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window.
  • prompt text information in the status bar sound a prompt tone, terminal equipment vibration, flashing indicator light, etc.
  • Android Runtime includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.
  • the core library consists of two parts: one part is the function functions that the java language needs to call, and the other part is the core library of Android.
  • the application layer and the application framework layer run in a virtual machine.
  • the virtual machine executes the java files of the application layer and the application framework layer as binary files.
  • the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
  • the system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), three-dimensional graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL), etc.
  • the surface manager is used to manage the display subsystem and provides a combination of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to realize 3D graphics drawing, image rendering, synthesis, and layer processing.
  • the 2D graphics engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
  • the corresponding hardware interrupt is sent to the kernel layer.
  • the kernel layer processes the touch operation into the original input event (including touch coordinates, time stamp of the touch operation, etc.).
  • the original input events are stored in the kernel layer.
  • the application framework layer obtains the original input event from the kernel layer and identifies the control corresponding to the input event. Taking the touch operation as a touch click operation, and the control corresponding to the click operation is the control of the camera application icon as an example, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer.
  • the camera 193 captures still images or videos.
  • Figure 2a is a schematic flow chart of a theme switching method provided by an embodiment of the present application.
  • the subject switching method is executed by a terminal device or a chip in a terminal device.
  • the terminal device is used as the theme switching method below.
  • the method may include but is not limited to the following steps:
  • Step S201 When a theme switching operation is detected, the terminal device acquires switching parameters.
  • the terminal device may detect a preset theme switching operation in real time, periodically or irregularly, and obtain the switching parameters when the theme switching operation is detected.
  • the theme switching operation may be a trigger operation (such as a click, long press, or sliding operation) for a preset switching button in the terminal device.
  • the preset switching button may be a virtual button on the display screen of the terminal device, or it may be a virtual button on the display screen of the terminal device. It is a hardware button in a terminal device, which is not limited in the embodiment of the present application.
  • the theme switching operation may be a flip operation on the terminal device, and the flip operation on the terminal device will cause the flip angle of the terminal device to change.
  • the turning operation of the terminal device may refer to rotating the terminal device around a first direction
  • the first direction may include a vertical frame with the terminal device (as shown in FIG. 1a, the length direction in the frame of the terminal device 100, which is not shown in FIG. 1a) Any one of a parallel direction, a direction parallel to the lateral frame of the terminal device (the width direction in the frame of the terminal device 100 in FIG. 1a, not shown in FIG. 1a), or a direction perpendicular to the screen of the terminal device.
  • the terminal device may set the theme switching operation by default, or the theme switching operation may be customized or changed by the user.
  • the terminal device When the terminal device detects the theme switching operation, it indicates that the theme object of the terminal device needs to be switched.
  • the theme object of the terminal device may include the theme object adopted by the operating system of the terminal device and/or the theme object adopted by the application currently running on the terminal device.
  • the subject object of the terminal device when the subject object of the terminal device is mentioned in the embodiments of the present application, it may specifically refer to the subject object of the operating system of the terminal device and/or the subject object of the application currently running on the terminal device.
  • the theme switching operation of the theme object adopted by the operating system of the terminal device can be the same as the theme switching operation of the theme object adopted by the application currently running on the terminal device.
  • the terminal device when the terminal device detects the theme switching operation, it indicates that it needs Switch the theme object used by the operating system of the terminal device and the theme object used by the application currently running on the terminal device.
  • the operating system is the system software that manages computer hardware and software resources, and provides public services for computer programs.
  • the operating system mentioned in the embodiments of this application may be an Android operating system or an operating system based on Android secondary development.
  • the theme switching operation of the theme object adopted by the operating system of the terminal device and the theme switching operation of the theme object adopted by the application currently running on the terminal device may be completely different or not completely the same. For example, suppose it is detected that any one of operation 1, operation 2 and operation 3 indicates that the subject object of the operating system of the terminal device needs to be switched, and any one of operation 3 and operation 4 is detected indicates that the current terminal device needs to be switched. When the subject object of the running application.
  • the terminal device can switch the subject object of the terminal device’s operating system; if the terminal device detects operation 4, the terminal device can switch the subject object of the application currently running on the terminal device ; If the terminal device detects operation 3, the terminal device can switch the subject object of the operating system of the terminal device, and switch the subject object of the application currently running on the terminal device.
  • the number of application programs currently running on the terminal device may be one or more.
  • the terminal device currently running application 1 means that application 1 is running in the terminal device, and the running state of application 1 in the terminal device can include any of the following three states:
  • the terminal device is in the foreground running state; the application program 1 is in the to-be-activated state in the terminal device; the application program 1 is in the background running state in the terminal device.
  • the conditions that cause application 1 to be activated in the terminal device may include but are not limited to: when the terminal device is in the foreground running state of the application 1, pull down the status bar to see the notification message, double-click the home button (also called the home button) ) And the task running bar pops up and the screen is locked.
  • the conditions that cause the application 1 to be in the background running state in the terminal device may include, but are not limited to: the terminal device presses the home button or starts other applications when the application 1 is running in the foreground (causing the application 1 to be squeezed into the background).
  • the theme switching operations corresponding to all applications installed in the terminal device are the same.
  • the theme switching operations corresponding to each application program installed in the terminal device are completely different or not completely the same. For example, if both application 1 and application 2 are running in the terminal device, and the theme switching operation corresponding to application 1 is any one of operation 1, operation 2 and operation 3, the theme corresponding to application 2 The switching operation is operation 3.
  • the terminal device detects any one of operation 1 and operation 2, it indicates that the subject object of application 1 needs to be switched; when the terminal device detects operation 3, it indicates that it needs to switch the subject object of application 1 and application 2 .
  • the terminal device can set the background color, standby picture, screen saver, ringtone, operation interface, icon, text and screen layout of the terminal device's main screen at the same time by setting the theme object of the operating system.
  • the terminal device can set the background color, background picture, message ringtone, operation interface, icon, text, and screen layout of the application program's window at the same time by setting the application's subject object.
  • the terminal device can set the default theme object of the operating system, and set the default theme object of each application program.
  • the default theme object of the operating system can be used as the theme object of the operating system of the terminal device.
  • the default theme object of the application program can be used as the theme object of the application program.
  • the terminal device when the terminal device is in the power-on state, the operating system of the terminal device has enabled the theme object, and when the theme switching operation is detected, the terminal device can obtain the switching parameters, and determine the theme object to be activated according to the switching parameters , And then use the to-be-enabled theme object to replace the theme object enabled by the operating system before the theme switching operation is detected.
  • the theme switching operation mentioned includes the theme switching operation for the operating system and the theme switching operation for the application running in the terminal device.
  • the series of operations performed afterwards are similar to the series of operations performed after the theme switching operation on the application is detected.
  • part of the content in the embodiments of this application only describes a series of operations performed after the theme switching operation on the operating system is detected. Based on this, it can be inferred that one of the operations performed after the theme switching operation on the application is detected.
  • the series of operations do not constitute a limitation on the technical solutions provided in the embodiments of the present application.
  • Step S202 The terminal device determines the theme object to be activated according to the switching parameter, and the theme object to be activated is in the loaded state.
  • the switching parameter may be determined according to the theme switching operation detected by the terminal device.
  • the switching parameter may be the theme parameter selected by the user in the theme setting page.
  • the background color and icon shape can be set in the theme setting page 20, that is, the theme parameters include background color and icon shape.
  • the background color can be white or gray
  • the icon shape can be square or round.
  • the background color of the main screen of the terminal device 100 is white, and the icon shape is square.
  • the user can click the drop-down box 21 corresponding to the background color to make the theme setting page 20 display all the options of the background color (ie white and gray), and in the displayed color options Choose gray.
  • the user can click the drop-down box 21 corresponding to the icon shape to make the theme setting page 20 display all the options of the icon shape (ie square and circle), and select from the displayed shape options Round.
  • FIG. 2c a schematic diagram of the main screen of the terminal device 100 is shown in FIG. 2c.
  • the shape of the icon 23 on the main screen of the terminal device 100 is a circle, and the background color is gray, that is, the theme parameter selected by the user takes effect.
  • the theme parameters including the background color and the icon shape are only for example, and do not constitute a limitation to the embodiment of the present application. In other feasible implementation manners, the theme parameters may also include other parameters. It should also be noted that the user changing the background color and icon shape at the same time is only for example, and does not constitute a limitation of the embodiment of the present application. In other feasible implementation manners, the user can only change one of the background color and the icon shape. parameter.
  • the switching parameter is determined according to the theme switching operation detected by the terminal device, and when the theme switching operation is a flip operation of the terminal device, the switching parameter may be the flip angle of the terminal device after the terminal device performs the flip operation. Taking FIG. 1b as an example, the flip angle may be the angle between the screen plane of the terminal device 100 and the ground plane. In an implementation manner, the switching parameter may be the angle difference between the flip angle of the terminal device before the terminal device performs the flip operation and the flip angle of the terminal device after the flip operation is performed.
  • the terminal device may store multiple theme objects, and the multiple theme objects include at least the theme objects used by the terminal device before detecting the theme switching operation and the theme objects used by the terminal device after detecting the theme switching operation.
  • the theme parameters included in the operating system and the theme parameters included in the application program may be the same or different.
  • the theme parameters of the operating system may include the background color and icon shape of the main screen
  • the theme parameters of the application may also include the background color of the interface of the application and the shape of the icon in the interface, or the theme parameters of the application. It may include the background color of the interface of the application program, the shape of the icon in the interface, and the background image of the interface.
  • the theme parameters included in different applications can be the same or different. In other words, the theme object corresponding to the operating system and the theme object corresponding to the application program may be the same or different, and the theme objects corresponding to different applications may be the same or different.
  • the terminal device may preset the corresponding relationship between the switching parameter and the theme object, and use the theme object corresponding to the acquired theme parameter as the theme object to be activated.
  • the switching parameters and the subject objects there is a one-to-one correspondence between the switching parameters and the subject objects.
  • a plurality of theme objects may be stored in the terminal device, and each theme object of the plurality of theme objects may include a class loader and path information, and the theme object is loaded by the class loader.
  • the indicated theme package is obtained; where each theme package can include a resource identification (resource ID) and a resource value.
  • resource IDs in different theme packages are the same and the resource values are different, and different theme objects include different class loaders.
  • the class loader can be used to load the theme package indicated by the path information into the memory space of the terminal device. It should be noted that after the class loader loads the theme package indicated by the path information into the memory space of the terminal device, the The terminal device can get a subject object. When the terminal device detects the theme switching operation, it directly switches the active theme object to realize the theme switching.
  • the class loader may be a Java class loader, which is a part of a Java runtime environment (java runtime environment), and is responsible for dynamically loading Java classes into the memory space of the Java virtual machine.
  • the path information is used to uniquely indicate the storage location of a theme package in the terminal device, and the theme packages indicated by different path information are different.
  • the operating system of the terminal device is Android
  • the theme package can be an Android application package (APK); when the operating system of the terminal device is another operating system, the theme package can be an application in the operating system Package.
  • the theme package includes all the resources needed to form a theme.
  • the theme package can include resource IDs and resource values.
  • the resource ID can be used to identify a resource item, and the resource item can be a theme parameter.
  • the resource ID may be a background color identification or an icon shape identification.
  • the resource value can be the specific value of the theme parameter indicated by the resource ID.
  • the specific value of the theme parameter can be white (or a character used to represent white) Or gray (or characters used to represent gray).
  • the resource identifiers in different theme packages are different and the resource values are different.
  • the resource identifiers in different theme packages are the same and the resource values are different. Selecting the resource ID by the number of numbers is conducive to reducing the amount of code and improving the efficiency of theme switching. For example, if there are two theme objects for the main screen of the terminal device, and the terminal device adopts these two theme objects, the background color of the main screen is different, that is, the resource identifier in the theme package indicated by the path information in the two theme objects (That is, the identifier of the background color) has different resource values.
  • the resource identifiers cannot be the same.
  • the value of the resource identifier corresponding to the background color in the theme package indicated by the path information in one theme object is white, and the resource identifier is represented as "white_bg"; in the other theme object
  • the value of the resource identifier corresponding to the background color in the theme package indicated by the path information is gray, and the resource identifier is represented as "gray_bg".
  • the code stored in the terminal device will have different code branches for the aforementioned two subject objects.
  • One of the branches is used to determine the value corresponding to the resource identifier when the resource identifier is "white_bg" (that is, white), and the other branch is used to determine the value corresponding to the resource identifier when the resource identifier is "gray_bg" (that is, gray). ).
  • Theme pack Resource ID Resource value Theme Pack 1 white_bg white
  • the resource identifiers in the theme packages indicated by the path information in the aforementioned two theme objects can be the same and have different resource values.
  • the resource identifiers in the theme package 1 and the theme package 2 are both As "bg". This can avoid selecting resource IDs based on the number of theme objects, which is beneficial to reduce the amount of code, and is beneficial to improve the efficiency of theme switching.
  • two identical resource IDs cannot be defined, but because different subject objects in the embodiments of the present application are loaded through different class loaders. Therefore, even if the resource IDs in different theme packages are the same, the different theme packages can be loaded in the terminal device at the same time.
  • Theme pack Resource ID Resource value Theme Pack 1 bg white
  • the resource identifier in the new theme package is the same as the resource identifier in the existing theme package in the terminal device.
  • the resource value is different from the resource value in the existing theme package.
  • the terminal device can determine the number of theme packages currently stored (such as m), and create m class loaders correspondingly, and then call the m class loaders to load the theme package (one class load Load a theme package, different class loaders load different theme packages) into the memory, and get m theme objects. Then one of the m theme objects is used as the current theme object. At this time, the m theme objects are all in the loaded state in the terminal device. Therefore, when the theme switching operation is detected, the theme objects can be switched immediately, which is beneficial to improving the efficiency of theme switching.
  • m is a positive integer greater than 1.
  • Step S203 The terminal device switches the subject object to be activated to the subject object of the terminal device.
  • the terminal device determines the theme object to be activated, it can switch the theme object to be activated to the theme object of the terminal device. Since the theme object to be activated is in the loaded state before the theme object to be activated is switched to the theme object of the terminal device, it can be avoided that it takes a while to load the theme object before the theme object to be activated is switched to the theme object of the terminal device.
  • the theme object to be activated is beneficial to improve the theme switching efficiency of the terminal device.
  • the embodiment of the present application does not limit the loading time of the theme object to be activated.
  • the terminal device can load the subject object to be activated during the boot process, or it can also be loaded when the operating load of the terminal device is low (or the terminal device is relatively idle) The subject object to be activated.
  • the terminal device can load the subject object to be activated during the process of starting the application, or it can also be used when the running load of the application is low (or the application (Relatively idle) to load the subject object to be activated.
  • the terminal device may store multiple theme objects, and the terminal device may load the multiple theme objects at the same time, or load the multiple theme objects according to the running state of the terminal device.
  • the number of theme objects that can be loaded at the same time can be determined according to the load of the terminal device. For example, when there are 10 theme objects stored in the terminal device and the load of the terminal device is high, the terminal device can load 1 theme object first, and then load the remaining theme object when the load of the terminal device drops to a lower value. Of the 9 theme objects or part of the 9 theme objects.
  • the switching parameter is obtained, and the theme object to be activated is determined according to the switching parameter.
  • the theme object to be activated is in the loaded state, and then the theme object to be activated is switched to The subject object of the terminal device. Since the theme object to be activated is in the loaded state before the theme object to be activated is switched to the theme object of the terminal device, it is possible to avoid the need to spend time loading the theme object to be activated before switching to the theme object of the terminal device Theme objects, thereby helping to improve the theme switching efficiency of the terminal device.
  • Figure 3a is a schematic flowchart of another theme switching method provided by an embodiment of the present application.
  • the method describes in detail which operations are included in the theme switching operation, and how the switching parameters include the folding angle of the folding operation.
  • the folding angle of the folding operation determines the subject object to be activated.
  • the subject of the subject switching method is executed by a terminal device or a chip in the terminal device.
  • the following takes the terminal device as the subject of execution of the subject switching method as an example for description.
  • the method may include but is not limited to the following steps:
  • Step S301 When a theme switching operation is detected, the terminal device acquires switching parameters, where the terminal device includes a folding screen, the folding screen includes a first screen and a second screen; the theme switching operation includes one of the following operations or Various: folding operation of the folding screen; folding operation of changing the folding angle between the first screen and the second screen to a first preset angle; making the folding operation between the first screen and the second screen The amount of change of the folding angle reaches the folding operation of the second preset angle; the switching parameter includes the folding angle of the folding operation.
  • the folding screen in the terminal device may include one or more screens, and the folding screen may be presented as two or more screens after being folded.
  • the folding screen is presented after being folded. Take two screens (such as the first screen and the second screen) as an example.
  • the theme switching operation may include one or more of the following operations: triggering operations (such as clicking, long-pressing, or sliding operations) on the preset switching buttons in the terminal device; flipping operations on the terminal device (on the terminal device) The flip operation will cause the flip angle of the terminal device to change); the folding operation of the folding screen, even if the folding angle between the aforementioned first screen and the aforementioned second screen changes; making the first screen and the second screen
  • the change of the folding angle between the screens is a folding operation of the first preset angle; the folding operation of making the change of the folding angle between the first screen and the second screen reach (that is, greater than or equal to) the second preset angle .
  • the terminal device detects at least one of the foregoing operations, it indicates that the subject object of the terminal device needs to be switched.
  • the theme switching operation is a folding operation for the folding screen
  • the theme object of the terminal device can be switched, which can increase the interest of the terminal device.
  • the theme switching operation is a folding operation that changes the folding angle between the first screen and the second screen to a first preset angle
  • the angle that is, the first preset angle
  • the theme switching operation is a folding operation in which the change in the folding angle between the first screen and the second screen reaches the second preset angle
  • collision of the terminal device or the shaking of the folding screen due to other reasons can be avoided (At this time, the user does not want to switch the subject object of the terminal device), which results in a change in the folding angle between the first screen and the second screen, thereby causing the subject of the terminal device to switch, which is beneficial to avoid misoperation.
  • FIG. 3b is a schematic diagram of a scene of performing a folding operation on the terminal device 100 shown in FIG. 1a. It can be seen from FIG. 3b that by rotating the shaft 31 in the terminal device 100, the folding angle between the first screen 32 and the second screen 33 can be changed. When the first screen and the second screen are combined into a complete screen, the folding angle is 0. Rotate to the back of the screen to increase the folding angle.
  • the terminal device shown in FIG. 3b includes a rotating shaft, and the intermediate position of the rotating shaft 31 in the terminal device is only for illustration. In other feasible implementation manners, the terminal device may include multiple rotating shafts. The two shafts can be set at any position in the terminal device as required.
  • the terminal device may include an unlimited number of rotating shafts, that is, the screen of the terminal device can be folded at any position.
  • the same size of the first screen and the second screen shown in FIG. 3b is only for example, and does not constitute a limitation to the embodiment of the present application.
  • the first screen and the second screen The size can be different.
  • the size of the screen may refer to one or more of the length, width, and aspect ratio of the screen.
  • both the first preset angle and the second preset angle may be set by default by the terminal device, or may be determined according to a user operation, and the first preset angle may be changed according to a user operation.
  • Both the first preset angle and the second preset angle can be any angle in [0°, 360°].
  • both the first preset angle and the second preset angle can be Any angle in [0°, 180°].
  • the number of the first preset angle may be one or more, for example, the first preset angle may include 90° and 180°.
  • the second preset angle may be 1°, 2° or other smaller angle values.
  • the terminal device when the terminal device detects the theme switching operation, and the theme switching operation is the above-mentioned three types of folding operations (the folding operation of the folding screen, even if the folding angle between the first screen and the second screen changes) Folding operation; changing the folding angle between the first screen and the second screen to a first preset angle; making the change amount of the folding angle between the first screen and the second screen reach the second In any one of the preset angle folding operations), the terminal device may use the folding angle of the folding operation as the switching parameter, or use the folding angle difference of the folding operation as the switching parameter.
  • the folding angle of the folding operation may be the folding angle between the first screen and the second screen after the folding operation is performed.
  • the folding angle difference of the folding operation is the difference between the folding angle between the first screen and the second screen before the folding operation is performed, and the folding angle between the first screen and the second screen after the folding operation is performed.
  • the switching parameter may be a random number generated when the terminal device detects the theme switching operation.
  • step S301 can be referred to the specific description of step S201 in FIG. 2a, which will not be repeated here.
  • Step S302 The terminal device uses the theme object corresponding to the folding angle of the folding operation as the theme object to be activated according to the correspondence between the folding angle and the subject object.
  • the theme object corresponding to the folding angle of the folding operation may be used as the theme object to be activated according to the corresponding relationship between the folding angle and the subject object preset by the terminal device.
  • one subject object may correspond to one or more folding angles.
  • the theme switching operation is a folding operation in which the change in the folding angle between the first screen and the second screen reaches a second preset angle, and the second preset angle is 5°
  • the folding angle and the theme The correspondence between objects can be shown in Table 3.
  • the terminal device may, according to the preset correspondence between the folding angle difference and the subject object, determine the subject object corresponding to the folding angle difference of the folding operation As the subject to be activated.
  • the switching parameter includes a random number generated when the terminal device detects the theme switching operation
  • the terminal device can detect the theme switching by the terminal device according to the preset correspondence between the random number and the theme object The subject object corresponding to the random number generated during the operation is used as the subject object to be activated.
  • Step S303 The terminal device switches the subject object to be activated into the subject object of the terminal device.
  • the terminal device determines the theme object to be activated, it can switch the theme object to be activated to the theme object of the terminal device.
  • a specific implementation manner of switching the subject object to be activated to the subject object of the terminal device may be: switching the subject object to be activated to the first screen And the subject object of the second screen. In this way, the subject objects of the first screen and the second screen can be switched at the same time.
  • the terminal device includes a first screen and a second screen, and the first screen and the second screen may display one interface together, or may display different interfaces.
  • the first screen and the second screen can display an interface (such as the main screen interface or the interface of an application) together, as shown in Figure 3b in the folding first screen.
  • the first screen 32 and the second screen 33 may jointly display the main screen interface.
  • the first screen and the second screen may display different interfaces.
  • the first screen may display the interface of the application a running in the terminal device
  • the second screen may display the interface of the application b running in the terminal device, where the interface of the application a and the interface of the application b are different.
  • the terminal device includes a first screen and a second screen, and when a theme switching operation is detected, when the first screen and the second screen display different interfaces, the terminal device needs to respectively determine the waiting screen corresponding to the first screen. Enable the theme object and the theme object to be activated corresponding to the second screen, and then switch the theme object to be activated corresponding to the first screen to the theme object of the first screen, and switch the theme object to be activated corresponding to the second screen to the second screen Subject object.
  • switching the theme object to be activated corresponding to the first screen to the theme object of the first screen means: The corresponding theme object to be activated is switched to the theme object of the operating system. If the interface displayed on the first screen is an interface of an application when the theme switching operation is detected, the theme object to be activated corresponding to the first screen is switched to the theme object of the first screen. The subject to be activated is switched to the subject of the application.
  • the terminal device when the terminal device needs to separately determine the theme object to be activated corresponding to the first screen and the theme object to be activated corresponding to the second screen, if the switching parameter includes the folding angle of the folding operation, the terminal device can be based on the folding angle and the theme object The corresponding relationship between determining the theme object to be activated corresponding to the first screen and the theme object to be activated corresponding to the second screen; or, according to the corresponding relationship (between the folding angle and the theme object) respectively determining the corresponding relationship of the first screen The theme object to be activated and the theme object to be activated corresponding to the second screen.
  • the terminal device can determine the theme object to be activated corresponding to the first screen and the theme object to be activated corresponding to the second screen according to the correspondence between the folding angle difference and the subject object;
  • the to-be-activated theme object corresponding to the first screen and the to-be-activated theme object corresponding to the second screen are respectively determined according to different correspondences (between the folding angle difference and the theme object).
  • the terminal device determines the subject to be activated.
  • the determined subject objects to be activated are different.
  • the background color displayed on the screen of the terminal device may be different. For example, as the folding angle becomes larger and larger, the background color displayed on the screen of the terminal device may become darker or lighter. This can give the user more screen feedback when the user rotates the screen, which is beneficial to improve the user experience and enhance the fun of the terminal device.
  • the specific implementation manner for the terminal device to switch the theme object to be activated to the theme object of the terminal device may be:
  • the theme object to be activated is switched to the theme object of the screen operated by the foregoing theme switching operation.
  • the screen operated by the theme switching operation may be the first screen and/or the second screen.
  • the screen operated by the theme switching operation is a trigger operation (such as a tap, long press, or sliding operation) for a preset switching button in the terminal device
  • the screen operated by the theme switching operation may be the screen where the preset switching button is located.
  • the screens operated by the theme switching operation are the first screen and the second screen. Taking FIG. 3b as an example, when the user flips the second screen 33 backward, and the theme switching operation is a folding operation of the folding screen, the screen operated by the theme switching operation is the second screen.
  • the folding angle between the first screen 32 and the second screen 33 changes to a first preset angle
  • the theme switching operation is to make the first screen and the second screen
  • the screen operated by the theme switching operation is the second screen.
  • the change in the folding angle between the first screen 32 and the second screen 33 is greater than or equal to the second preset angle
  • the theme switching operation is to make the first screen and the second screen
  • the screen operated by the theme switching operation is the second screen.
  • the terminal device when the terminal device may include a folding screen, and the folding screen may include a first screen and a second screen, the theme object to be activated may include the first theme object and the second theme object, and the first theme object
  • the specific implementation manner for the terminal device to switch the theme object to be activated to the theme object of the terminal device may be: switching the first theme object to the theme object of the first screen, And switch the second subject object to the subject object of the second screen.
  • the theme objects to be activated may include N theme objects, and the N theme objects may be a group of theme objects, and there is an association relationship between the theme objects in the same group of theme objects.
  • N can be any positive integer.
  • the theme object to be activated includes a first theme object and a second theme object
  • the first theme object is the theme object of the first screen
  • the second theme object is the theme object of the second screen
  • the first screen and the second screen When the folding angle between them is 30°, take the schematic diagram of the background images displayed on the first screen and the second screen shown in FIG. 3c as an example. It can be seen from FIG. 3c that the background image of the first screen 32 is a little boy, the background image of the second screen 33 is a little girl, and the distance between the little boy and the little girl is relatively long.
  • FIGS. 3d a schematic diagram of the background images displayed on the first screen and the second screen is shown in Figure 3d Shown. It can be seen from Fig. 3d that when the folding angle between the first screen and the second screen is reduced from 30° to 0°, the distance between the little boy and the little girl becomes smaller. It should be noted that the terminal device may determine the first theme object and the second theme object according to the folding angle between the first screen and the second screen. In the example shown in FIGS.
  • the first theme object and the second theme object are determined, and the first theme object is used as the first screen
  • the second theme object is used as the theme object of the second screen
  • the first screen and/or the second screen can be rotated to make the folding angle between the first screen and the second screen smaller and smaller, so that the user can see that the distance between the little boy and the little girl is getting closer and closer.
  • the dynamic effect is conducive to improving the fun of the terminal equipment.
  • each of the N theme objects may be independent of each other, that is, between each theme object There is no relationship.
  • the folding angle of the folding operation is acquired, and the theme object corresponding to the folding angle of the folding operation is used as the theme to be activated according to the correspondence between the folding angle and the subject object Object
  • the theme object to be activated is in the loaded state, and then the theme object to be activated is switched to the theme object of the terminal device. Since the theme object to be activated is in the loaded state before the theme object to be activated is switched to the theme object of the terminal device, it is possible to avoid the need to spend time loading the theme object to be activated before switching to the theme object of the terminal device Theme objects, thereby helping to improve the theme switching efficiency of the terminal device.
  • FIG. 4 is a schematic flowchart of another theme switching method provided by an embodiment of the present application.
  • the method describes in detail how the switching parameters include the folding angle of the folding operation and auxiliary information, and how to use the folding angle of the folding operation And auxiliary information to determine the subject to be activated.
  • the subject of the subject switching method is executed by a terminal device or a chip in the terminal device.
  • the following takes the terminal device as the subject of execution of the subject switching method as an example for description.
  • the method may include but is not limited to the following steps:
  • Step S401 When a theme switching operation is detected, the terminal device acquires switching parameters, where the terminal device includes a folding screen, the folding screen includes a first screen and a second screen; the theme switching operation includes one of the following operations or Various: folding operation of the folding screen; folding operation of changing the folding angle between the first screen and the second screen to a first preset angle; making the folding operation between the first screen and the second screen The amount of change of the folding angle reaches the folding operation at the second preset angle; the switching parameter includes the folding angle of the folding operation and auxiliary information, and the auxiliary information includes one or more of time information, date information, and weather information.
  • the switching parameters may include the folding angle of the folding operation (or the folding angle difference of the folding operation, the random number generated when the terminal device detects the theme switching operation) and auxiliary information.
  • the auxiliary information may include, but is not limited to: one or more of time information, date information, weather information, and application information in one or more applications installed in the terminal device.
  • the application program may be an application that records holidays, an application that records the mood of the user, and so on. It should be noted that the rest of the execution process of step S401 can be referred to the specific description of step S301 in FIG. 3a, which will not be repeated here.
  • Step S402 The terminal device determines the target theme object set corresponding to the folding angle of the folding operation according to the correspondence between the folding angle and the theme object set.
  • the terminal device may determine the corresponding relationship according to the preset folding angle and the corresponding relationship between the set of theme objects.
  • the target theme object set corresponding to the folding angle of the folding operation; and then according to the auxiliary information, the theme object to be activated is determined from the target theme object set.
  • each theme object collection includes two or more theme objects.
  • the theme objects included in different theme object sets may be completely different or not exactly the same. For example, theme object set a includes theme object 1 and theme object 2, and theme object set b includes theme object 1 and theme object 3.
  • At least one theme parameter is different in the display screen of the terminal device.
  • the folding angle of the folding operation is greater than 0° (that is, when the folding screen is in the folded state)
  • the target theme object set determined according to the folding angle of the folding operation is the theme object set a
  • the terminal device sets the theme object set a
  • the background color of the main screen of the terminal device can be displayed as black.
  • the target theme object set determined according to the folding angle of the folding operation is the theme object set b
  • the terminal device sets any of the theme object sets b
  • the theme object set a includes a plurality of dark night theme objects
  • the theme object set b includes a plurality of day theme objects.
  • At least one theme parameter is different in the display screen of the terminal device.
  • the target theme object set includes multiple daytime theme objects
  • the terminal device uses different daytime theme objects among the multiple daytime theme objects as the theme objects of the terminal device
  • the main screen displayed on the display screen of the terminal device The background image and/or icon shape can be different.
  • Step S403 The terminal device determines the theme object to be activated from the target theme object set according to the auxiliary information.
  • the terminal device can determine the theme object to be activated from the target theme object set according to the auxiliary information. For example, when the auxiliary information includes date information, and the date information in the terminal device is September 10, the terminal device may determine that the day is Teacher's Day. If the target theme object set includes a plurality of daytime theme objects, the terminal device may use the theme object corresponding to Teacher's Day among the plurality of daytime theme objects as the theme object to be activated. Furthermore, the theme object to be activated is switched to the theme object of the terminal device, so that the background picture related to Teacher's Day can be displayed on the screen of the terminal device, which is beneficial to improve the interest of the terminal.
  • the auxiliary information includes date information, and the date information in the terminal device is September 10
  • the terminal device may determine that the day is Teacher's Day.
  • the target theme object set includes a plurality of daytime theme objects
  • the terminal device may use the theme object corresponding to Teacher's Day among the plurality of daytime theme objects as the theme object to be activated.
  • the terminal device can compare the multiple daytime subject objects with sunny weather.
  • the corresponding theme object is used as the theme object to be activated.
  • the theme object to be activated is switched to the theme object of the terminal device, so that a background picture related to sunny weather (such as a sun picture) can be displayed on the screen of the terminal device, which is beneficial to increase the interest of the terminal.
  • the terminal device may use the multiple Among the daytime theme objects, the theme object corresponding to the pleasant mood is used as the theme object to be activated. Then switch the subject to be activated to the subject of the terminal device, so that the background picture related to the pleasant mood can be displayed on the screen of the terminal device, so that when the user sees the background picture, the mood becomes better and at the same time It is helpful to improve the fun of the terminal.
  • day-related background pictures may all include one or more images.
  • sunny weather-related background pictures may all include one or more images.
  • happy mood-related background pictures may all include one or more images. When multiple images are included, they are displayed on the terminal device as A dynamic image.
  • Step S404 The terminal device switches the subject object to be activated into the subject object of the terminal device.
  • step S404 refers to the specific description of step S303 in FIG. 3a, which will not be repeated here.
  • the folding angle and auxiliary information of the folding operation are acquired, and the target theme corresponding to the folding angle of the folding operation is determined according to the correspondence between the folding angle and the subject object Object collection; and then according to the auxiliary information, determine the theme object to be activated from the target theme object collection, the theme object to be activated is in the loaded state, and then the theme object to be activated is switched to the theme object of the terminal device.
  • the theme object to be activated is in the loaded state before the theme object to be activated is switched to the theme object of the terminal device, it is possible to avoid the need to spend time loading the theme object to be activated before switching to the theme object of the terminal device Theme objects, thereby helping to improve the theme switching efficiency of the terminal device.
  • the theme object to be activated is determined from the target theme object set, which is beneficial to improve the interest of the terminal.
  • FIG. 5 is a schematic structural diagram of a theme switching device provided by an embodiment of the present application.
  • the theme switching device 50 may be a terminal device or a device with terminal device functions (such as a chip).
  • the theme switching device 50 is used for Performing the steps performed by the terminal device in the method embodiment corresponding to FIGS. 2a-4, the theme switching apparatus 50 may include:
  • the obtaining module 501 is configured to obtain switching parameters when a theme switching operation is detected
  • the determining module 502 is configured to determine the subject object to be activated according to the switching parameter, and the subject object to be activated is in a loaded state;
  • the switching module 503 is configured to switch the theme object to be activated to the theme object of the terminal device.
  • the terminal device stores a plurality of theme objects, each of the plurality of theme objects includes a class loader and path information, and the theme object is loaded by the class loader and indicated by the path information.
  • the theme package is obtained; where each theme package includes a resource identifier and a resource value.
  • the resource identifiers in different theme packages are the same and the resource values are different, and different theme objects include different class loaders.
  • the terminal device includes a folding screen, the folding screen includes a first screen and a second screen; the aforementioned theme switching operation includes one or more of the following operations: folding the folding screen;
  • the change in the folding angle between the first screen and the second screen is a folding operation at a first preset angle; the change in the folding angle between the first screen and the second screen reaches the second preset angle Folding operation.
  • the switching parameter includes the folding angle of the folding operation; the determining module 502 may be specifically configured to: according to the corresponding relationship between the folding angle and the subject object, use the subject object corresponding to the folding angle of the folding operation as the waiting Enable subject objects.
  • the switching parameters include the folding angle of the folding operation and auxiliary information
  • the auxiliary information includes: one or more of time information, date information, and weather information
  • the determining module 502 can be specifically used to: The corresponding relationship between the folding angle and the theme object set determines the target theme object set corresponding to the folding angle of the folding operation; and according to the auxiliary information, the theme object to be activated is determined from the target theme object set.
  • the terminal device includes a folding screen, the folding screen includes a first screen and a second screen; the switching module 503 may be specifically used to: switch the subject to be activated to the screen operated by the subject switching operation Subject object.
  • the terminal device includes a folding screen, the folding screen includes a first screen and a second screen; the aforementioned subject object to be activated includes a first subject object and a second subject object, the first subject object and the second subject object There is an association relationship between the two theme objects; the switching module 503 may be specifically used to: switch the first theme object to the theme object of the first screen, and switch the second theme object to the theme object of the second screen.
  • FIG. 6 is a schematic structural diagram of a theme switching device provided by an embodiment of the present application.
  • the theme switching device may be a terminal device or a device (such as a chip) with terminal device functions.
  • the theme switching device 60 may include a processor 601 and a memory 602.
  • the processor 601 and the memory 602 may be connected to each other through one or more communication buses, or may be connected in other ways.
  • the related functions implemented by the acquiring module 501, the determining module 502, and the switching module 503 shown in FIG. 5 may be implemented by the same processor 601, or may be implemented by multiple different processors 601.
  • the processor 601 is configured to perform corresponding functions of the terminal device in the methods described in FIGS. 2a-4.
  • the processor 601 may include one or more processors.
  • the processor 601 may be one or more central processing units (CPUs), network processors (network processors, NPs), hardware chips, or any of them. combination.
  • the processor 601 is a CPU, the CPU may be a single-core CPU or a multi-core CPU.
  • the memory 602 is used to store program codes and the like.
  • the memory 602 may include a volatile memory (volatile memory), such as a random access memory (random access memory, RAM); the memory 602 may also include a non-volatile memory (non-volatile memory), such as a read-only memory (read-only memory).
  • volatile memory volatile memory
  • non-volatile memory non-volatile memory
  • read-only memory read-only memory
  • ROM read-only memory
  • flash memory flash memory
  • HDD hard disk drive
  • SSD solid-state drive
  • memory 602 may also include a combination of the foregoing types of memories.
  • the processor 601 may call the program code stored in the memory 602 to perform the following operations:
  • the terminal device stores a plurality of theme objects, each of the plurality of theme objects includes a class loader and path information, and the theme object is loaded by the class loader and indicated by the path information.
  • the theme package is obtained; where each theme package includes a resource identifier and a resource value.
  • the resource identifiers in different theme packages are the same and the resource values are different, and different theme objects include different class loaders.
  • the terminal device includes a folding screen, the folding screen includes a first screen and a second screen; the aforementioned theme switching operation includes one or more of the following operations: folding the folding screen;
  • the change in the folding angle between the first screen and the second screen is a folding operation at a first preset angle; the change in the folding angle between the first screen and the second screen reaches the second preset angle Folding operation.
  • the switching parameter includes the folding angle of the folding operation; when the processor 601 determines the subject object to be activated according to the switching parameter, the following operations can be specifically performed: according to the correspondence between the folding angle and the subject object, The theme object corresponding to the folding angle of the folding operation is used as the theme object to be activated.
  • the switching parameter includes a folding angle of the folding operation and auxiliary information
  • the auxiliary information includes: one or more of time information, date information, and weather information
  • the processor 601 executes the determination according to the switching parameter
  • the following operations can be performed: according to the correspondence between the folding angle and the theme object set, determine the target theme object set corresponding to the folding angle of the folding operation; and according to the auxiliary information, from the target theme Determine the subject object to be activated in the object collection.
  • the terminal device includes a folding screen, and the folding screen includes a first screen and a second screen; when the processor 601 executes to switch the subject object to be activated to the subject object of the terminal device, the following can be specifically executed Operation: Switch the subject to be activated to the subject of the screen operated by the subject switching operation.
  • the terminal device includes a folding screen, the folding screen includes a first screen and a second screen; the aforementioned subject object to be activated includes a first subject object and a second subject object, the first subject object and the second subject object 2.
  • the processor 601 executes to switch the subject subject to be activated to the subject object of the terminal device, it can specifically perform the following operations: switch the first subject object to the subject object of the first screen , And switch the second subject object to the subject object of the second screen.
  • the processor 601 may also perform operations corresponding to the terminal device in the embodiment shown in FIG. 2a to FIG. 4. For details, please refer to the description in the method embodiment, which will not be repeated here.
  • the embodiment of the present application also provides a computer-readable storage medium, which can be used to store the computer software instructions used by the theme switching device in the embodiment shown in FIG. .
  • the above-mentioned computer-readable storage medium includes, but is not limited to, flash memory, hard disk, and solid state hard disk.
  • the embodiments of the present application also provide a computer program product.
  • the computer product When the computer product is run by a computing device, it can execute the method designed for the terminal device in the embodiment of FIG. 2a to FIG. 4 above.
  • the embodiment of the present application also provides a processor, the processor includes at least one circuit for acquiring a switching parameter when a theme switching operation is detected, and determining the theme object to be activated according to the switching parameter, and the theme object to be activated is in Loaded state; the processor also includes at least one circuit for switching the theme object to be activated to the theme object of the terminal device.
  • the foregoing processor may be a chip, and may execute instructions or programs designed for terminal devices in the foregoing embodiments.
  • An embodiment of the present application also provides a chip system, the chip system includes a processor, and the processor is configured to implement the theme switching method designed for the terminal device in the embodiments of FIG. 2a to FIG. 4.
  • the chip system further includes a memory, which is used to store program instructions and data necessary for realizing the functions of the terminal device.
  • the chip system can be composed of chips, and can also include chips and other discrete devices.
  • a chip including a processor and a memory.
  • the memory includes a processor and a memory.
  • the memory is used to store a computer program.
  • the processor is used to call and run the computer program from the memory.
  • the computer program is used to implement the method in the above method embodiment.
  • the above-mentioned embodiments it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • software it can be implemented in the form of a computer program product in whole or in part.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium.
  • the computer instructions can be sent from a website site, computer, server, or data center to another website site via wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) , Computer, server or data center for transmission.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center integrated with one or more available media.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, and a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)).

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)
  • Telephone Function (AREA)

Abstract

一种主题切换方法以及主题切换装置,该方法应用终端设备,其中,该方法包括:在检测到主题切换操作时,获取切换参数(S201);并根据该切换参数确定待启用主题对象,该待启用主题对象处于已加载状态(S202);将该待启用主题对象切换为终端设备的主题对象(S203)。所述方法和装置有利于提高终端设备的主题切换效率。

Description

一种主题切换方法以及主题切换装置
本申请要求于2019年9月2日提交中国专利局、申请号为201910825379.2、申请名称为“一种主题切换方法以及主题切换装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及终端技术领域,尤其涉及一种主题切换方法及主题切换装置。
背景技术
随着终端的普及,以及通信技术的不断发展,人们对终端的功能提出了更高的要求。多变的主题可以让终端呈现的元素更加丰富,也能提高终端的趣味性。
但是,当前终端在同一时间下只有一种主题生效。如果需要切换到其他主题,需要用户手动在主题界面中选择待切换的主题,然后在该终端加载完该待切换的主题之后,才能完成主题切换。采用现有主题切换方法进行主题切换,需要一段时间加载待切换的主题,这样会导致切换效率较低。
发明内容
本申请实施例提供一种主题切换方法及主题切换装置,有利于提高主题切换效率。
第一方面,本申请实施例提供了一种主题切换方法,该方法应用于终端设备,该方法包括:在检测到主题切换操作时,获取切换参数;并根据该切换参数确定待启用主题对象,该待启用主题对象处于已加载状态;将该待启用主题对象切换为终端设备的主题对象。
在该技术方案中,由于在将待启用主题对象切换为终端设备的主题对象之前,该待启用主题对象处于已加载状态,可以避免在将待启用主题对象切换为终端设备的主题对象之前需要花费时间去加载该待启用主题对象,从而有利于提高终端设备的主题切换效率。
在一种实现方式中,该终端设备中存储有多个主题对象,该多个主题对象中的每个主题对象包括类加载器和路径信息,该主题对象由该类加载器加载该路径信息指示的主题包得到;其中,每个主题包包括资源标识和资源取值,不同主题包中的资源标识相同且资源取值不同,不同主题对象包括的类加载器不同。
在该技术方案中,相较于现有技术中不同主题包中的资源标识不同且资源取值不同,在本申请实施例中,不同主题包中的资源标识相同且资源取值不同,这样可以避免根据主题对象的个数选择资源标识,有利于减少代码量,并有利于提高主题切换效率。另外,在安卓操作系统中,不能定义两个相同的资源标识,但是由于本申请实施例中的不同主题对象是通过不同的类加载器加载得到的。因此,即使不同主题包中的资源标识相同,也可以在终端设备中同时加载该不同主题包。这样使得终端设备中可以存在多个处于已加载状态的主题对象,这样可以避免终端设备在检测到主题切换操作时,需要花费一段时间加载待启用主题对象,并在加载完毕之后才能实现主题切换,从而有利于提高主题切换效率和用户体验。
在一种实现方式中,该终端设备包括折叠屏,该折叠屏包括第一屏幕和第二屏幕;前 述主题切换操作包括如下操作中的一种或多种:对该折叠屏的折叠操作;使该第一屏幕和该第二屏幕之间的折叠角度变化为第一预设角度的折叠操作;使该第一屏幕和该第二屏幕之间的折叠角度的变化量达到第二预设角度的折叠操作。
在该技术方案中,当主题切换操作为使该第一屏幕和该第二屏幕之间的折叠角度的变化量达到第二预设角度的折叠操作时,可以避免终端设备发生碰撞或因其他原因使折叠屏发生抖动时(此时用户并不希望切换终端设备的主题对象),导致第一屏幕和第二屏幕之间的折叠角度发生变化,进而使终端设备的主题发生切换的情况,有利于避免误操作。
在一种实现方式中,该切换参数包括折叠操作的折叠角度;根据该切换参数确定待启用主题对象的具体实施方式可以为:根据折叠角度和主题对象之间的对应关系,将该折叠操作的折叠角度对应的主题对象作为待启用主题对象。
在一种实现方式中,该切换参数包括折叠操作的折叠角度和辅助信息,该辅助信息包括:时间信息、日期信息和天气信息中的一种或多种;根据该切换参数确定待启用主题对象的具体实施方式可以为:根据折叠角度和主题对象集合之间的对应关系,确定与该折叠操作的折叠角度对应的目标主题对象集合;并根据该辅助信息,从该目标主题对象集合中确定待启用主题对象。
在该技术方案中,根据辅助信息,从该目标主题对象集合中确定待启用主题对象,有利于提高终端的趣味性。
在一种实现方式中,该终端设备包括折叠屏,该折叠屏包括第一屏幕和第二屏幕;将前述待启用主题对象切换为该终端设备的主题对象的具体实施方式可以为:将前述待启用主题对象切换为前述主题切换操作所操作的屏幕的主题对象。
在该技术方案中,可以在用户仅翻转终端设备包括的多个屏幕中的部分屏幕时,仅切换被用户翻转的屏幕的主题对象。
在一种实现方式中,该终端设备包括折叠屏,该折叠屏包括第一屏幕和第二屏幕;前述待启用主题对象包括第一主题对象和第二主题对象,该第一主题对象和该第二主题对象之间存在关联关系;将前述待启用主题对象切换为该终端设备的主题对象的具体实施方式可以为:将该第一主题对象切换为该第一屏幕的主题对象,并将该第二主题对象切换为该第二屏幕的主题对象。
在该技术方案中,第一主题对象和第二主题对象之间存在关联关系时,将该第一主题对象切换为该第一屏幕的主题对象,并将该第二主题对象切换为该第二屏幕的主题对象,有利于增强终端设备的趣味性。
第二方面,本申请实施例提供了一种主题切换装置,该装置为终端设备或具有终端设备功能的装置(例如芯片)。该装置具有实现第一方面所提供的主题切换方法的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。
第三方面,本申请实施例提供一种计算机可读存储介质,用于储存为第二方面所述的主题切换装置所用的计算机程序指令,其包含用于执行上述第一方面所涉及的程序。
第四方面,本申请实施例提供一种主题切换装置,该装置为终端设备或具有终端设备功能的装置(例如芯片)。该装置包括存储器和处理器,存储器中存储有程序指令,处理 器通过总线与存储器连接,处理器调用存储器中存储的程序指令以使该装置执行第一方面所述的方法。
第五方面,本申请实施例提供一种计算机程序产品,该程序产品包括程序,所述程序被执行时实现上述第一方面所述的方法。
第六方面,本申请实施例还提供一种处理器,该处理器包括至少一个电路,用于在检测到主题切换操作时,获取切换参数,并根据该切换参数确定待启用主题对象,该待启用主题对象处于已加载状态;该处理器还包括至少一个电路,用于将该待启用主题对象切换为终端设备的主题对象。上述处理器可以为芯片,可以执行用于实现前述第一方面所涉及的方法的指令或程序。
第七方面,本申请实施例还提供了一种芯片系统,该芯片系统包括处理器,例如,应用于终端设备中,用于实现上述第一方面中所涉及的功能或方法。在一种可行的实现方式中,所述芯片系统还包括存储器,该存储器用于保存实现上述第一方面所述方法的功能必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包括芯片和其他分立器件。
附图说明
图1a是本申请实施例提供的一种终端设备100的主屏幕的示意图;
图1b是用户翻转图1a所示的终端设备100的场景示意图;
图1c是本申请实施例公开的一种终端设备100的结构示意图;
图1d是本申请实施例公开的一种终端设备100的软件系统的示意图;
图2a是本申请实施例公开的一种主题切换方法的流程示意图;
图2b是本申请实施例公开的一种用户在主题设置页面中设置主题参数的场景示意图;
图2c是本申请实施例公开的一种用户点击主题设置页面中的确定设置按钮22之后,终端设备的主屏幕的示意图;
图3a是本申请实施例公开的另一种主题切换方法的流程示意图;
图3b是本申请实施例公开的一种对图1a所示的终端设备100进行折叠操作的场景示意图;
图3c是本申请实施例公开的一种第一屏幕和第二屏幕之间的折叠角度为30°时,该第一屏幕和该第二屏幕中显示的背景图像的示意图;
图3d是本申请实施例公开的一种第一屏幕和第二屏幕之间的折叠角度为0°时,该第一屏幕和第二屏幕中显示的背景图像的示意图;
图4是本申请实施例公开的又一种主题切换方法的流程示意图;
图5是本申请实施例公开的一种主题切换装置的结构示意图;
图6是本申请实施例公开的另一种主题切换装置的结构示意图。
具体实施方式
为了更好的理解本申请实施例公开的一种主题切换方法,下面首先对本申请实施例适用的应用场景进行描述。
请参见图1a,为本申请实施例提供的一种终端设备100的主屏幕的示意图。如图1a所示, 终端设备100的主屏幕包括多个应用图标(如视频、文件、照相机、音乐、商店、图库、设置、应用、电话和短信)以及时间图标、通信信号图标、无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络连接状态图标、电池图标等。
当用户翻转图1a所示的终端设备100时,该终端设备100可以检测到主题切换操作,并获取切换参数,进而根据该切换参数确定待启用主题对象,该待启用主题对象处于已加载状态,然后将该待启用主题对象切换为终端设备100的主题对象。
其中,终端通过设置主题对象可以同时设置该终端的背景颜色、待机图片、屏幕保护程序、铃声、操作界面、图标、文字和屏幕布局等内容,使用户可以更便捷地为终端实现个性化。其中,屏幕布局可以确定屏幕中显示的元素在该屏幕中的显示位置。终端设备100中可以存储有多个主题对象,该多个主题对象至少包括终端设备100在被翻转之前所采用的主题对象(如主题对象1)以及终端设备100在被翻转之后所采用的主题对象(即前述待启用主题对象)。
图1b是用户翻转图1a所示的终端设备100的场景示意图。本申请实施例以待启用主题对象为主题对象2为例进行介绍,并以终端设备100采用主题对象1时,该终端设备100的主屏幕的背景颜色为白色,终端设备100采用主题对象2时,该终端设备100的主屏幕的背景颜色为灰色为例进行介绍。如图2b可见,用户翻转图1a所示的终端设备100之前,终端设备100的主屏幕的背景颜色为白色,用户翻转图1a所示的终端设备100之后,终端设备100的主屏幕的背景颜色变为灰色。换言之,用户翻转图1a所示的终端设备100(即终端设备100检测到主题切换操作),可以将主题对象2切换为终端设备100的主题对象,即终端设备100的主题对象由主题对象1变为主题对象2。
切换参数可以包括图1b中的翻转角度,终端设备100可以存储有翻转角度和主题对象之间的对应关系,并根据该对应关系,将图1b中的翻转角度对应的主题对象作为待启用主题对象。需要说明的是,待启用主题对象处于已加载状态,待启用主题对象处于已加载状态表示:待启用主题对象已加载到终端设备100的内存空间中。本申请实施例在将待启用主题对象切换为终端设备100的主题对象之前,该待启用主题对象处于已加载状态,可以避免在将待启用主题对象切换为终端设备100的主题对象之前需要花费时间去加载该待启用主题对象,从而有利于提高终端设备100的主题切换效率。
需要说明的是,上述主题切换操作包括用户翻转图1a所示的终端设备100仅用于举例,并不构成对本申请实施例的限定,在其他可行的实现方式中,只要是用于触发主题切换的操作均为本申请实施例中所述的主题切换操作。换言之,本申请实施例提出的主题切换方法适用于任何主题切换场景。
其中,终端设备100也可以称为终端(terminal)、用户设备(user equipment,UE)、移动台(mobile station,MS)、移动终端(mobile terminal,MT)等。终端设备可以是手机(mobile phone)、智能电视、穿戴式设备、平板电脑(Pad)、带无线收发功能的电脑、虚拟现实(virtual reality,VR)终端设备、增强现实(augmented reality,AR)终端设备、工业控制(industrial control)中的无线终端、无人驾驶(self-driving)中的无线终端、远程手术(remote medical surgery)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家 庭(smart home)中的无线终端等等。本申请的实施例对终端设备所采用的具体技术和具体设备形态不做限定。
可以理解的是,本申请实施例描述的网络架构是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域普通技术人员可知,随着系统架构的演变和新业务场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。
为了能够更好地理解本申请实施例,下面对本申请实施例的终端设备的结构进行介绍:
图1c示出了终端设备100的结构示意图。终端设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本申请实施例示意的结构并不构成对终端设备100的具体限定。在本申请另一些实施例中,终端设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现终端设备100的触摸功能。
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现终端设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现终端设备100的显示功能。
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为终端设备100充电,也可以用于终端设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对终端设备100的结构限定。在本申请另一些实施例中,终端设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过终端设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为终端设备供电。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。
终端设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。终端设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在终端设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。
无线通信模块160可以提供应用在终端设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,终端设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得终端设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple  access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
终端设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,终端设备100可以包括1个或N个显示屏194,N为大于1的正整数。
终端设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,终端设备100可以包括1个或N个摄像头193,N为大于1的正整数。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当终端设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。终端设备100可以支持一种或多种视频编解码器。这样,终端设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现终端设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理 解等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展终端设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储终端设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行终端设备100的各种功能应用以及数据处理。
终端设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。终端设备100可以通过扬声器170A收听音乐,或收听免提通话。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当终端设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。终端设备100可以设置至少一个麦克风170C。在另一些实施例中,终端设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,终端设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。终端设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,终端设备100根据压力传感器180A检测所述触摸操作强度。终端设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强 度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。
陀螺仪传感器180B可以用于确定终端设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定终端设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测终端设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消终端设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。
气压传感器180C用于测量气压。在一些实施例中,终端设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。
磁传感器180D包括霍尔传感器。终端设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当终端设备100是翻盖机时,终端设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。
加速度传感器180E可检测终端设备100在各个方向上(一般为三轴)加速度的大小。当终端设备100静止时可检测出重力的大小及方向。还可以用于识别终端设备姿态,应用于横竖屏切换,计步器等应用。
距离传感器180F,用于测量距离。终端设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,终端设备100可以利用距离传感器180F测距以实现快速对焦。
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。终端设备100通过发光二极管向外发射红外光。终端设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定终端设备100附近有物体。当检测到不充分的反射光时,终端设备100可以确定终端设备100附近没有物体。终端设备100可以利用接近光传感器180G检测用户手持终端设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。
环境光传感器180L用于感知环境光亮度。终端设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测终端设备100是否在口袋里,以防误触。
指纹传感器180H用于采集指纹。终端设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。
温度传感器180J用于检测温度。在一些实施例中,终端设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,终端设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,终端设备100对电池142加热,以避免低温导致终端设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,终端设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由 触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于终端设备100的表面,与显示屏194所处的位置不同。
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。终端设备100可以接收按键输入,产生与终端设备100的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和终端设备100的接触和分离。终端设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。终端设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,终端设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在终端设备100中,不能和终端设备100分离。
终端设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android系统为例,示例性说明终端设备100的软件结构。
图1d是本申请实施例的终端设备100的软件结构框图。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。
应用程序层可以包括一系列应用程序包。
如图1d所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN, 蓝牙,音乐,视频,短信息等应用程序。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图1d所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
电话管理器用于提供终端设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,终端设备振动,指示灯闪烁等。
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。
2D图形引擎是2D绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。
下面结合捕获拍照场景,示例性说明终端设备100软件以及硬件的工作流程。
当触摸传感器180K接收到触摸操作,相应的硬件中断被发给内核层。内核层将触摸操作加工成原始输入事件(包括触摸坐标,触摸操作的时间戳等信息)。原始输入事件被存储在内核层。应用程序框架层从内核层获取原始输入事件,识别该输入事件所对应的控件。以该触摸操作是触摸单击操作,该单击操作所对应的控件为相机应用图标的控件为例,相机应用调用应用框架层的接口,启动相机应用,进而通过调用内核层启动摄像头驱动,通过摄像头193捕获静态图像或视频。
下面结合附图对本申请提供的主题切换方法及主题切换装置进行详细地介绍。
请参见图2a,图2a是本申请实施例提供的一种主题切换方法的流程示意图,该主题切换方法的执行主体为终端设备,或者为终端设备中的芯片,以下以终端设备为主题切换方法的执行主体为例进行说明。如图2a所示,该方法可以包括但不限于如下步骤:
步骤S201:在检测到主题切换操作时,终端设备获取切换参数。
在本申请实施例中,终端设备可以实时、周期或不定期检测预设的主题切换操作,并在检测到该主题切换操作时获取切换参数。具体的,主题切换操作可以是针对终端设备中的预设切换按钮的触发操作(如点击、长按或滑动操作),该预设切换按钮可以是终端设备的显示屏中的虚拟按钮,也可以是终端设备中的硬件按键,本申请实施例对此不做限定。在一种实现方式中,主题切换操作可以是对终端设备的翻转操作,对终端设备的翻转操作会使得终端设备的翻转角度发生变化。对终端设备的翻转操作可以指使终端设备围绕第一方向旋转,该第一方向可以包括与终端设备的竖向边框(如图1a中终端设备100的边框中的长度方向,图1a未示出)平行的方向、与终端设备的横向边框(如图1a中终端设备100的边框中的宽度方向,图1a未示出)平行的方向或与终端设备的屏幕垂直的方向中的任意一种。在一种实现方式中,终端设备可以默认设置主题切换操作,也可以由用户自定义或者更改设置的主题切换操作。
终端设备检测到主题切换操作时,表明需要切换终端设备的主题对象。需要说明的是,终端设备的主题对象可以包括终端设备的操作系统所采用的主题对象和/或终端设备当前运行的应用程序所采用的主题对象。需要说明的是,在本申请实施例中提及终端设备的主题对象时,具体可以指终端设备的操作系统的主题对象和/或终端设备当前运行的应用程序的主题对象。针对终端设备的操作系统所采用的主题对象的主题切换操作,和终端设备当前运行的应用程序所采用的主题对象的主题切换操作可以相同,换言之,终端设备在检测到主题切换操作时,表明需要切换终端设备的操作系统所采用的主题对象和终端设备当前运行的应用程序所采用的主题对象。其中,操作系统(operating system,OS)是管理计算机硬件和软件资源的系统软件,为计算机程序提供公共服务。本申请实施例中提及的操作系统可以为安卓操作系统或基于安卓二次开发的操作系统。
在一种实现方式中,针对终端设备的操作系统所采用的主题对象的主题切换操作,和终端设备当前运行的应用程序所采用的主题对象的主题切换操作可以完全不同或不完全相同。例如,假设检测到操作1、操作2和操作3中的任意一种操作表示需要切换终端设备的操作系统的主题对象,检测到操作3和操作4中的任意一种操作表示需要切换终端设备当前运行的应用程序的主题对象时。若终端设备检测到操作1或操作2,则终端设备可以 切换该终端设备的操作系统的主题对象;若终端设备检测到操作4,则终端设备可以切换该终端设备当前运行的应用程序的主题对象;若终端设备检测到操作3,则终端设备可以切换该终端设备的操作系统的主题对象,并切换该终端设备当前运行的应用程序的主题对象。其中,终端设备当前运行的应用程序的数量可以为一个或多个。
需要说明的是,终端设备当前运行应用程序1表示应用程序1在终端设备中处于运行状态,应用程序1在终端设备中处于运行状态可以包括如下3种状态中的任意一种:应用程序1在终端设备中处于前台运行状态;应用程序1在终端设备中处于待激活状态;应用程序1在终端设备中处于后台运行状态。其中,导致应用程序1在终端设备中处于待激活状态的情况可以包括但不限于:终端设备在应用程序1处于前台运行状态时,下拉状态栏看通知消息、双击起始键(也称home键)并弹出任务运行栏,锁屏。导致应用程序1在终端设备中处于后台运行状态的情况可以包括但不限于:终端设备在应用程序1处于前台运行状态时,按home键或启动其它应用(导致把应用程序1挤入后台)。
在一种实现方式中,终端设备中安装的所有应用程序对应的主题切换操作相同。在另一种实现方式中,终端设备中安装的各个应用程序对应的主题切换操作完全不同或者不完全相同。例如,若应用程序1和应用程序2在终端设备中均处于运行状态,且应用程序1对应的主题切换操作为操作1、操作2和操作3中的任意一种操作,应用程序2对应的主题切换操作为操作3。终端设备在检测到操作1和操作2中的任意一种操作时,表示需要切换应用程序1的主题对象;终端设备在检测到操作3时,表示需要切换应用程序1和应用程序2的主题对象。
终端设备通过设置操作系统的主题对象可以同时设置该终端设备的主屏幕的背景颜色、待机图片、屏幕保护程序、铃声、操作界面、图标、文字和屏幕布局等内容。终端设备通过设置应用程序的主题对象可以同时设置该应用程序的窗口的背景颜色、背景图片、消息铃声、操作界面、图标、文字和屏幕布局等内容。通过设置操作系统的主题对象或者应用程序的主题对象,使用户可以更便捷地为终端实现个性化。
在一种实现方式中,终端设备可以设置操作系统默认的主题对象,并设置各个应用程序默认的主题对象。在启动终端设备时,可以将操作系统默认的主题对象作为终端设备的操作系统的主题对象。相应的,在启动终端设备中安装的某应用程序时,可以将该应用程序默认的主题对象作为该应用程序的主题对象。
在本申请实施例中,终端设备处于开机状态时,该终端设备的操作系统已启用了主题对象,在检测到主题切换操作时,终端设备可以获取切换参数,并根据切换参数确定待启用主题对象,进而用该待启用主题对象替换检测到主题切换操作之前,操作系统所启用的主题对象。
需要说明的是,在本申请实施例中,提及的主题切换操作包括针对操作系统的主题切换操作和针对终端设备中运行的应用程序的主题切换操作,在检测到对操作系统的主题切换操作之后执行的一系列操作,与检测到对应用程序的主题切换操作之后执行的一系列操作类似。为避免描述冗余,在本申请实施例中部分内容仅描述检测到对操作系统的主题切换操作之后执行的一系列操作,据此可以推理得到检测到对应用程序的主题切换操作之后执行的一系列操作,并不构成对于本申请实施例提供的技术方案的限定。
步骤S202:终端设备根据该切换参数确定待启用主题对象,该待启用主题对象处于已加载状态。
在本申请实施例中,切换参数可以根据终端设备检测到的主题切换操作确定。例如,主题切换操作是针对终端设备中显示的主题设置页面中的确定设置按钮的触发操作时,切换参数可以是用户在主题设置页面中选择的主题参数。以图2b所示的用户在主题设置页面中设置主题参数的场景示意图为例,如图2b可见,主题设置页面20中可以对背景颜色和图标形状进行设置,即主题参数包括背景颜色和图标形状,背景颜色可以为白色或者灰色,图标形状可以为方形或者圆形。在检测到针对终端设备100中显示的主题设置页面中的确定设置按钮22的触发操作之前,该终端设备的主屏幕如图1a所示。由图2b也可以看到,在改变主题参数之前,该终端设备100的主屏幕的背景颜色为白色,图标形状为方形。由图2b可知,在主题设置页面20中,用户可以通过点击背景颜色对应的下拉框21,以使主题设置页面20显示背景颜色的所有选项(即白色和灰色),并在显示的颜色选项中选择灰色。同理,在主题设置页面20中,用户可以通过点击图标形状对应的下拉框21,以使主题设置页面20显示图标形状的所有选项(即方形和圆形),并在显示的形状选项中选择圆形。在完成背景颜色和图标形状的选择之后,用户可以点击确定设置按钮22,以使选择的主题参数生效。用户也可以点击取消设置按钮,以取消对主题参数的设置,这样选择的主题参数不会生效。用户点击主题设置页面中的确定设置按钮22之后,终端设备100的主屏幕的示意图如图2c所示。由图2c所示,终端设备100的主屏幕中的图标23的形状为圆形,背景颜色为灰色,即用户选择的主题参数生效。
需要说明的是,上述例子中,主题参数包括背景颜色和图标形状仅用于举例,并不构成对本申请实施例的限定,在其他可行的实现方式中,主题参数还可以包括其他参数。还需要说明的是,用户同时改变了背景颜色和图标形状仅用于举例,并不构成本申请实施例的限定,在其他可行的实现方式中,用户可以仅改变背景颜色和图标形状中的一个参数。
在一种实现方式中,切换参数根据终端设备检测到的主题切换操作确定,且主题切换操作是对终端设备的翻转操作时,切换参数可以是终端设备执行翻转操作之后该终端设备的翻转角度。以图1b为例,翻转角度可以是终端设备100的屏幕平面与地平面之间的夹角。在一种实现方式中,切换参数可以是终端设备执行翻转操作之前该终端设备的翻转角度,与执行翻转操作之后该终端设备的翻转角度之间的角度差。
在本申请实施例中,终端设备中可以存储有多个主题对象,该多个主题对象至少包括终端设备在检测到主题切换操作之前所采用的主题对象以及终端设备检测到主题切换操作之后所采用的主题对象。操作系统包括的主题参数与应用程序包括的主题参数可以相同也可以不同。例如,操作系统的主题参数可以包括主屏幕的背景颜色和图标形状,应用程序的主题参数也可以包括该应用程序的界面的背景颜色和该界面中的图标的形状,或者,应用程序的主题参数可以包括该应用程序的界面的背景颜色、该界面中的图标的形状和该界面的背景图像。不同应用程序包括的主题参数可以相同也可以不同。换言之,操作系统对应的主题对象与应用程序对应的主题对象可以相同也可以不同,不同应用程序对应的主题对象可以相同也可以不同。
在本申请实施例中,终端设备可以预先设置切换参数和主题对象之间的对应关系,并 将获取的主题参数对应的主题对象作为待启用主题对象。在一种实现方式中,切换参数和主题对象之间一一对应。
在一种实现方式中,终端设备中可以存储有多个主题对象,该多个主题对象中的每个主题对象可以包括类加载器和路径信息,该主题对象由该类加载器加载该路径信息指示的主题包得到;其中,每个主题包可以包括资源标识(资源ID)和资源取值,不同主题包中的资源ID相同且资源取值不同,不同主题对象包括的类加载器不同。
其中,类加载器可以用于将路径信息指示的主题包加载到终端设备的内存空间中,需要说明的是,类加载器将路径信息指示的主题包加载到终端设备的内存空间中之后,该终端设备可以得到一个主题对象。终端设备在检测到主题切换操作时,直接切换启用的主题对象,即可实现主题切换。具体的,该类加载器可以是Java类加载器,Java类加载器是Java运行时环境(java runtime environment)的一部分,负责动态加载Java类到Java虚拟机的内存空间中。路径信息用于唯一指示一个主题包在终端设备中的存储位置,不同路径信息指示的主题包不同。其中,当终端设备的操作系统为安卓时,主题包可以为安卓应用程序包(android application package,APK);当终端设备的操作系统为其他操作系统时候,主题包可以为该操作系统中的应用程序包。
主题包包括构成一个主题所需要的所有资源,具体的,主题包可以包括资源ID和资源取值。其中,资源ID可以用于标识一个资源项,资源项可以为主题参数。例如,资源ID可以是背景颜色的标识,或者图标形状的标识。资源取值可以为资源ID指示的主题参数的具体取值,例如,主题参数为背景颜色时,该主题参数的具体取值(即资源取值)可以为白色(或者用于表示白色的字符)或者灰色(或者用于表示灰色的字符)。
相较于现有技术中不同主题包中的资源标识不同且资源取值不同,在本申请实施例中,不同主题包中的资源标识相同且资源取值不同,这样可以避免根据主题对象的个数选择资源ID,有利于减少代码量,并有利于提高主题切换效率。例如,若针对终端设备的主屏幕存在2个主题对象,终端设备采用这2个主题对象时,主屏幕的背景颜色不同,即这2个主题对象中的路径信息指示的主题包中的资源标识(即背景颜色的标识)的资源取值不同。在现有技术中,虽然这2个主题对象中路径信息指示的主题包中均有背景颜色对应的资源标识,但是其资源标识不能相同。如表1所示,其中一个主题对象中路径信息指示的主题包(如主题包1)中背景颜色对应的资源标识的取值为白色,该资源标识表示为“white_bg”;另一个主题对象中路径信息指示的主题包(如主题包2)中背景颜色对应的资源标识的取值为灰色,该资源标识表示为“gray_bg”。这样在确定或改变主屏幕的背景颜色时,终端设备中存储的代码会针对前述2个主题对象出现不同的代码分支。其中一个分支用于确定资源标识为“white_bg”时,该资源标识对应的取值(即白色),另一个分支用于确定资源标识为“gray_bg”时,该资源标识对应的取值(即灰色)。
表1
主题包 资源标识 资源取值
主题包1 white_bg 白色
主题包2 gray_bg 灰色
但是在本申请实施例中,前述2个主题对象中路径信息指示的主题包中的资源标识可 以相同且资源取值不同,如表2所示,主题包1和主题包2中的资源标识均为“bg”。这样可以避免根据主题对象的个数选择资源ID,有利于减少代码量,并有利于提高主题切换效率。在安卓操作系统中,不能定义两个相同的资源ID,但是由于本申请实施例中的不同主题对象是通过不同的类加载器加载得到的。因此,即使不同主题包中的资源ID相同,也可以在终端设备中同时加载该不同主题包。这样使得终端设备中可以存在多个处于已加载状态的主题对象,这样可以避免终端设备在检测到主题切换操作时,需要花费一段时间加载待启用主题对象,并在加载完毕之后才能实现主题切换,从而有利于提高主题切换效率和用户体验。
表2
主题包 资源标识 资源取值
主题包1 bg 白色
主题包2 bg 灰色
在一种实现方式中,若在终端设备中添加新的主题包,则该新的主题包中的资源标识与终端设备中已有的主题包中的资源标识相同,该新的主题包中的资源取值与已有的主题包中的资源取值不同。在终端设备的开机过程中,该终端设备可以确定当前存储的主题包的个数(如m),并对应创建m个类加载器,然后调用该m个类加载器加载主题包(一个类加载器加载一个主题包,不同类加载器加载不同主题包)到内存中,并得到m个主题对象。然后将m个主题对象中的一个主题对象作为当前主题对象。此时,该m个主题对象在终端设备中均处于已加载状态,因此在检测到主题切换操作时,可以立即切换主题对象,有利于提高主题切换效率。其中,m为大于1的正整数。
步骤S203:终端设备将该待启用主题对象切换为终端设备的主题对象。
具体的,终端设备确定待启用主题对象之后,可以将该待启用主题对象切换为终端设备的主题对象。由于在将该待启用主题对象切换为终端设备的主题对象之前,该待启用主题对象处于已加载状态,可以避免在将待启用主题对象切换为终端设备的主题对象之前需要花费一段时间去加载该待启用主题对象,从而有利于提高终端设备的主题切换效率。
需要说明的是,本申请实施例对该待启用主题对象的加载时间不做限定。当该待启用主题对象为操作系统的主题对象时,终端设备可以在开机过程中加载该待启用主题对象,或者,也可以在终端设备的运行负载较低(或者该终端设备较为空闲)时加载该待启用主题对象。当该待启用主题对象为应用程序的主题对象时,终端设备可以在启动该应用程序的过程中加载该待启用主题对象,或者,也可以在该应用程序的运行负载较低(或者该应用程序较为空闲)时加载该待启用主题对象。
在一种实现方式中,终端设备可以存储有多个主题对象,终端设备可以同时加载该多个主题对象,也可以根据终端设备的运行状态加载该多个主题对象。具体的,可以根据终端设备的负载量确定可以同时加载的主题对象数量。例如,当终端设备中存储有10个主题对象,且该终端设备的负载量较高时,终端设备可以先加载1个主题对象,然后在终端设备的负载量降低到较低值时,加载剩余的9个主题对象或者该9个主题对象中的部分主题对象。
通过实施本申请实施例,在检测到主题切换操作时,通过获取切换参数,并根据该切 换参数确定待启用主题对象,该待启用主题对象处于已加载状态,然后将该待启用主题对象切换为终端设备的主题对象。由于在将待启用主题对象切换为终端设备的主题对象之前,该待启用主题对象处于已加载状态,可以避免在将待启用主题对象切换为终端设备的主题对象之前需要花费时间去加载该待启用主题对象,从而有利于提高终端设备的主题切换效率。
请参见图3a,图3a是本申请实施例提供的另一种主题切换方法的流程示意图,该方法详细描述了主题切换操作包括哪些操作,以及切换参数包括折叠操作的折叠角度时,如何根据该折叠操作的折叠角度确定待启用主题对象。其中,该主题切换方法的执行主体为终端设备,或者为终端设备中的芯片,以下以终端设备为主题切换方法的执行主体为例进行说明。如图3a所示,该方法可以包括但不限于如下步骤:
步骤S301:在检测到主题切换操作时,终端设备获取切换参数,其中,该终端设备包括折叠屏,该折叠屏包括第一屏幕和第二屏幕;该主题切换操作包括如下操作中的一种或多种:对该折叠屏的折叠操作;使前述第一屏幕和前述第二屏幕之间的折叠角度变化为第一预设角度的折叠操作;使该第一屏幕和该第二屏幕之间的折叠角度的变化量达到第二预设角度的折叠操作;该切换参数包括折叠操作的折叠角度。
在本申请实施例中,终端设备中的折叠屏可以包括一个或多个屏幕,该折叠屏经过折叠之后可以呈现为两个或两个以上屏幕,本申请实施例以该折叠屏经过折叠之后呈现为两个屏幕(如第一屏幕和第二屏幕)为例进行介绍。该主题切换操作可以包括如下操作中的一种或多种:针对终端设备中的预设切换按钮的触发操作(如点击、长按或滑动操作);对终端设备的翻转操作(对终端设备的翻转操作会使得终端设备的翻转角度发生变化);对该折叠屏的折叠操作,即使前述第一屏幕和前述第二屏幕之间的折叠角度变化的折叠操作;使该第一屏幕和该第二屏幕之间的折叠角度变化为第一预设角度的折叠操作;使该第一屏幕和该第二屏幕之间的折叠角度的变化量达到(即大于或等于)第二预设角度的折叠操作。终端设备在检测到上述操作中的至少一种时,表示需要切换终端设备的主题对象。
其中,当主题切换操作为对该折叠屏的折叠操作时,只要第一屏幕和第二屏幕之间的折叠角度发生变化,即可以切换终端设备的主题对象,这样可以增加终端设备的趣味性。当主题切换操作为使第一屏幕和第二屏幕之间的折叠角度变化为第一预设角度的折叠操作时,仅当第一屏幕和第二屏幕之间的折叠角度变化为某些特定的角度(即第一预设角度)时,才切换终端设备的主题对象。当主题切换操作为使该第一屏幕和该第二屏幕之间的折叠角度的变化量达到第二预设角度的折叠操作时,可以避免终端设备发生碰撞或因其他原因使折叠屏发生抖动时(此时用户并不希望切换终端设备的主题对象),导致第一屏幕和第二屏幕之间的折叠角度发生变化,进而使终端设备的主题发生切换的情况,有利于避免误操作。
以图3b为例,图3b是对图1a所示的终端设备100进行折叠操作的场景示意图。由图3b可知,通过转动终端设备100中的转轴31,可以使第一屏幕32和第二屏幕33之间的折叠角度发生变化。当第一屏幕和第二屏幕合成为一个完整的屏幕时,折叠角度为0。往屏幕的后方旋转可以使折叠角度增大。需要说明的是,图3b中所示终端设备包括一个转轴, 且该转轴31在终端设备的中间位置仅用于举例说明,在其他可行的实现方式中,终端设备可以包括多个转轴,该多个转轴可以按需设置在终端设备中的任意位置。可选的,终端设备可以包括无限个转轴,即可以在任意位置处折叠终端设备的屏幕。还需要说明的是,图3b所示第一屏幕和第二屏幕的尺寸相同仅用于举例,并不构成对本申请实施例的限定,在其他可行的实现方式中,第一屏幕和第二屏幕的尺寸可以不同。其中,屏幕的尺寸可以指屏幕的长度、宽度和长宽比中的一种或多种。
其中,第一预设角度和第二预设角度均可以由终端设备默认设置,也可以根据用户操作确定,且可以根据用户操作更改第一预设角度。第一预设角度和第二预设角度均可以是[0°,360°]中的任意角度,在图3b所示的终端设备中,第一预设角度和第二预设角度均可以为[0°,180°]中的任意角度。第一预设角度的数量可以为一个或多个,例如,第一预设角度可以包括90°和180°。第二预设角度可以为1°、2°或者其他较小的角度值。
在本申请实施例中,当终端设备检测到主题切换操作,且主题切换操作为上述3种折叠操作(对该折叠屏的折叠操作,即使第一屏幕和第二屏幕之间的折叠角度变化的折叠操作;使该第一屏幕和该第二屏幕之间的折叠角度变化为第一预设角度的折叠操作;使该第一屏幕和该第二屏幕之间的折叠角度的变化量达到第二预设角度的折叠操作)中的任意一种时,终端设备可以将折叠操作的折叠角度作为切换参数,或者,将折叠操作的折叠角度差作为切换参数。其中,折叠操作的折叠角度可以为执行该折叠操作之后,第一屏幕和第二屏幕之间的折叠角度。折叠操作的折叠角度差为执行该折叠操作之前第一屏幕和第二屏幕之间的折叠角度,与执行该折叠操作之后第一屏幕和第二屏幕之间的折叠角度之间的差值。在一种实现方式中,切换参数可以为终端设备检测到主题切换操作时,生成的随机数。
需要说明的是,步骤S301的其余执行过程可参见图2a中步骤S201的具体描述,此处不再赘述。
步骤S302:终端设备根据折叠角度和主题对象之间的对应关系,将该折叠操作的折叠角度对应的主题对象作为待启用主题对象。
具体的,终端设备获取折叠操作的折叠角度之后,可以根据终端设备预设的折叠角度和主题对象之间的对应关系,将该折叠操作的折叠角度对应的主题对象作为待启用主题对象。
在一种实现方式中,一个主题对象可以与一个或多个折叠角度对应。例如,当主题切换操作为使该第一屏幕和该第二屏幕之间的折叠角度的变化量达到第二预设角度的折叠操作,且第二预设角度为5°时,折叠角度和主题对象之间的对应关系可以如表3所示。
表3
折叠角度 主题对象
[0°,4°] 主题对象1
[5°,9°] 主题对象2
在一种实现方式中,当切换参数包括折叠操作的折叠角度差时,终端设备可以根据预设的折叠角度差和主题对象之间的对应关系,将该折叠操作的折叠角度差对应的主题对象作为待启用主题对象。在一种实现方式中,当切换参数包括终端设备检测到主题切换操作 时生成的随机数时,终端设备可以根据预设的随机数和主题对象之间的对应关系,将终端设备检测到主题切换操作时生成的随机数对应的主题对象作为待启用主题对象。
步骤S303:终端设备将该待启用主题对象切换为终端设备的主题对象。
具体的,终端设备确定待启用主题对象之后,可以将该待启用主题对象切换为终端设备的主题对象。在一种实现方式中,终端设备包括第一屏幕和第二屏幕时,将该待启用主题对象切换为终端设备的主题对象的具体实施方式可以为:将该待启用主题对象切换为第一屏幕和第二屏幕的主题对象。通过这种方式,可以同时切换第一屏幕和第二屏幕的主题对象。
在本申请实施例中,终端设备包括第一屏幕和第二屏幕,该第一屏幕和第二屏幕可以共同显示一个界面,也可以显示不同的界面。例如,当第一屏幕和第二屏幕之间的折叠角度较小时,该第一屏幕和第二屏幕可以共同显示一个界面(如主屏幕界面或者某应用的界面),如图3b中在折叠第二屏幕33之前,第一屏幕32和第二屏幕33可以共同显示主屏幕界面。又如,当第一屏幕和第二屏幕之间的折叠角度较大,或者,终端设备需要同时显示多个界面(如两个界面)时,第一屏幕和第二屏幕可以显示不同的界面。例如,第一屏幕可以显示终端设备中运行的应用程序a的界面,第二屏幕可以显示终端设备中运行的应用程序b的界面,其中,应用程序a的界面和应用程序b的界面不同。
在一种实现方式中,终端设备包括第一屏幕和第二屏幕,且检测到主题切换操作时,第一屏幕和第二屏幕显示不同的界面时,终端设备需要分别确定第一屏幕对应的待启用主题对象和第二屏幕对应的待启用主题对象,进而将第一屏幕对应的待启用主题对象切换为第一屏幕的主题对象,并将第二屏幕对应的待启用主题对象切换为第二屏幕的主题对象。
其中,若在检测到主题切换操作时,该第一屏幕中显示的界面为操作系统的界面,则将第一屏幕对应的待启用主题对象切换为第一屏幕的主题对象表示:将第一屏幕对应的待启用主题对象切换为该操作系统的主题对象。若在检测到主题切换操作时,该第一屏幕中显示的界面为某应用程序的界面,则将第一屏幕对应的待启用主题对象切换为第一屏幕的主题对象表示:将第一屏幕对应的待启用主题对象切换为该应用程序的主题对象。
需要说明的是,终端设备需要分别确定第一屏幕对应的待启用主题对象和第二屏幕对应的待启用主题对象时,若切换参数包括折叠操作的折叠角度,终端设备可以根据折叠角度和主题对象之间的对应关系确定第一屏幕对应的待启用主题对象和第二屏幕对应的待启用主题对象;或者,根据不同的(折叠角度和主题对象之间的)对应关系分别确定第一屏幕对应的待启用主题对象和第二屏幕对应的待启用主题对象。同理,若切换参数包括折叠操作的折叠角度差,终端设备可以根据折叠角度差和主题对象之间的对应关系确定第一屏幕对应的待启用主题对象和第二屏幕对应的待启用主题对象;或者,根据不同的(折叠角度差和主题对象之间的)对应关系分别确定第一屏幕对应的待启用主题对象和第二屏幕对应的待启用主题对象。
在一种实现方式中,随着用户旋转第一屏幕和/或第二屏幕,以使得第一屏幕和第二屏幕之间的折叠角度变化时,终端设备根据折叠角度和主题对象之间的对应关系,确定出待启用主题对象。在折叠角度不同时,确定出的待启用主题对象不同。当终端设备将该不同的待启用主题对象切换为该终端设备的主题对象时,该终端设备的屏幕中显示的背景颜色 可以不同。例如,随着折叠角度越来越大,终端设备的屏幕中显示的背景颜色可以越来越深,或者越来越浅。这样可以在用户旋转屏幕的过程中,给用户更多的屏幕反馈,有利于提高用户体验并增强终端设备的趣味性。
在一种实现方式中,当终端设备包括折叠屏,且该折叠屏包括第一屏幕和第二屏幕时,终端设备将待启用主题对象切换为该终端设备的主题对象的具体实施方式可以为:将该待启用主题对象切换为前述主题切换操作所操作的屏幕的主题对象。通过这种方式,可以在用户仅翻转终端设备包括的多个屏幕中的部分屏幕时,仅切换被用户翻转的屏幕的主题对象。
其中,主题切换操作所操作的屏幕可以为第一屏幕和/或第二屏幕。当主题切换操作为针对终端设备中的预设切换按钮的触发操作(如点击、长按或滑动操作)时,该主题切换操作所操作的屏幕可以为该预设切换按钮所在的屏幕。当主题切换操作为对终端设备的翻转操作时,该主题切换操作所操作的屏幕为第一屏幕和第二屏幕。以图3b为例,当用户将第二屏幕33往后翻转,且主题切换操作为对该折叠屏的折叠操作时,该主题切换操作所操作的屏幕为第二屏幕。当用户将第二屏幕33往后翻转使第一屏幕32和第二屏幕33之间的折叠角度变化为第一预设角度,且主题切换操作为使该第一屏幕和该第二屏幕之间的折叠角度变化为第一预设角度的折叠操作时,该主题切换操作所操作的屏幕为第二屏幕。当用户将第二屏幕33往后翻转使第一屏幕32和第二屏幕33之间的折叠角度的变化量大于或等于第二预设角度,且主题切换操作为使该第一屏幕和该第二屏幕之间的折叠角度的变化量达到第二预设角度的折叠操作时,该主题切换操作所操作的屏幕为第二屏幕。
在一种实现方式中,当终端设备可以包括折叠屏,且该折叠屏可以包括第一屏幕和第二屏幕,待启用主题对象可以包括第一主题对象和第二主题对象,该第一主题对象和该第二主题对象之间存在关联关系时,终端设备将待启用主题对象切换为该终端设备的主题对象的具体实施方式可以为:将该第一主题对象切换为第一屏幕的主题对象,并将该第二主题对象切换为第二屏幕的主题对象。
其中,当该折叠屏包括N个屏幕时,待启用主题对象可以包括N个主题对象,该N个主题对象可以为一组主题对象,同一组主题对象中的各个主题对象之间存在关联关系。通过采用一组具有关联关系的主题对象,有利于增强终端设备的趣味性。其中,N可以为任意正整数。
当待启用主题对象包括第一主题对象和第二主题对象,且该第一主题对象作为第一屏幕的主题对象,该第二主题对象作为第二屏幕的主题对象,第一屏幕和第二屏幕之间的折叠角度为30°时,以图3c所示的第一屏幕和第二屏幕中显示的背景图像的示意图为例。由图3c可知,该第一屏幕32的背景图像为一个小男孩,该第二屏幕33的背景图像为一个小女孩,该小男孩和小女孩之间的距离较远。
当用户旋转第一屏幕和/或第二屏幕,以使得第一屏幕和第二屏幕之间的折叠角度为0°时,该第一屏幕和第二屏幕中显示的背景图像的示意图如图3d所示。由图3d可知,第一屏幕和第二屏幕之间的折叠角度由30°减小为0°时,该小男孩和小女孩之间的距离变小。需要说明的是,终端设备可以根据第一屏幕和第二屏幕之间的折叠角度确定第一主题对象和第二主题对象。在图3c和图3d所示例子中,随着第一屏幕和第二屏幕之间的折叠角度 变小,确定出第一主题对象和第二主题对象,且该第一主题对象作为第一屏幕的主题对象,该第二主题对象作为第二屏幕的主题对象时,随着第一屏幕和第二屏幕之间的折叠角度变小,小男孩和小女孩之间的距离也变近。这样可以在旋转第一屏幕和/或第二屏幕,以使得第一屏幕和第二屏幕之间的折叠角度越来越小时,使用户看到小男孩和小女孩之间的距离越来越近的动态效果,有利于提高终端设备的趣味性。
在一种实现方式中,当该折叠屏包括N个屏幕,且待启用主题对象包括N个主题对象时,该N个主题对象中的各个主题对象之间可以相互独立,即各个主题对象之间不存在关联关系。
通过实施本申请实施例,在检测到折叠操作时,通过获取折叠操作的折叠角度,并根据折叠角度和主题对象之间的对应关系,将该折叠操作的折叠角度对应的主题对象作为待启用主题对象,该待启用主题对象处于已加载状态,然后将该待启用主题对象切换为终端设备的主题对象。由于在将待启用主题对象切换为终端设备的主题对象之前,该待启用主题对象处于已加载状态,可以避免在将待启用主题对象切换为终端设备的主题对象之前需要花费时间去加载该待启用主题对象,从而有利于提高终端设备的主题切换效率。
请参见图4,图4是本申请实施例提供的又一种主题切换方法的流程示意图,该方法详细描述了切换参数包括折叠操作的折叠角度和辅助信息时,如何根据该折叠操作的折叠角度和辅助信息确定待启用主题对象。其中,该主题切换方法的执行主体为终端设备,或者为终端设备中的芯片,以下以终端设备为主题切换方法的执行主体为例进行说明。如图4所示,该方法可以包括但不限于如下步骤:
步骤S401:在检测到主题切换操作时,终端设备获取切换参数,其中,该终端设备包括折叠屏,该折叠屏包括第一屏幕和第二屏幕;该主题切换操作包括如下操作中的一种或多种:对该折叠屏的折叠操作;使前述第一屏幕和前述第二屏幕之间的折叠角度变化为第一预设角度的折叠操作;使该第一屏幕和该第二屏幕之间的折叠角度的变化量达到第二预设角度的折叠操作;该切换参数包括折叠操作的折叠角度和辅助信息,该辅助信息包括:时间信息、日期信息和天气信息中的一种或多种。
在本申请实施例中,当终端设备检测到主题切换操作,且主题切换操作为上述3种折叠操作(对该折叠屏的折叠操作,即使第一屏幕和第二屏幕之间的折叠角度变化的折叠操作;使该第一屏幕和该第二屏幕之间的折叠角度变化为第一预设角度的折叠操作;使该第一屏幕和该第二屏幕之间的折叠角度的变化量达到第二预设角度的折叠操作)中的任意一种时,切换参数可以包括折叠操作的折叠角度(或者折叠操作的折叠角度差、终端设备检测到主题切换操作时生成的随机数)和辅助信息。
其中,该辅助信息可以包括但不限于:时间信息、日期信息、天气信息和该终端设备中安装的某一个或多个应用程序中的应用信息中的一种或多种。例如,该应用程序可以为记录节假日的应用、记录用户心情的应用等。需要说明的是,步骤S401的其余执行过程可参见图3a中步骤S301的具体描述,此处不再赘述。
步骤S402:终端设备根据折叠角度和主题对象集合之间的对应关系,确定与该折叠操作的折叠角度对应的目标主题对象集合。
具体的,当切换参数包括折叠操作的折叠角度和辅助信息时,终端设备获取该折叠操作的折叠角度和辅助信息之后,可以根据预设的折叠角度和主题对象集合之间的对应关系,确定与该折叠操作的折叠角度对应的目标主题对象集合;进而根据该辅助信息,从该目标主题对象集合中确定待启用主题对象。其中,每个主题对象集合均包括两个或两个以上的主题对象。不同主题对象集合包括的主题对象可以完全不同,也可以不完全相同。例如,主题对象集合a包括主题对象1和主题对象2,主题对象集合b包括主题对象1和主题对象3。
采用不同主题对象集合中的主题对象时,在终端设备的显示屏中至少有一个主题参数不同。例如,当折叠操作的折叠角度大于0°时(即折叠屏处于折叠状态时),根据该折叠操作的折叠角度确定出的目标主题对象集合为主题对象集合a,终端设备将主题对象集合a中的任意一个主题对象作为该终端设备的主题对象时,该终端设备的主屏幕的背景颜色可以显示为黑色。当折叠操作的折叠角度为0°时(即折叠屏处于展开状态时),根据该折叠操作的折叠角度确定出的目标主题对象集合为主题对象集合b,终端设备将主题对象集合b中的任意一个主题对象作为该终端设备的主题对象时,该终端设备的主屏幕的背景颜色可以显示为白色。换言之,主题对象集合a包括多个黑夜主题对象,主题对象集合b包括多个白天主题对象。
终端设备将目标主题对象集合中的不同主题对象作为该终端设备的主题对象时,在该终端设备的显示屏中至少有一个主题参数不同。例如,目标主题对象集合包括多个白天主题对象时,终端设备将该多个白天主题对象中的不同白天主题对象作为该终端设备的主题对象时,在该终端设备的显示屏中显示的主屏幕的背景图片和/或图标形状可以不同。
步骤S403:终端设备根据该辅助信息,从该目标主题对象集合中确定待启用主题对象。
具体的,终端设备确定目标主题对象集合之后,可以根据该辅助信息,从该目标主题对象集合中确定待启用主题对象。例如,当该辅助信息包括日期信息,且终端设备中的日期信息为9月10日时,终端设备可以确定当日为教师节。若目标主题对象集合包括多个白天主题对象,则终端设备可以将该多个白天主题对象中与教师节对应的主题对象作为待启用主题对象。进而将该待启用主题对象切换为该终端设备的主题对象,使得该终端设备的屏幕中可以显示教师节相关的背景图片,这样有利于提高终端的趣味性。
又如,当该辅助信息包括天气信息,且该天气信息记录当前的天气为晴朗时,若目标主题对象集合包括多个白天主题对象,则终端设备可以将该多个白天主题对象中与晴朗天气对应的主题对象作为待启用主题对象。进而将该待启用主题对象切换为该终端设备的主题对象,使得该终端设备的屏幕中可以显示与晴朗天气相关的背景图片(如太阳图片),这样有利于提高终端的趣味性。
又如,当该辅助信息包括记录用户心情的应用中的应用信息,且该应用信息记录用户当前的天气较差时,若目标主题对象集合包括多个白天主题对象,则终端设备可以将该多个白天主题对象中与愉悦心情对应的主题对象作为待启用主题对象。进而将该待启用主题对象切换为该终端设备的主题对象,使得该终端设备的屏幕中可以显示与愉悦心情相关的背景图片,这样可以使用户看到该背景图片时,心情变好,同时也有利于提高终端的趣味性。
需要说明的是,前述教师节相关的背景图片、与晴朗天气相关的背景图片和与愉悦心情相关的背景图片均可以包括一个或多个图像,当包括多个图像时,在终端设备中显示为一个动态图像。
步骤S404:终端设备将该待启用主题对象切换为终端设备的主题对象。
需要说明的是,步骤S404的执行过程可参见图3a中步骤S303的具体描述,此处不再赘述。
通过实施本申请实施例,在检测到折叠操作时,通过获取折叠操作的折叠角度和辅助信息,并根据折叠角度和主题对象之间的对应关系,确定与该折叠操作的折叠角度对应的目标主题对象集合;进而根据该辅助信息,从该目标主题对象集合中确定待启用主题对象,该待启用主题对象处于已加载状态,然后将该待启用主题对象切换为终端设备的主题对象。由于在将待启用主题对象切换为终端设备的主题对象之前,该待启用主题对象处于已加载状态,可以避免在将待启用主题对象切换为终端设备的主题对象之前需要花费时间去加载该待启用主题对象,从而有利于提高终端设备的主题切换效率。另外,根据该辅助信息,从该目标主题对象集合中确定待启用主题对象,有利于提高终端的趣味性。
上述详细阐述了本申请实施例的方法,下面提供了本申请实施例的装置。
请参见图5,图5是本申请实施例提供的一种主题切换装置的结构示意图,该主题切换装置50可以为终端设备或具有终端设备功能的装置(例如芯片),主题切换装置50用于执行图2a-图4对应的方法实施例中终端设备所执行的步骤,主题切换装置50可以包括:
获取模块501,用于在检测到主题切换操作时,获取切换参数;
确定模块502,用于根据该切换参数确定待启用主题对象,该待启用主题对象处于已加载状态;
切换模块503,用于将该待启用主题对象切换为终端设备的主题对象。
在一种实现方式中,该终端设备中存储有多个主题对象,该多个主题对象中的每个主题对象包括类加载器和路径信息,该主题对象由该类加载器加载该路径信息指示的主题包得到;其中,每个主题包包括资源标识和资源取值,不同主题包中的资源标识相同且资源取值不同,不同主题对象包括的类加载器不同。
在一种实现方式中,该终端设备包括折叠屏,该折叠屏包括第一屏幕和第二屏幕;前述主题切换操作包括如下操作中的一种或多种:对该折叠屏的折叠操作;使该第一屏幕和该第二屏幕之间的折叠角度变化为第一预设角度的折叠操作;使该第一屏幕和该第二屏幕之间的折叠角度的变化量达到第二预设角度的折叠操作。
在一种实现方式中,该切换参数包括折叠操作的折叠角度;确定模块502具体可以用于:根据折叠角度和主题对象之间的对应关系,将该折叠操作的折叠角度对应的主题对象作为待启用主题对象。
在一种实现方式中,该切换参数包括折叠操作的折叠角度和辅助信息,该辅助信息包括:时间信息、日期信息和天气信息中的一种或多种;确定模块502具体可以用于:根据折叠角度和主题对象集合之间的对应关系,确定与该折叠操作的折叠角度对应的目标主题对象集合;并根据该辅助信息,从该目标主题对象集合中确定待启用主题对象。
在一种实现方式中,该终端设备包括折叠屏,该折叠屏包括第一屏幕和第二屏幕;切换模块503具体可以用于:将前述待启用主题对象切换为前述主题切换操作所操作的屏幕的主题对象。
在一种实现方式中,该终端设备包括折叠屏,该折叠屏包括第一屏幕和第二屏幕;前述待启用主题对象包括第一主题对象和第二主题对象,该第一主题对象和该第二主题对象之间存在关联关系;切换模块503具体可以用于:将该第一主题对象切换为该第一屏幕的主题对象,并将该第二主题对象切换为该第二屏幕的主题对象。
需要说明的是,图5对应的实施例中未提及的内容以及各个模块执行步骤的具体实现方式可参见图2a-图4所示实施例以及前述内容,这里不再赘述。
在一种实现方式中,图5中的各个模块所实现的相关功能可以结合处理器来实现。参见图6,图6是本申请实施例提供的一种主题切换装置的结构示意图,该主题切换装置可以为终端设备或具有终端设备功能的装置(例如芯片)。该主题切换装置60可以包括处理器601和存储器602,处理器601和存储器602可以通过一条或多条通信总线相互连接,也可以通过其它方式相连接。图5所示的获取模块501、确定模块502和切换模块503所实现的相关功能可以通过同一个处理器601来实现,也可以通过多个不同的处理器601来实现。
处理器601被配置为执行图2a-图4所述方法中终端设备相应的功能。该处理器601可以包括一个或多个处理器,例如该处理器601可以是一个或多个中央处理器(central processing unit,CPU),网络处理器(network processor,NP),硬件芯片或者其任意组合。在处理器601是一个CPU的情况下,该CPU可以是单核CPU,也可以是多核CPU。
存储器602用于存储程序代码等。存储器602可以包括易失性存储器(volatile memory),例如随机存取存储器(random access memory,RAM);存储器602也可以包括非易失性存储器(non-volatile memory),例如只读存储器(read-only memory,ROM),快闪存储器(flash memory),硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD);存储器602还可以包括上述种类的存储器的组合。
处理器601可以调用存储器602中存储的程序代码以执行以下操作:
在检测到主题切换操作时,获取切换参数;
根据该切换参数确定待启用主题对象,该待启用主题对象处于已加载状态;
将该待启用主题对象切换为终端设备的主题对象。
在一种实现方式中,该终端设备中存储有多个主题对象,该多个主题对象中的每个主题对象包括类加载器和路径信息,该主题对象由该类加载器加载该路径信息指示的主题包得到;其中,每个主题包包括资源标识和资源取值,不同主题包中的资源标识相同且资源取值不同,不同主题对象包括的类加载器不同。
在一种实现方式中,该终端设备包括折叠屏,该折叠屏包括第一屏幕和第二屏幕;前述主题切换操作包括如下操作中的一种或多种:对该折叠屏的折叠操作;使该第一屏幕和该第二屏幕之间的折叠角度变化为第一预设角度的折叠操作;使该第一屏幕和该第二屏幕之间的折叠角度的变化量达到第二预设角度的折叠操作。
在一种实现方式中,该切换参数包括折叠操作的折叠角度;处理器601执行根据该切 换参数确定待启用主题对象时,具体可以执行以下操作:根据折叠角度和主题对象之间的对应关系,将该折叠操作的折叠角度对应的主题对象作为待启用主题对象。
在一种实现方式中,该切换参数包括折叠操作的折叠角度和辅助信息,该辅助信息包括:时间信息、日期信息和天气信息中的一种或多种;处理器601执行根据该切换参数确定待启用主题对象时,具体可以执行以下操作:根据折叠角度和主题对象集合之间的对应关系,确定与该折叠操作的折叠角度对应的目标主题对象集合;并根据该辅助信息,从该目标主题对象集合中确定待启用主题对象。
在一种实现方式中,该终端设备包括折叠屏,该折叠屏包括第一屏幕和第二屏幕;处理器601执行将前述待启用主题对象切换为该终端设备的主题对象时,具体可以执行以下操作:将前述待启用主题对象切换为前述主题切换操作所操作的屏幕的主题对象。
在一种实现方式中,该终端设备包括折叠屏,该折叠屏包括第一屏幕和第二屏幕;前述待启用主题对象包括第一主题对象和第二主题对象,该第一主题对象和该第二主题对象之间存在关联关系;处理器601执行将前述待启用主题对象切换为该终端设备的主题对象时,具体可以执行以下操作:将该第一主题对象切换为该第一屏幕的主题对象,并将该第二主题对象切换为该第二屏幕的主题对象。
进一步地,处理器601还可以执行图2a-图4所示实施例中终端设备对应的操作,具体可参见方法实施例中的描述,在此不再赘述。
本申请实施例还提供一种计算机可读存储介质,可以用于存储图5所示实施例中主题切换装置所用的计算机软件指令,其包含用于执行上述实施例中为终端设备所设计的程序。
上述计算机可读存储介质包括但不限于快闪存储器、硬盘、固态硬盘。
本申请实施例还提供一种计算机程序产品,该计算机产品被计算设备运行时,可以执行上述图2a-图4实施例中为终端设备所设计的方法。
本申请实施例还提供一种处理器,该处理器包括至少一个电路,用于在检测到主题切换操作时,获取切换参数,并根据该切换参数确定待启用主题对象,该待启用主题对象处于已加载状态;该处理器还包括至少一个电路,用于将该待启用主题对象切换为终端设备的主题对象。上述处理器可以为芯片,可以执行用于实现上述实施例中为终端设备所设计的指令或程序。
本申请实施例还提供了一种芯片系统,该芯片系统包括处理器,该处理器用于实现图2a-图4实施例中为终端设备所设计的主题切换方法。在一种可行的实现方式中,所述芯片系统还包括存储器,该存储器用于保存实现终端设备的功能所必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包括芯片和其他分立器件。
在本申请实施例中还提供一种芯片,包括处理器和存储器,该存储器用包括处理器和存储器,该存储器用于存储计算机程序,该处理器用于从存储器中调用并运行该计算机程序,该计算机程序用于实现上述方法实施例中的方法。
本领域普通技术人员可以意识到,结合本申请中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出 本申请的范围。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者通过所述计算机可读存储介质进行传输。所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(Solid State Disk,SSD))等。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (15)

  1. 一种主题切换方法,应用于终端设备,其特征在于,所述方法包括:
    在检测到主题切换操作时,获取切换参数;
    根据所述切换参数确定待启用主题对象,所述待启用主题对象处于已加载状态;
    将所述待启用主题对象切换为所述终端设备的主题对象。
  2. 根据权利要求1所述的方法,其特征在于,所述终端设备中存储有多个主题对象,所述多个主题对象中的每个主题对象包括类加载器和路径信息,所述主题对象由所述类加载器加载所述路径信息指示的主题包得到;其中,每个主题包包括资源标识和资源取值,不同主题包中的资源标识相同且资源取值不同,不同主题对象包括的类加载器不同。
  3. 根据权利要求1所述的方法,其特征在于,所述终端设备包括折叠屏,所述折叠屏包括第一屏幕和第二屏幕;
    所述主题切换操作包括如下操作中的一种或多种:
    对所述折叠屏的折叠操作;
    使所述第一屏幕和所述第二屏幕之间的折叠角度变化为第一预设角度的折叠操作;
    使所述第一屏幕和所述第二屏幕之间的折叠角度的变化量达到第二预设角度的折叠操作。
  4. 根据权利要求3所述的方法,其特征在于,所述切换参数包括折叠操作的折叠角度;
    所述根据所述切换参数确定待启用主题对象,包括:
    根据折叠角度和主题对象之间的对应关系,将所述折叠操作的折叠角度对应的主题对象作为待启用主题对象。
  5. 根据权利要求3所述的方法,其特征在于,所述切换参数包括折叠操作的折叠角度和辅助信息,所述辅助信息包括:时间信息、日期信息和天气信息中的一种或多种;
    所述根据所述切换参数确定待启用主题对象,包括:
    根据折叠角度和主题对象集合之间的对应关系,确定与所述折叠操作的折叠角度对应的目标主题对象集合;
    根据所述辅助信息,从所述目标主题对象集合中确定待启用主题对象。
  6. 根据权利要求1~5任一项所述的方法,其特征在于,所述终端设备包括折叠屏,所述折叠屏包括第一屏幕和第二屏幕;
    所述将所述待启用主题对象切换为所述终端设备的主题对象,包括:
    将所述待启用主题对象切换为所述主题切换操作所操作的屏幕的主题对象。
  7. 根据权利要求1~5任一项所述的方法,其特征在于,所述终端设备包括折叠屏,所述折叠屏包括第一屏幕和第二屏幕,所述待启用主题对象包括第一主题对象和第二主题对象,所述第一主题对象和所述第二主题对象之间存在关联关系;
    所述将所述待启用主题对象切换为所述终端设备的主题对象,包括:
    将所述第一主题对象切换为所述第一屏幕的主题对象,并将所述第二主题对象切换为所述第二屏幕的主题对象。
  8. 一种主题切换装置,所述装置配置于终端设备,其特征在于,所述装置包括:
    获取模块,用于在检测到主题切换操作时,获取切换参数;
    确定模块,用于根据所述切换参数确定待启用主题对象,所述待启用主题对象处于已加载状态;
    切换模块,用于将所述待启用主题对象切换为所述终端设备的主题对象。
  9. 根据权利要求8所述的装置,其特征在于,所述终端设备中存储有多个主题对象,所述多个主题对象中的每个主题对象包括类加载器和路径信息,所述主题对象由所述类加载器加载所述路径信息指示的主题包得到;其中,每个主题包包括资源标识和资源取值,不同主题包中的资源标识相同且资源取值不同,不同主题对象包括的类加载器不同。
  10. 根据权利要求8所述的装置,其特征在于,所述终端设备包括折叠屏,所述折叠屏包括第一屏幕和第二屏幕;
    所述主题切换操作包括如下操作中的一种或多种:
    对所述折叠屏的折叠操作;
    使所述第一屏幕和所述第二屏幕之间的折叠角度变化为第一预设角度的折叠操作;
    使所述第一屏幕和所述第二屏幕之间的折叠角度的变化量达到第二预设角度的折叠操作。
  11. 根据权利要求10所述的装置,其特征在于,所述切换参数包括折叠操作的折叠角度;
    所述确定模块具体用于:根据折叠角度和主题对象之间的对应关系,将所述折叠操作的折叠角度对应的主题对象作为待启用主题对象。
  12. 根据权利要求10所述的装置,其特征在于,所述切换参数包括折叠操作的折叠角度和辅助信息,所述辅助信息包括:时间信息、日期信息和天气信息中的一种或多种;
    所述确定模块具体用于:根据折叠角度和主题对象集合之间的对应关系,确定与所述折叠操作的折叠角度对应的目标主题对象集合;并根据所述辅助信息,从所述目标主题对象集合中确定待启用主题对象。
  13. 根据权利要求8~12任一项所述的装置,其特征在于,所述终端设备包括折叠屏,所述折叠屏包括第一屏幕和第二屏幕;
    所述切换模块具体用于:将所述待启用主题对象切换为所述主题切换操作所操作的屏幕的主题对象。
  14. 根据权利要求8~12任一项所述的装置,其特征在于,所述终端设备包括折叠屏,所述折叠屏包括第一屏幕和第二屏幕,所述待启用主题对象包括第一主题对象和第二主题对象,所述第一主题对象和所述第二主题对象之间存在关联关系;
    所述切换模块具体用于:将所述第一主题对象切换为所述第一屏幕的主题对象,并将所述第二主题对象切换为所述第二屏幕的主题对象。
  15. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令被处理器执行时使所述处理器执行如权利要求1~7任一项所述的方法。
PCT/CN2020/109786 2019-09-02 2020-08-18 一种主题切换方法以及主题切换装置 WO2021042978A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202080070233.2A CN114556294A (zh) 2019-09-02 2020-08-18 一种主题切换方法以及主题切换装置
EP20860912.3A EP4024209A4 (en) 2019-09-02 2020-08-18 THEME SWITCHING METHOD AND THEME SWITCHING APPARATUS

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910825379.2 2019-09-02
CN201910825379.2A CN110737493A (zh) 2019-09-02 2019-09-02 一种主题切换方法及主题切换装置

Publications (1)

Publication Number Publication Date
WO2021042978A1 true WO2021042978A1 (zh) 2021-03-11

Family

ID=69267557

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/109786 WO2021042978A1 (zh) 2019-09-02 2020-08-18 一种主题切换方法以及主题切换装置

Country Status (3)

Country Link
EP (1) EP4024209A4 (zh)
CN (2) CN110737493A (zh)
WO (1) WO2021042978A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114064055A (zh) * 2021-10-13 2022-02-18 荣耀终端有限公司 一种系统主题的配置方法及电子设备
CN114693809A (zh) * 2022-02-25 2022-07-01 智己汽车科技有限公司 一种汽车电子内饰风格主题切换方法及设备

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110737493A (zh) * 2019-09-02 2020-01-31 华为技术有限公司 一种主题切换方法及主题切换装置
CN111240792B (zh) * 2020-02-10 2021-05-14 腾讯科技(深圳)有限公司 用户界面的主题切换方法、装置、终端及存储介质
CN111414142B (zh) * 2020-03-13 2023-10-03 青岛海信移动通信技术有限公司 移动终端及其应用界面的显示方法
CN111552537B (zh) * 2020-05-06 2023-10-20 深圳市卡牛科技有限公司 主题切换方法、装置、计算机设备及存储介质
CN114168237A (zh) * 2020-09-10 2022-03-11 华为技术有限公司 主题包适配方法及装置
CN112710300A (zh) * 2020-12-01 2021-04-27 上海豪承信息技术有限公司 一种切换可穿戴设备的表盘的方法与设备
CN112905144B (zh) * 2021-03-30 2024-03-22 中国建设银行股份有限公司 终端显示方法、装置、电子设备及存储介质
CN113076150A (zh) * 2021-04-13 2021-07-06 北京同邦卓益科技有限公司 界面主题切换方法、装置、设备、储存介质及程序产品
CN116069437A (zh) * 2023-04-06 2023-05-05 深圳开鸿数字产业发展有限公司 原子化服务卡片主题管理方法、装置、终端及存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103354586A (zh) * 2007-01-26 2013-10-16 捷讯研究有限公司 用于预览主题的系统及方法
CN103455342A (zh) * 2013-06-06 2013-12-18 广州市久邦数码科技有限公司 一种主题调用的方法及装置
CN104123056A (zh) * 2014-08-08 2014-10-29 深圳市中兴移动通信有限公司 一种用户界面切换的方法、装置及终端
CN106293580A (zh) * 2011-02-10 2017-01-04 三星电子株式会社 便携式设备及其控制方法
CN106973096A (zh) * 2017-03-27 2017-07-21 腾讯科技(深圳)有限公司 数据的推送方法和装置
CN107729103A (zh) * 2017-09-29 2018-02-23 努比亚技术有限公司 一种主题切换方法、移动终端以及计算机存储介质
CN110737493A (zh) * 2019-09-02 2020-01-31 华为技术有限公司 一种主题切换方法及主题切换装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103399643A (zh) * 2013-08-23 2013-11-20 深圳市金立通信设备有限公司 一种柔性终端的应用程序启动方法及柔性终端
CN105138700A (zh) * 2015-09-28 2015-12-09 北京橙鑫数据科技有限公司 背景图片显示方法及装置
KR102516590B1 (ko) * 2016-01-29 2023-04-03 삼성전자주식회사 전자 장치 및 전자 장치에서 디스플레이의 변형에 따라 기능을 실행하기 위한 방법
CN107800878A (zh) * 2017-10-19 2018-03-13 广东欧珀移动通信有限公司 图片显示方法及装置

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103354586A (zh) * 2007-01-26 2013-10-16 捷讯研究有限公司 用于预览主题的系统及方法
CN106293580A (zh) * 2011-02-10 2017-01-04 三星电子株式会社 便携式设备及其控制方法
CN103455342A (zh) * 2013-06-06 2013-12-18 广州市久邦数码科技有限公司 一种主题调用的方法及装置
CN104123056A (zh) * 2014-08-08 2014-10-29 深圳市中兴移动通信有限公司 一种用户界面切换的方法、装置及终端
CN106973096A (zh) * 2017-03-27 2017-07-21 腾讯科技(深圳)有限公司 数据的推送方法和装置
CN107729103A (zh) * 2017-09-29 2018-02-23 努比亚技术有限公司 一种主题切换方法、移动终端以及计算机存储介质
CN110737493A (zh) * 2019-09-02 2020-01-31 华为技术有限公司 一种主题切换方法及主题切换装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4024209A4

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114064055A (zh) * 2021-10-13 2022-02-18 荣耀终端有限公司 一种系统主题的配置方法及电子设备
CN114693809A (zh) * 2022-02-25 2022-07-01 智己汽车科技有限公司 一种汽车电子内饰风格主题切换方法及设备

Also Published As

Publication number Publication date
EP4024209A4 (en) 2022-10-26
CN114556294A (zh) 2022-05-27
EP4024209A1 (en) 2022-07-06
CN110737493A (zh) 2020-01-31

Similar Documents

Publication Publication Date Title
WO2021042978A1 (zh) 一种主题切换方法以及主题切换装置
WO2020259452A1 (zh) 一种移动终端的全屏显示方法及设备
WO2020253719A1 (zh) 一种录屏方法及电子设备
WO2021213164A1 (zh) 应用界面交互方法、电子设备和计算机可读存储介质
WO2020000448A1 (zh) 一种柔性屏幕的显示方法及终端
WO2021036770A1 (zh) 一种分屏处理方法及终端设备
WO2020062159A1 (zh) 无线充电方法及电子设备
CN113885759A (zh) 通知消息处理方法、设备、系统及计算机可读存储介质
WO2021083128A1 (zh) 一种声音处理方法及其装置
WO2021190344A1 (zh) 多屏幕显示电子设备和电子设备的多屏幕显示方法
CN113961157B (zh) 显示交互系统、显示方法及设备
WO2021052204A1 (zh) 基于通讯录的设备发现方法、音视频通信方法及电子设备
CN113691842A (zh) 一种跨设备的内容投射方法及电子设备
CN113704205B (zh) 日志存储的方法、芯片、电子设备和可读存储介质
WO2021218429A1 (zh) 应用窗口的管理方法、终端设备及计算机可读存储介质
WO2021073337A1 (zh) 安装插件的方法、装置和存储介质
CN114115770A (zh) 显示控制的方法及相关装置
WO2022143180A1 (zh) 协同显示方法、终端设备及计算机可读存储介质
WO2022170856A1 (zh) 建立连接的方法与电子设备
WO2021238740A1 (zh) 一种截屏方法及电子设备
CN114064160A (zh) 应用图标布局方法及相关装置
WO2022111529A1 (zh) 一种应用程序的调试方法及电子设备
CN110737916A (zh) 通信终端及处理方法
CN117221713B (zh) 参数加载方法和电子设备
CN116700556B (zh) 卡片生成方法及相关装置

Legal Events

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

Ref document number: 20860912

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2020860912

Country of ref document: EP

Effective date: 20220331