Picture switching method and electronic equipment

By determining and passing the pictures of the preloaded component in the desktop card component of the electronic device, the problem of slow loading and no follow-up when switching the last picture and the first picture is solved, and a smoother picture switching is achieved.

CN120276639AActive Publication Date: 2025-07-08HONOR DEVICE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202311867138.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-29
Publication Date
2025-07-08
Estimated Expiration
2043-12-29

AI Technical Summary

Technical Problem

In electronic devices, when switching between the last picture and the first picture, the picture loads slowly and does not follow the hand.

Method used

Direct transfer of pictures is achieved by determining the first preloaded component in the component of the desktop card and passing the loaded picture to the display component to avoid switching or destroying the view.

Benefits of technology

It solves the problem of not following the hand and slow loading during the image switching process, and improves the fluency and efficiency of image switching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120276639A_ABST
    Figure CN120276639A_ABST
Patent Text Reader

Abstract

The invention provides a picture switching method and electronic equipment, and relates to the technical field of terminals. According to the method, in the picture switching process, the problems that the picture loading is slow and the picture does not follow the hand can be effectively solved. The method comprises the following steps: in response to a trigger operation for the desktop card, determining a first preloading component in components of the desktop card, then transmitting a first picture loaded in the first preloading component to a display component, and displaying the first picture through the display component. Wherein the triggering operation is used for triggering the electronic equipment to switch the picture displayed on the desktop card, and the components of the desktop card comprise a display component and a plurality of preloading components. The display component is used for displaying a picture displayed on the desktop card, and the preloading component is used for loading a to-be-displayed picture; the plurality of preload components includes a first preload component.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of terminals, and particularly to a method for switching pictures and an electronic device. Background Art

[0002] With the continuous development of electronic devices, in addition to application icons, electronic devices also allow users to add the tool components (widgets) of any application to the desktop of the electronic device in the form of desktop cards. Users can quickly and directly view the display information related to the application through the desktop cards. For example, users can add the widget of the gallery application to the desktop of the electronic device in the form of a desktop card to quickly view the pictures in the gallery application.

[0003] In addition, users can also perform a sliding operation in the desktop card of the gallery application. Correspondingly, the electronic device can respond to the user's sliding operation to switch the components (views) in the widget to achieve picture switching. When the currently displayed picture is the last picture, there is no next picture. Therefore, the electronic device does not generate a view for loading the next picture in a timely manner, but after the user's sliding operation ends, it re-locates to the first picture through a jump operation and then generates a view for loading the first picture to achieve the effect of switching from the last picture to the first picture.

[0004] In summary, when implementing the switching between the last picture and the first picture through the above technical solutions, it often causes slow picture loading, and then there is a phenomenon that the picture does not follow the hand during the picture switching process. Summary of the Invention

[0005] Embodiments of this application provide a method for switching pictures and an electronic device, which can effectively improve the problems of slow picture loading and the picture not following the hand during the picture switching process.

[0006] To achieve the above object, the embodiments of this application adopt the following technical solutions:

[0007] In a first aspect, this application provides a method for switching pictures, which is applied to an electronic device. The method includes: in response to a trigger operation on a desktop card, determining a first preloading component in the components of the desktop card, and then transmitting the first picture loaded in the first preloading component to a display component and displaying the first picture through the display component.

[0008] The trigger operation is used to trigger the electronic device to switch the pictures displayed on the desktop card. The trigger operation can be a click operation or a sliding operation.

[0009] The components of the desktop card include a display component and multiple preloading components. Among them, the display component is used to display the pictures shown on the desktop card; the preloading components are used to load the pictures to be displayed; and the multiple preloading components include a first preloading component.

[0010] When switching pictures through the above method, it only needs to complete the transfer of the picture between the display component and the first preloading component, without the need to switch the view (component) for loading pictures, nor to destroy or generate a new view. Therefore, even when switching from the last picture to the first picture, or from the first picture to the last picture, it only needs to transfer the last picture or the first picture loaded on the first preloading component to the display component to achieve the switching between the last picture and the first picture, without the non-responsive phenomenon that occurs in the traditional technology during picture switching, and can also effectively improve the problem of slow picture loading.

[0011] In an alternative embodiment, when the electronic device determines the first preloading component among the components of the desktop card in response to a trigger operation on the desktop card, it can determine the switching direction of the trigger operation in response to the trigger operation on the desktop card, and then determine the first preloading component from the multiple preloading components based on the switching direction of the trigger operation.

[0012] The above method enriches the process of the electronic device determining the first preloading component, making the picture switching method provided by this application more complete.

[0013] In an alternative embodiment, the multiple preloading components may include a pre - front - loading component and a pre - rear - loading component. Among them, the pre - front - loading component is used to load the previous picture of the picture shown on the desktop card. The pre - rear - loading component is used to load the next picture of the picture shown on the desktop card.

[0014] On this basis, when the electronic device determines the first preloading component from the multiple preloading components based on the switching direction of the trigger operation, it can determine the pre - rear - loading component as the first preloading component when the switching direction indicates that the electronic device switches to the next picture; and determine the pre - front - loading component as the first preloading component when the switching direction indicates that the electronic device switches to the previous picture.

[0015] Through the above method, a specific implementable way for the electronic device to determine the first preloading component based on the sliding direction of the sliding operation is provided, thereby making the way for the electronic device to determine the first preloading component in this application clearer and enhancing the implementability of the picture switching method provided by this application.

[0016] In an alternative embodiment, before the electronic device transfers the first picture loaded in the first preloading component to the display component of the desktop card, it may also delete the picture displayed on the display component or transfer the picture displayed on the display component to the second preloading component.

[0017] Wherein, the first preloading component and the second preloading component are respectively used to load one of the previous picture and the next picture of the picture displayed on the desktop card.

[0018] In an alternative embodiment, before the electronic device transfers the first picture loaded in the first preloading component to the display component, it may also load the first picture in the first preloading component.

[0019] By the above method, the electronic device can pre-load the first picture in the first preloading component, so that when the electronic device receives a trigger operation, it can directly transfer the first picture in the first preloading component to the display component without re-acquiring the first picture, thereby increasing the loading speed of the picture and further improving the problem of slow picture loading in the traditional technology.

[0020] In an alternative embodiment, before the above steps, the electronic device may also respond to the operation of creating a desktop card and create a desktop card through a custom component.

[0021] Wherein, the custom component may include at least one function control. Any function control is used to instruct the electronic device to execute the function corresponding to the function control.

[0022] By the above method, the process of creating a desktop card for a target application on the desktop of the electronic device is enriched, so that the subsequent user can perform a sliding operation in the desktop card, and the electronic device can execute the above picture switching method, making the picture switching method provided in this application more complete.

[0023] In addition, the layout and style of each control in the custom component can not only be adjusted and modified according to the user's intention, but the custom component can also support adding various function controls, so that the desktop card created through the custom component supports the functions corresponding to each control. For example, a sliding control can be added to the custom component, and the sliding control is used to support sliding the picture in the desktop card. Correspondingly, the desktop card can support the picture sliding function. Another example is that a refresh control can be added to the custom component, and the refresh control is used to support refreshing the picture in the desktop card. Correspondingly, the desktop card can update the picture in the target application according to a preset refresh duration.

[0024] In an alternative embodiment, the desktop card is created for a target application. When the electronic device creates the desktop card through a custom component in response to an operation of creating the desktop card, it can also verify the target application in response to the operation of creating the desktop card; in the case where the target application belongs to a preset whitelist application, the desktop card is created through the custom component.

[0025] In the above manner, the electronic device can create a desktop card for the target application through the custom component after the verification passes, which not only enriches the process of creating the desktop card by the custom component of the electronic device, but also enhances the security of the process of creating the desktop card, so as to ensure that the desktop card is created for the application software that meets the constraint conditions, thereby improving the rigor of the picture switching method provided in this application.

[0026] In an alternative embodiment, the desktop card is created for a target application, and the custom component may include a refresh control. The refresh control is used to instruct the electronic device to update the picture displayed on the desktop card according to a preset refresh duration.

[0027] On this basis, the electronic device can also determine the number of pictures included in the target application, and update the picture displayed on the desktop card according to the refresh duration when the number of pictures is greater than a preset number.

[0028] In the above manner, a refresh control can be added to the custom component to achieve the effect of automatically switching the pictures in the desktop card.

[0029] In a second aspect, this application also provides an electronic device, including a processor and a memory. The processor is coupled to the memory, and the memory stores program instructions. When the program instructions stored in the memory are executed by the processor, the electronic device implements the method in any one of the first aspects.

[0030] In a third aspect, this application provides a computer-readable storage medium, including computer instructions; when the computer instructions run on the electronic device, the electronic device is caused to execute the method in any one of the first aspects.

[0031] In a fourth aspect, this application provides a computer program product. When the computer program product runs on a computer, the computer is caused to execute the method in the first aspect and any possible design manner thereof.

[0032] In a fifth aspect, the present application provides a chip system, which includes one or more interface circuits and one or more processors. The interface circuits and the processors are interconnected by lines. The above chip system can be applied to an electronic device including a communication module and a memory. The interface circuit is configured to receive a signal from the memory of the electronic device and send the received signal to the processor, and the signal includes computer instructions stored in the memory. When the processor executes the computer instructions, the electronic device can execute the method as in the first aspect and any possible design thereof.

[0033] It can be understood that for the beneficial effects achievable by the electronic device in the second aspect, the computer-readable storage medium in the third aspect, the computer program product in the fourth aspect, and the chip system in the fifth aspect provided above, reference may be made to the beneficial effects in the first aspect and any possible design thereof, which will not be elaborated herein. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 A desktop schematic diagram of an electronic device provided by an embodiment of the present application;

[0035] Figure 2 A schematic diagram of components included in a tool component provided by an embodiment of the present application;

[0036] Figure 3 A schematic structural diagram of an electronic device provided by an embodiment of the present application;

[0037] Figure 4 A software structural block diagram of an electronic device provided by an embodiment of the present application;

[0038] Figure 5 A flowchart of a picture switching method provided by an embodiment of the present application;

[0039] Figure 6 A layout schematic diagram between a display component and a preloading component provided by an embodiment of the present application;

[0040] Figure 7 A flowchart of a desktop card creation method provided by an embodiment of the present application;

[0041] Figure 8 A desktop schematic diagram of an electronic device provided by an embodiment of the present application;

[0042] Figure 9 A schematic diagram of an operable interface provided by an embodiment of the present application;

[0043] Figure 10 Another layout schematic diagram between a display component and a preloading component provided by an embodiment of the present application;

[0044] Figure 11 Another layout schematic diagram between a display component and a preloading component provided by an embodiment of the present application;

[0045] Figure 12 An interaction flowchart of a desktop card creation method provided by an embodiment of the present application;

[0046] Figure 13 An interaction flowchart of a picture switching method provided by an embodiment of the present application;

[0047] Figure 14 Another interaction flowchart of a picture switching method provided by an embodiment of the present application. Detailed implementation manners

[0048] Next, the technical solutions in the embodiments of the present application will be described with reference to the accompanying drawings in the embodiments of the present application. Among them, in the description of the present application, unless otherwise specified, "at least one" means one or more, and "a plurality" means two or more than two. In addition, in order to clearly describe the technical solutions in the embodiments of the present application, in the embodiments of the present application, terms such as "first" and "second" are used to distinguish the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the terms "first" and "second" do not limit the quantity and execution order, and the terms "first" and "second" do not necessarily limit to be different.

[0049] With the continuous development of communication technologies, electronic devices (such as smart phones) have become more and more popular and diverse. For the human-computer interaction interface through which an electronic device interacts with a user, its usability and friendliness have received increasing attention. The desktop of an electronic device is not only an operation entry for various applications on the electronic device, but also an important interface carrier.

[0050] On the desktop of a traditional electronic device, application icons of various applications installed in the electronic device are displayed, and a user can click on the application icon of any application to start the application. With the continuous development of electronic devices, in addition to application icons, an electronic device also allows a user to add a tool component (widget) of any application to the desktop of the electronic device in the form of a desktop card, and the user can quickly and directly view display information related to the application through the widget.

[0051] In some embodiments, a user can add a widget of a gallery application to the desktop of the electronic device in the form of a desktop card. Exemplarily, as Figure 1 shown, the desktop card 101 is a widget of a gallery application, and a user can directly view pictures in the gallery application through the desktop card 101.

[0052] Under normal circumstances, a widget of a gallery application may include multiple components (views). Among them, each view is used to load an image. When the user intends to view other images in the gallery application, the user can also perform a swipe operation on the desktop card, and the electronic device switches the views to achieve image switching.

[0053] Exemplarily, the widget of the gallery application may include Figure 2 The 5 views shown, namely viewA, viewB, viewC, viewD, and viewE. Among them, image A is loaded in viewA, image B is loaded in viewB, image C is loaded in viewC, image D is loaded in viewD, and image E is loaded in viewE. Assume that viewC is the currently displayed view, that is, the image currently displayed in the widget of the gallery application is image C.

[0054] When the user performs a downward swipe operation on the desktop card, the electronic device can set viewB as viewA, viewC as viewB, viewD as viewC, and viewE as viewD to achieve image switching and display image D. At the same time, the electronic device can also destroy the original viewA and create a new view after the original viewE as viewE to load the next image of image E.

[0055] When the currently displayed image is the last image, there is no next image. Therefore, the electronic device does not generate a view for loading the next image in a timely manner. Instead, after the user's swipe operation ends, it re - positions to the first image through a jump operation and then generates a view for loading the first image to achieve the effect of switching from the last image to the first image.

[0056] When implementing the switching between the last image and the first image through the above - mentioned technical solution, it often leads to slow image loading and then a phenomenon of not following the user's operation during image switching.

[0057] To improve the above problems, an embodiment of the present application provides an image switching method. The electronic device can respond to a swipe operation on the desktop card, determine a first pre - loaded component in the components of the desktop card, and then transfer the first image loaded in the first pre - loaded component to the display component of the desktop card and display the first image through the display component.

[0058] It can be seen from this that when the present application switches pictures, it only needs to complete the transfer of pictures between the display component and the first preloading component, without the need to switch the view for loading pictures, nor to destroy or generate a new view. Therefore, even when switching from the last picture to the first picture, or from the first picture to the last picture, it only needs to transfer the last picture or the first picture loaded on the first preloading component to the display component to achieve the switching between the last picture and the first picture, without the phenomenon of slow following in the picture switching process in the traditional technology, and can effectively improve the problem of slow picture loading.

[0059] Exemplarily, the electronic device in the embodiments of the present application may be a mobile phone, a tablet computer, a smart watch, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, and devices including a display screen such as a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) / virtual reality (VR) device, etc. The embodiments of the present application do not impose special restrictions on the specific form of the electronic device.

[0060] Please refer to Figure 3 , which is a schematic structural diagram of an electronic device 300 provided by an embodiment of the present application. As Figure 3 shown, the electronic device 300 may include: a processor 310, an external memory interface 320, an internal memory 321, a universal serial bus (USB) interface 330, a charging management module 340, a power management module 341, a battery 342, an antenna 1, an antenna 2, a mobile communication module 350, a wireless communication module 360, an audio module 370, a speaker 370A, a receiver 370B, a microphone 370C, a headphone interface 370D, a sensor module 380, a key 390, a motor 391, an indicator 392, a camera 393, a display screen 394, and a subscriber identification module (SIM) card interface 395, etc.

[0061] Among them, the above-mentioned sensor module 380 may include sensors such as a pressure sensor, a gyroscope sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, and a bone conduction sensor.

[0062] It can be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 300. In other embodiments, the electronic device 300 may include more or fewer components than shown, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0063] The processor 310 may include one or more processing units. For example, the processor 310 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.

[0064] The controller may be the nerve center and command center of the electronic device 300. 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.

[0065] A memory may also be provided in the processor 310 for storing instructions and data. In some embodiments, the memory in the processor 310 is a cache memory. This memory can save the instructions or data that the processor 310 has just used or recycled. If the processor 310 needs to use the instruction or data again, it can be directly called from the memory. This avoids repeated accesses, reduces the waiting time of the processor 310, and thus improves the efficiency of the system.

[0066] In some embodiments, the processor 310 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0067] It can be understood that the interface connection relationships among the modules illustrated in this embodiment are only illustrative descriptions and do not constitute a structural limitation on the electronic device 300. In other embodiments, the electronic device 300 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0068] The charging management module 340 is used to receive a charging input from a charger. Among them, the charger may be a wireless charger or a wired charger. While the charging management module 340 charges the battery 342, it can also supply power to the electronic device through the power management module 341.

[0069] The power management module 341 is used to connect the battery 342, the charging management module 340, and the processor 310. The power management module 341 receives inputs from the battery 342 and / or the charging management module 340 and supplies power to the processor 310, the internal memory 321, the external memory, the display screen 394, the camera 393, and the wireless communication module 360, etc. In some embodiments, the power management module 341 and the charging management module 340 may also be provided in the same device.

[0070] The wireless communication function of the electronic device can be implemented through antenna 1, antenna 2, the mobile communication module 350, the wireless communication module 360, the modulation and demodulation processor, and the baseband processor, etc. In some embodiments, antenna 1 of the electronic device is coupled to the mobile communication module 350, and antenna 2 is coupled to the wireless communication module 360, enabling the electronic device to communicate with the network and other devices through wireless communication technologies, such as communicating with wearable devices.

[0071] Antenna 1 and Antenna 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example, Antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0072] The mobile communication module 350 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc. applied to the electronic device. The mobile communication module 350 can include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 350 can receive electromagnetic waves through Antenna 1, and perform filtering, amplification and other processing on the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.

[0073] The mobile communication module 350 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves through Antenna 1 and radiate it out. In some embodiments, at least some functional modules of the mobile communication module 350 can be disposed in the processor 310. In some embodiments, at least some functional modules of the mobile communication module 350 and at least some modules of the processor 310 can be disposed in the same device.

[0074] The wireless communication module 360 can provide solutions for wireless communications including WLAN (such as (wireless fidelity, Wi-Fi) network), Bluetooth (BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared Technology (IR), etc. applied to the electronic device.

[0075] Among them, GNSS can include Beidou Navigation Satellite System (BDS), Global Positioning System (GPS), Global Navigation Satellite System (GLONASS), Quasi-Zenith Satellite System (QZSS) and / or Satellite Based Augmentation Systems (SBAS).

[0076] The wireless communication module 360 may be one or more devices integrating at least one communication processing module. The wireless communication module 360 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signals, and sends the processed signals to the processor 310. The wireless communication module 360 may also receive the signals to be sent from the processor 310, perform frequency modulation on them, amplify them, and convert them into electromagnetic waves through the antenna 2 for radiation.

[0077] The electronic device 300 realizes the display function through the GPU, the display screen 394, and the application processor, etc. The GPU is a microprocessor for image processing, and is connected to the display screen 394 and the application processor. The GPU is used to execute mathematical and geometric calculations for graphics rendering. The processor 310 may include one or more GPUs, which execute program instructions to generate or change display information.

[0078] The display screen 394 is used to display images, videos, etc. The display screen 394 includes a display panel.

[0079] The electronic device 300 may realize the shooting function through the ISP, the camera 393, the video codec, the GPU, the display screen 394, and the application processor, etc. The ISP is used to process the data fed back by the camera 393.

[0080] The camera 393 is used to capture static images or videos. In some embodiments, the electronic device may include one or N cameras 393, where N is a positive integer greater than 1. The above N cameras 393 may include a camera with a TOF camera sensor and a camera with an RGB camera sensor.

[0081] The external memory interface 320 may be used to connect to an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 310 through the external memory interface 320 to realize the data storage function. For example, files such as music and videos are saved in the external memory card.

[0082] The internal memory 321 may be used to store computer-executable program codes, and the executable program codes include instructions. The processor 310 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 321. For example, in the embodiments of the present application, the processor 310 may execute the instructions stored in the internal memory 321, and the internal memory 321 may include a program storage area and a data storage area.

[0083] Among them, the storage program area can store the operating system, application programs required by at least one function (such as the sound playback function, image playback function, etc.), and so on. The storage data area can store the data created during the use of the electronic device (such as audio data, phone book, etc.), and so on. In addition, the internal memory 321 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0084] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than those illustrated, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0085] The software system of the electronic device may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. In the embodiments of the present application, taking the system with a layered architecture as an example, the software structure of the electronic device is exemplarily described.

[0086] Figure 4 The software structure block diagram of the electronic device provided by the embodiments of the present application is shown. The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, namely the application layer, the application framework layer, the Android runtime and the system libraries, and the kernel layer.

[0087] The application layer may include a series of application packages. Exemplarily, the application packages may include applications such as the desktop, gallery, music, video, and short messages. Each application may also include a desktop card module and a desktop card data management module. For example, the gallery application may include a gallery desktop card module and a gallery desktop card data management module. The gallery desktop card data management module stores the picture information (such as the picture path, picture shooting time, etc.) of each picture included in the gallery application. The gallery desktop card module can obtain the thumbnail and original picture of the picture according to the picture path of each picture.

[0088] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications in the application layer. The application framework layer includes some predefined functions. Exemplarily, the application framework layer may include a widget framework, a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, an edit manager, etc.

[0089] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0090] The content provider is used to store and obtain data, and make this data accessible to applications. The data may include videos, images, audio, dialed and received calls, browsing history and bookmarks, phone books, etc.

[0091] The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.

[0092] The phone manager is used to provide the communication function of the electronic device. For example, the management of call states (including connection, hanging up, etc.).

[0093] The resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, etc.

[0094] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages, which can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify the completion of a download, message reminder, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or a scrolling text, such as a notification of a background-running application, or a notification that appears on the screen in the form of a dialogue window. For example, it prompts text information in the status bar, emits a prompt sound, the electronic device vibrates, the indicator light flashes, etc.

[0095] The edit manager is used to provide editing functions corresponding to each editing option when the application needs to edit data, so as to implement the editing of data (such as multimedia resources) in the application.

[0096] Android Runtime includes a core library and a virtual machine. Android Runtime is responsible for the scheduling and management of the Android system.

[0097] The core library consists of two parts: one is the functional functions that the Java language needs to call, and the other is the core library of Android.

[0098] The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files in the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as management of object life cycles, stack management, thread management, security and exception management, and garbage collection.

[0099] The system library can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing library (e.g., OpenGL ES), 2D graphics engine (e.g., SGL), etc.

[0100] The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.

[0101] The media library supports the playback and recording of multiple common audio and video formats, as well as static image files, etc. The media library can support multiple audio and video coding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0102] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing, etc.

[0103] The 2D graphics engine is a drawing engine for 2D drawing.

[0104] The kernel layer is the layer between the hardware and the software. The kernel layer includes at least a display driver, a camera driver, an audio driver, and a sensor driver.

[0105] The methods in the following embodiments can all be implemented in an electronic device with the above hardware structure and the above software structure.

[0106] In some embodiments, the picture switching method provided in the embodiments of the present application is applied to the desktop of the electronic device, can also be applied to the negative first screen interface of the electronic device, and can also be applied to the pull-down notification bar and standby scenarios of the electronic device, etc. The following takes the application to the desktop of the electronic device as an example for introduction.

[0107] Taking the electronic device as a mobile phone as an example below, the picture switching method provided in the embodiments of the present application will be described in conjunction with the accompanying drawings.

[0108] Figure 5 It is a flowchart of a picture switching method provided in the embodiments of the present application. This method is applied to the above electronic device, as Figure 5 shown, this method includes:

[0109] S501 determines a switching direction of a triggering operation in response to a triggering operation for a desktop card.

[0110] The triggering operation is used to trigger the electronic device to switch the displayed picture. For example, the triggering operation may be a sliding operation, and the user can slide the desktop card of the electronic device to switch the picture displayed in the desktop card. For another example, the triggering operation may also be a click operation, and the user can click the desktop card of the electronic device to switch the picture displayed in the desktop card.

[0111] The following takes the triggering operation as a sliding operation as an example for illustration.

[0112] The sliding operation may be a vertical sliding or a horizontal sliding, and the embodiments of the present application do not specifically limit the sliding operation.

[0113] The desktop card is a desktop card created for a target application. The target application may be any application software installed in the electronic device, such as a gallery application. The following takes the target application as a gallery application as an example for illustration.

[0114] In some embodiments, the electronic device may determine the number of pictures included in the target application in response to a triggering operation for the desktop card, and determine the switching direction of the triggering operation when the number of pictures is greater than a preset number.

[0115] The preset number may be set according to the actual situation. For example, when the number of pictures is greater than 1, the user can switch the pictures. Therefore, in this scenario, the preset number may be set to 1.

[0116] Specifically, taking the example that the user intends to switch the picture displayed in the desktop card of the gallery application, the user can perform a sliding operation on the desktop card of the gallery application. After the mobile phone receives the sliding operation, it can determine the number of pictures included in the gallery application.

[0117] After that, the electronic device may compare the number of pictures with the preset number. If the number of pictures is less than or equal to the preset number, the electronic device may not respond to the sliding operation. If the number of pictures is greater than the preset number, the electronic device may further determine the sliding direction of the sliding operation.

[0118] For example, assuming that the number of pictures included in the target application is 1 and the preset number is 1, after the electronic device determines the number of pictures included in the target application, it may not respond to the sliding operation.

[0119] For another example, assuming that the number of pictures included in the target application is 10 and the preset number is 1, after the electronic device determines the number of pictures included in the target application, it may further determine the sliding direction of the sliding operation.

[0120] S502. Determine a first preloading component among the components of the desktop card based on the switching direction of the triggering operation.

[0121] The components of the desktop card may include a display component and multiple preloading components. Among them, the display component is used to display the picture shown on the desktop card.

[0122] The preloading component is used to load the picture to be displayed. Optionally, each preloading component can be used to load a picture to be displayed (such as the previous picture or the next picture of the picture loaded on the display component).

[0123] The first preloading component is any one of the multiple preloading components.

[0124] After determining the switching direction of the triggering operation through S501, the electronic device can determine the first preloading component from the multiple preloading components of the desktop card according to the switching direction of the triggering operation.

[0125] In some embodiments, taking the multiple preloading components including a pre - front preloading component and a post - preloading component, where the pre - front preloading component is used to load the previous picture of the picture shown on the desktop card and the post - preloading component is used to load the next picture of the picture shown on the desktop card as an example, when the switching direction of the triggering operation indicates that the electronic device switches to the next picture, the electronic device can determine the post - preloading component as the first preloading component; when the switching direction of the triggering operation indicates that the electronic device switches to the previous picture, the electronic device can determine the pre - front preloading component as the first preloading component.

[0126] During specific implementation, assume the layout among the display component, the pre - front preloading component and the post - preloading component is as Figure 6 shown, where viewA is the pre - front preloading component, viewB is the display component, and viewC is the post - preloading component. When the switching direction of the triggering operation indicates that the electronic device switches to the next picture, the electronic device can determine viewC as the first preloading component; when the switching direction of the triggering operation indicates that the electronic device switches to the previous picture, the electronic device can determine viewA as the first preloading component.

[0127] S503. Transfer the picture displayed on the display component to the second preloading component.

[0128] Among them, the first preloading component and the second preloading component are respectively used to load one of the previous picture and the next picture of the picture displayed on the desktop card and the other. Specifically, when the first preloading component is used to load the previous picture of the picture displayed on the desktop card, the second preloading component is used to load the next picture of the picture displayed on the desktop card. When the first preloading component is used to load the next picture of the picture displayed on the desktop card, the second preloading component is used to load the previous picture of the picture displayed on the desktop card.

[0129] Specifically, the picture displayed on the display component is passed to the second preloading component and displayed through the second preloading component.

[0130] In some embodiments, before the electronic device passes the picture displayed on the display component to the second preloading component, it can also delete the picture displayed on the display component to clear the display component, so as to prepare for the display component to display the first picture loaded in the first preloading component below.

[0131] S504, pass the first picture loaded in the first preloading component to the display component and display the first picture through the display component.

[0132] Continue to refer to Figure 6 , assuming that picture A is loaded on viewA, picture B is loaded on viewB, and picture C is loaded on viewC, and the first preloading component determined by S503 is viewC. The electronic device can pass the picture B loaded on viewB to viewA and load picture B through viewA, and can also pass the picture C on viewC to viewB and display picture C through viewB.

[0133] In addition, the electronic device can also detect the card specification of the desktop card, obtain the picture path of the second picture, then obtain the second picture consistent with the card specification based on the card specification and the picture path, and finally load the second picture on the first preloading component.

[0134] Among them, the second picture is the next picture or the previous picture of the above-mentioned first picture. Specifically, if the sliding direction of the sliding operation indicates that the electronic device switches to the next picture, the second picture is the next picture of the above-mentioned first picture, and if the sliding direction of the sliding operation indicates that the electronic device switches to the previous picture, the second picture is the previous picture of the above-mentioned first picture.

[0135] In some embodiments, the specifications of the desktop card may include the width and height of the desktop card. In some embodiments, before the electronic device transfers the first picture loaded in the first preloading component to the display component, the first picture may also be loaded in the first preloading component.

[0136] Specifically, the method of loading the first picture in the first preloading component is similar to the method of loading the second picture on the first preloading component, which will not be elaborated here.

[0137] By the above method, the electronic device can preload the first picture in the first preloading component, so that when the electronic device receives a trigger operation, it can directly transfer the first picture in the first preloading component to the display component without re-obtaining the first picture, thereby increasing the loading speed of the picture and further improving the problem of slow picture loading in the traditional technology.

[0138] In summary, when switching pictures in this application, only the transfer of pictures needs to be completed between the display component and the first preloading component, without the need to switch the view for loading pictures, nor to destroy or generate a new view. Therefore, even when switching from the last picture to the first picture, or from the first picture to the last picture, only the last picture or the first picture loaded on the first preloading component needs to be transferred to the display component to achieve the switch between the last picture and the first picture, without the non-responsive phenomenon that occurs in the traditional technology during picture switching and effectively improving the problem of slow picture loading.

[0139] Before executing Figure 5 the picture switching method shown, the user can also create a desktop card for the target application on the desktop of the electronic device. Figure 7 The flowchart of the desktop card creation method provided by the embodiment of this application is shown in Figure 7 as follows. This method is applied to the above-mentioned electronic device and includes:

[0140] S701, in response to the operation of creating a desktop card for the target application, verify the target application.

[0141] The target application contains multiple pictures.

[0142] Specifically, the user can long-press the application icon of the target application on the desktop of the electronic device. The electronic device can respond to the long-press operation of the user on the application icon of the target application and display an operable interface including a creation control for creating a desktop card. The user can click the creation control on the operable interface. The electronic device responds to the click operation of the user on the creation control, obtains the application identifier of the target application, and determines whether the application identifier of the target application is included in the preset whitelist applications to implement the verification of the target application.

[0143] Exemplarily, assume Figure 8 is a schematic diagram of the desktop of the electronic device, and the target application is the gallery application. The user can long-press the application icon 801 of the gallery application on the Figure 8 schematic diagram of the desktop shown. The electronic device can respond to the long-press operation of the user on the application icon 801 of the gallery application and display Figure 9 the operable interface 901 shown. The operable interface 901 includes a creation control 902. The user can click the creation control 902. The electronic device responds to the click operation of the user on the creation control 902, obtains the application identifier of the gallery application, and determines whether the application identifier of the gallery application is included in the preset whitelist applications to implement the verification of the gallery application.

[0144] S702, in the case that the target application belongs to the preset whitelist applications, create a desktop card through a custom component.

[0145] The custom component can support adding at least one functional control, so that after the desktop card is created through the custom component, the electronic device can execute the functions corresponding to each functional control. For example, a sliding control can be added to the custom component. The sliding control is used to support sliding the pictures in the desktop card. Correspondingly, the electronic device can support the above-mentioned Figure 5 picture sliding function. For another example, a refresh control can be added to the custom component. The refresh control is used to support refreshing the pictures in the desktop card. Correspondingly, the electronic device can update the pictures in the target application according to the preset refresh duration.

[0146] Among them, the refresh control can include but is not limited to the ViewPager control. The layout of the ViewPager control can be modified so that when displaying or switching pictures subsequently, the electronic device can set the pictures that fill the widget according to the card specifications of the desktop card to improve the display effect of the pictures.

[0147] In addition, the layout and style of each control in the custom component can also be adjusted and modified according to the user's intention. Compared with the components with fixed styles and fixed layouts in the traditional technology, using the custom component can effectively increase the diversity of widgets.

[0148] The target application can include multiple pictures.

[0149] After obtaining the application identifier of the gallery application through S701, if the application identifier of the gallery application is included in the preset whitelist applications, it indicates that the gallery application belongs to the preset whitelist applications. The electronic device can create and display a desktop card including a display component and multiple preloading components through a custom component, and display the desktop card on the desktop of the electronic device.

[0150] S703. Display the first picture in the target application on the display component.

[0151] Specifically, after creating the desktop card through S702, the electronic device can first detect the card specification of the desktop card, then obtain the picture path of the first picture in the target application, and obtain the first picture consistent with the card specification according to the card specification and the picture path of the first picture, and finally display the first picture on the display component.

[0152] S704. Determine the pictures to be displayed corresponding to the preloading components from the multiple pictures of the target application according to the positional relationship between each preloading component and the display component.

[0153] Specifically, the electronic device can first determine the positional relationship between each preloading component and the display component. If the preloading component is located before the display component, the picture before the first picture is used as the picture to be displayed corresponding to the preloading component. If the preloading component is located after the display component, the picture after the first picture is used as the picture to be displayed corresponding to the preloading component.

[0154] For example, assume that the target application includes N pictures, N is a positive integer greater than 0, and the multiple preloading components include a pre - front - loading component and a post - loading component. The electronic device can determine the second picture in the target application as the picture to be displayed corresponding to the post - loading component, and determine the Nth picture in the target application as the picture to be displayed corresponding to the pre - front - loading component.

[0155] For another example, assume that the target application includes N pictures, and the multiple preloading components include a first pre - front - loading component, a second pre - front - loading component, a first post - loading component, and a second post - loading component. Among them, the relationship between the display component, the first pre - front - loading component, the second pre - front - loading component, the first post - loading component, and the second post - loading component is as Figure 10As shown, the first pre - preloading component is located before the second pre - preloading component, the second pre - preloading component is located before the display component, the first post - preloading component is located after the display component, and the second post - preloading component is located after the first post - preloading component. The electronic device can use the (N - 1)th picture as the picture to be displayed corresponding to the first pre - preloading component, the Nth picture as the picture to be displayed corresponding to the second pre - preloading component, the second picture as the picture to be displayed corresponding to the first post - preloading component, and the third picture as the picture to be displayed corresponding to the second post - preloading component.

[0156] S705. Load the picture to be displayed on the pre - loading component.

[0157] Specifically, after determining the pictures to be displayed corresponding to each pre - loading component through S704, the electronic device can obtain the picture paths of each picture to be displayed, and then according to the card specifications of the desktop card and the picture paths of each picture to be displayed, obtain each picture to be displayed that is consistent with the card specifications, and finally load each picture to be displayed on each pre - loading component.

[0158] In specific implementation, taking the example that the target application contains N pictures and the pre - loading component includes a pre - preloading component and a post - preloading component, the electronic device can first obtain the picture path of the second picture and the picture path of the Nth picture, then according to the card specifications of the desktop card and the picture path of the second picture, obtain the second picture that is consistent with the card specifications, and according to the card specifications and the picture path of the Nth picture, obtain the Nth picture that is consistent with the card specifications. Finally, load the Nth picture on the pre - preloading component and load the second picture on the post - preloading component.

[0159] Through the above method, the process of the electronic device creating a desktop card for the target application on the desktop is enriched, so that the subsequent user can perform a sliding operation in the desktop card, and the electronic device can execute the above - mentioned picture switching method, making the picture switching method provided by this application more complete.

[0160] In addition, the layout and style of each control in the custom component can not only be adjusted and modified accordingly according to the user's intention, but the custom component can also support adding various functional controls, so that the desktop card created through the custom component supports the functions corresponding to each control. For example, a sliding control can be added to the custom component, and the sliding control is used to support sliding the pictures in the desktop card. Correspondingly, the desktop card can support the picture sliding function. Another example is that a refresh control can be added to the custom component, and the refresh control is used to support refreshing the pictures in the desktop card. Correspondingly, the desktop card can update the pictures in the target application according to the preset refresh duration.

[0161] In some embodiments, at least one functional control may further include a refresh control, and the refresh control is used to instruct the electronic device to update the pictures displayed on the desktop card according to a preset refresh duration. On this basis, after the electronic device loads the pictures to be displayed on the preloading component, it can also determine the number of pictures included in the target application, and then, when the number of pictures is greater than the preset number, update the pictures loaded on the display component according to the refresh duration.

[0162] Among them, the refresh duration may be 5 seconds or 10 seconds, and the embodiments of the present application do not make specific limitations on the refresh duration.

[0163] In specific implementation, taking the preset number as 1 and the refresh duration as 5s as an example, the electronic device can first determine the number of pictures included in the target application. If the number of pictures included in the target application is greater than 1, the electronic device can transfer the pictures in the display component to the preloading component in front of the display component every 5 seconds, transfer the pictures in the preloading component behind the display component to the display component, and obtain the picture path of the next picture in the preloading component behind the display component. Then, according to the card specification of the desktop card and the picture path of the next picture, the electronic device can obtain the next picture that is consistent with the card specification, and finally load the next picture on the preloading component behind the display component.

[0164] For example, assume that the current time is 10:00:00, viewA is the preloading component in front, viewB is the display component, and viewC is the preloading component behind. As Figure 11 shown, the last picture is loaded on viewA, the first picture is loaded on viewB, the second picture is loaded on viewC, and the number of pictures included in the target application is 10. When the current time is 10:00:05, the electronic device can destroy the pictures in viewA, then transfer the first picture in viewB to viewA, transfer the second picture in viewC to viewB, and obtain the picture path of the third picture. After that, the electronic device can obtain the third picture that is consistent with the card specification according to the card specification of the desktop card and the picture path of the third picture, and finally load the third picture on viewC to complete a refresh operation. The subsequent refresh operations are similar to the above steps and will not be elaborated here one by one.

[0165] Through the above method, a refresh control can be added to the custom component to achieve the effect of automatically switching the pictures in the desktop card. Compared with the traditional method of realizing the picture switching refresh by the interaction between the desktop card module in the application layer and the widget framework in the application framework layer, the method of adding a refresh control in the custom component can directly generate and issue the refresh instruction in the application layer without generating and issuing the refresh instruction through the widget framework. Therefore, not only can the effect of customizing the refresh time be achieved, but also the refresh duration of the pictures can be greatly reduced.

[0166] In some embodiments, the above Figure 5 shown picture switching method and the above Figure 7 shown desktop card creation method can also be implemented through the Figure 4 shown application layer and application framework layer. The following will take the target application as the gallery application, the preloading component includes a pre - front - loading component and a post - preloading component, and the card specifications of the desktop card include the width and height of the desktop card as an example to introduce the Figure 5 shown picture switching method and the above Figure 7 shown desktop card creation method.

[0167] Figure 12 Fig. shows the interaction flowchart of a desktop card creation method provided by an embodiment of the present application. This method is implemented through the interaction of the desktop application (hereinafter simply referred to as the desktop) in the application layer shown in Figure 4 shown, the gallery desktop card module and the gallery desktop card data management module in the gallery application (hereinafter simply referred to as the gallery), and the widget framework in the application framework layer, as Figure 12 shown. This method includes:

[0168] S1201, the desktop responds to the operation of creating a desktop card for the gallery application and obtains the application identifier of the gallery application.

[0169] S1202, the desktop sends a creation request carrying the application identifier of the gallery application to the widget framework.

[0170] S1203, the widget framework sends a component creation instruction to the gallery desktop card module based on the application identifier of the gallery application.

[0171] S1204, the gallery desktop card module responds to the component creation instruction and creates a custom view layout.

[0172] In order to make this custom view layout presented in the form of a desktop card on the desktop of the electronic device, this custom view layout can be a view inherited from RemoteView.

[0173] S1205, The gallery desktop card module adds a ViewPager to the custom view layout.

[0174] Among them, the ViewPager can be used to implement the sliding browsing of pictures.

[0175] S1206, The gallery desktop card module adds viewA, viewB, and viewC to the ViewPager.

[0176] Among them, viewB is a display component, viewA is located before viewB, viewA is the first preloading component, viewC is located after viewB, and viewC is the second preloading component.

[0177] S1207, The gallery desktop card module sends the custom view layout containing the ViewPager, viewA, viewB, and viewC to the widget framework.

[0178] S1208, After receiving the custom view layout, the widget framework verifies the target application according to the application identifier of the target application.

[0179] S1209, When the verification is passed, the widget framework creates a desktop card corresponding to the custom view layout.

[0180] S1210, The widget framework sends the desktop card to the desktop.

[0181] S1211, The desktop displays the desktop card and obtains the width and height of the desktop card.

[0182] S1212, The desktop sends the width and height of the desktop card to the gallery desktop card module.

[0183] S1213, After receiving the width and height of the desktop card, the gallery desktop card module sends a picture acquisition request to the gallery desktop card data management module.

[0184] S1214, After receiving the picture acquisition request, the gallery desktop card data management module obtains and stores the number of pictures contained in the gallery application and the picture paths of each picture.

[0185] S1215, The gallery desktop card data management module sends the number of pictures N to the gallery desktop card module.

[0186] S1216, The gallery desktop card module sends a picture path acquisition request to the gallery desktop card data management module.

[0187] The picture path acquisition request contains the picture identifiers of the first picture, the second picture, and the Nth picture.

[0188] S1217, the gallery desktop card data management module sends the picture paths of the first picture, the second picture, and the Nth picture to the gallery desktop card module.

[0189] S1218, the gallery desktop card module obtains the original pictures of the same width and height as the desktop card for each picture according to the picture path of each picture and the width and height of the desktop card.

[0190] Specifically, the gallery desktop card module obtains the original picture of the first picture with the same width and height as the desktop card according to the picture path of the first picture and the width and height of the desktop card; obtains the original picture of the second picture with the same width and height as the desktop card according to the picture path of the second picture and the width and height of the desktop card; and obtains the original picture of the Nth picture with the same width and height as the desktop card according to the picture path of the Nth picture and the width and height of the desktop card.

[0191] S1219, the gallery desktop card module loads the original picture of the first picture in viewB, loads the original picture of the second picture in viewC, and loads the original picture of the Nth picture in viewA.

[0192] Through Figure 11 After creating the desktop card in the shown manner, the user can slide the desktop card according to their own needs to manually update the desktop card, and the electronic device can also update the pictures loaded on the display component according to the refresh time of the refresh control to automatically update the desktop card. The following will describe Figure 12 how the user can slide the desktop card according to their own needs, and will describe Figure 13 how the electronic device can also update the pictures loaded on the display component according to the refresh time of the refresh control.

[0193] Figure 13 Fig. shows the interaction flow chart of a picture switching method provided by an embodiment of the present application. This method is implemented by the interaction of the desktop application (hereinafter simply referred to as the desktop) and the gallery desktop card module and the gallery desktop card data management module in the gallery application (hereinafter simply referred to as the gallery) shown in Figure 4 As shown in Figure 13 The method includes:

[0194] S1301, after the desktop receives the sliding operation of the user on the desktop card of the gallery application, it sends a sliding state acquisition instruction to the gallery desktop card module.

[0195] This sliding operation instructs the electronic device to switch to the second picture.

[0196] Among them, the sliding state acquisition instruction is used to identify whether the desktop card can be slid. For example, if the sliding state is 1, it indicates that the desktop card can be slid; if the sliding state is 0, it indicates that the desktop card cannot be slid.

[0197] S1302, the gallery desktop card module obtains the number of pictures in the gallery.

[0198] S1303, the gallery desktop card module sends the sliding state of the desktop card to the desktop based on the number of pictures in the gallery.

[0199] S1304, when the desktop identifies that the desktop card is slidable in the sliding state, it sends the sliding event corresponding to the sliding operation to the gallery desktop card module.

[0200] S1305, the gallery desktop card module gradually switches viewB to viewC in response to the sliding event.

[0201] S1306, after the desktop detects that the user ends the sliding operation, it sends a sliding end event to the gallery desktop card module.

[0202] S1307, the gallery desktop card module sets viewB as the display component in response to the sliding end event, destroys the pictures loaded on viewA, and at the same time transfers the pictures loaded on viewB to viewA and the pictures loaded on viewC to viewB.

[0203] S1308, the gallery desktop card module sends a picture path acquisition request to the gallery desktop card data management module.

[0204] The picture path acquisition request contains the picture identifier of the third picture.

[0205] S1309, the gallery desktop card data management module sends the picture path of the third picture to the gallery desktop card module.

[0206] S1310, the gallery desktop card module obtains the third picture with the same width and height as the desktop card according to the picture path of the third picture and the width and height of the desktop card.

[0207] S1311, the gallery desktop card module loads the third picture on viewC.

[0208] When switching pictures through the above method, it is only necessary to complete the transfer of pictures between the display component and the first preloading component. Even when switching from the last picture to the first picture, or from the first picture to the last picture, it is only necessary to transfer the last picture or the first picture loaded on the first preloading component to the display component to achieve the switching between the last picture and the first picture. Therefore, it can effectively improve the problem of unresponsiveness during picture switching and slow picture loading in the traditional technology.

[0209] Figure 14 The interaction flowchart of another picture switching method provided by the embodiment of the present application is shown. This method is implemented by the interaction between the gallery desktop card module and the gallery desktop card data management module in the Figure 4 gallery application (hereinafter simply referred to as the gallery) shown, as Figure 14 shown, this method includes:

[0210] S1401, the gallery desktop card module determines the number of pictures included in the gallery application.

[0211] S1402, when the number of pictures is greater than the preset number, the gallery desktop card module sends a refresh instruction to itself every t seconds.

[0212] Wherein, t is the preset refresh duration.

[0213] S1403, in response to the refresh instruction, the gallery desktop card module gradually switches viewB to viewC.

[0214] S1404, when viewB is completely switched to viewC, the gallery desktop card module resets viewB as the display component, destroys the pictures loaded on viewA, and at the same time transfers the pictures loaded on viewB to viewA and transfers the pictures loaded on viewC to viewB.

[0215] S1405, the gallery desktop card module sends a picture path acquisition request to the gallery desktop card data management module.

[0216] The picture path acquisition request contains the picture identifier of the third picture.

[0217] S1406, the gallery desktop card data management module sends the picture path of the third picture to the gallery desktop card module.

[0218] S1407, the gallery desktop card module obtains the third picture with the same width and height as the desktop card according to the picture path of the third picture and the width and height of the desktop card.

[0219] S1408, the gallery desktop card module loads the third picture on viewC.

[0220] Through the above method, a refresh control can be added to the custom component to achieve the effect of automatically switching the pictures in the desktop card. Compared with the traditional method of realizing the picture switching refresh by the interaction between the desktop card module in the application layer and the widget framework in the application framework layer, the method of adding a refresh control to the custom component can directly generate and issue the refresh instruction in the application layer without generating and issuing the refresh instruction through the widget framework. Therefore, not only can the custom refresh time be achieved, but also the refresh duration of the pictures can be greatly reduced.

[0221] Optionally, an embodiment of the present application provides a picture switching method applied to an electronic device, and the method includes the following steps A - C.

[0222] Step A: In response to a trigger operation for the desktop card, determine a first pre - loading component in the components of the desktop card.

[0223] Among them, the trigger operation is used to trigger the electronic device to switch the picture displayed on the desktop card. The components of the desktop card include a display component and multiple pre - loading components. The display component is used to display the picture displayed on the desktop card. The pre - loading component is used to load the picture to be displayed. The multiple pre - loading components include the first pre - loading component.

[0224] Step B: Transmit the first picture loaded in the first pre - loading component to the display component.

[0225] Step C: Display the first picture through the display component.

[0226] An embodiment of the present application also provides an electronic device, which includes: a display screen, a memory, and one or more processors; the display screen, the memory are coupled to the processor; among them, the memory stores computer program code, and the computer program code includes computer instructions. When the computer instructions are executed by the processor, the electronic device executes the multimedia resource editing method provided in the foregoing embodiment. The specific structure of this electronic device can refer to Figure 3 the structure of the electronic device shown in

[0227] An embodiment of the present application also provides a computer - readable storage medium, which includes computer instructions. When the computer instructions run on an electronic device, the electronic device executes the multimedia resource editing method provided in the foregoing embodiment.

[0228] The embodiments of the present application also provide a computer program product, which includes executable instructions. When the computer program product runs on an electronic device, the electronic device is enabled to execute the picture switching method provided in the foregoing embodiments.

[0229] Through the description of the above embodiments, those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

[0230] In several embodiments provided in the present application, it should be understood that the disclosed device / equipment and method can be implemented in other ways. For example, the device / equipment embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical, mechanical or other form.

[0231] The unit described as a separate component may or may not be physically separated. The component displayed as a unit may be a physical unit or multiple physical units, that is, it may be located in one place, or it may be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0232] In addition, each functional unit in the various embodiments of the present application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0233] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiments of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions for causing a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.

[0234] The above content is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method for picture switching, characterized in that, Applied to an electronic device, including: In response to a triggering operation on the desktop card, determining a first preloading component among the components of the desktop card; the triggering operation is used to trigger the electronic device to switch the picture displayed on the desktop card; the components of the desktop card include a display component and multiple preloading components; the display component is used to display the picture shown on the desktop card; the preloading components are used to load the pictures to be displayed; the multiple preloading components include the first preloading component; Transferring the first picture loaded in the first preloading component to the display component; Displaying the first picture through the display component.

2. The method according to claim 1, characterized in that The step of determining a first preloading component among the components of the desktop card in response to a triggering operation on the desktop card includes: In response to a triggering operation on the desktop card, determining the switching direction of the triggering operation; Based on the switching direction of the triggering operation, determining the first preloading component from the multiple preloading components.

3. The method according to claim 2, wherein The multiple preloading components include a pre - front - loading component and a pre - rear - loading component; the pre - front - loading component is used to load the previous picture of the picture shown on the desktop card; the pre - rear - loading component is used to load the next picture of the picture shown on the desktop card; The step of determining the first preloading component from the multiple preloading components based on the switching direction of the triggering operation includes: When the switching direction indicates that the electronic device switches to the next picture, determining the pre - rear - loading component as the first preloading component; When the switching direction indicates that the electronic device switches to the previous picture, determining the pre - front - loading component as the first preloading component.

4. The method according to any one of claims 1 to 3, characterized in that Before transferring the first picture loaded in the first preloading component to the display component, the method further includes: Deleting the picture displayed on the display component; or, Transferring the picture displayed on the display component to a second preloading component; the first preloading component and the second preloading component are respectively used to load one and the other of the previous picture and the next picture of the picture shown on the desktop card.

5. The method according to claim 1, wherein Before transferring the first picture loaded in the first preloading component to the display component, the method further includes: Loading a first picture in the first preloading component.

6. The method according to claim 5, wherein The specification of the first picture is consistent with the card specification of the desktop card.

7. The method according to claim 1, characterized in that The method further includes: In response to an operation of creating a desktop card, creating the desktop card through a custom component; the custom component includes at least one function control; any function control is used to instruct the electronic device to execute the function corresponding to the function control.

8. The method according to claim 7, wherein The desktop card is created for a target application; The step of creating the desktop card through a custom component in response to an operation of creating a desktop card includes: In response to an operation of creating a desktop card, verifying the target application; When the target application belongs to a preset whitelist application, creating the desktop card through the custom component.

9. The method according to claim 7, wherein The desktop card is created for a target application; the at least one function control includes a refresh control; the refresh control is used to instruct the electronic device to update the picture displayed on the desktop card according to a preset refresh duration; The method further includes: Determining the number of pictures included in the target application; When the number of pictures is greater than a preset number, updating the picture displayed on the desktop card according to the refresh duration.

10. An electronic device, characterized in that, It includes a processor and a memory, the processor is coupled to the memory, and the memory stores program instructions. When the program instructions stored in the memory are executed by the processor, the electronic device implements the method according to any one of claims 1-9.

11. A computer-readable storage medium, characterized in that, It includes computer instructions; When the computer instructions run on an electronic device, the electronic device is caused to execute the method according to any one of claims 1-9.

Citation Information

Patent Citations

  • Interface skin switching method and device

    CN108228293A

  • Picture list display method and device, terminal device and storage medium

    CN109343915A

  • Picture browsing method and device, electronic equipment and storage medium

    CN113268622A

  • Card display method, electronic equipment and computer readable storage medium

    CN116527805A

  • Display method and related apparatus

    WO2023160349A1