CN115269077A - Picture display method, module, mobile terminal and storage medium - Google Patents

Picture display method, module, mobile terminal and storage medium Download PDF

Info

Publication number
CN115269077A
CN115269077A CN202210821119.XA CN202210821119A CN115269077A CN 115269077 A CN115269077 A CN 115269077A CN 202210821119 A CN202210821119 A CN 202210821119A CN 115269077 A CN115269077 A CN 115269077A
Authority
CN
China
Prior art keywords
carousel
picture display
control array
unused
picture
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210821119.XA
Other languages
Chinese (zh)
Inventor
高帅
***
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Cheerbright Technologies Co Ltd
Original Assignee
Beijing Cheerbright Technologies Co Ltd
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 Beijing Cheerbright Technologies Co Ltd filed Critical Beijing Cheerbright Technologies Co Ltd
Priority to CN202210821119.XA priority Critical patent/CN115269077A/en
Publication of CN115269077A publication Critical patent/CN115269077A/en
Pending legal-status Critical Current

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
    • 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory

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)
  • Controls And Circuits For Display Device (AREA)

Abstract

The invention discloses a picture display method, a module, a mobile terminal and a storage medium, wherein the method comprises the following steps: responding to the operation of switching to the carousel image display page, and displaying the carousel image display page; creating an example corresponding to the carousel image list management class, and initializing an unused control array based on the example, wherein the unused control array is used for storing an unused picture display control; creating a carousel graph assembly and initializing the use state of the carousel graph assembly; and if the number of the picture display controls in the unused control array is not less than the preset number, taking the preset number of the picture display controls out of the unused control array and adding the picture display controls into the carousel image assembly so as to perform picture circular rolling display on the carousel image display page.

Description

Picture display method, module, mobile terminal and storage medium
Technical Field
The invention relates to the technical field of internet and mobile terminals, in particular to a picture display method, a module, a mobile terminal and a storage medium.
Background
The carousel map refers to a plurality of pictures which can be displayed in a scrolling manner to a user in a circulating manner in an interface through mouse clicking or finger sliding and other operations in a module or a window even without any operation. For applications installed on a mobile terminal, especially for e-commerce applications, information applications, etc., there are many modules involved in the design requirements of carousel maps.
At present, in the application development process, developers usually adopt the following two schemes to realize the picture carousel. The first scheme is to use a scrolling component to dynamically create a picture display control for processing a carousel image, and comprises two sub schemes: the method comprises the following steps that firstly, a plurality of picture display controls are created for each carousel picture assembly to display picture information in a standby mode, the creation of the plurality of picture display controls can cause memory waste of the mobile terminal, and memory resources can be consumed when a plurality of pictures are loaded; and the second sub scheme is that the picture display control is dynamically added and deleted when the carousel picture is rolled, and the picture display control can be frequently created and destroyed, so that the memory cannot be timely recovered, and the memory redundancy is generated.
The second scheme is to use a sliding list component multiplexing mode to perform carousel image display processing, and although a component multiplexing mechanism is adopted, the same carousel image component avoids creating multiple image display controls, when multiple carousel image components are applied globally, too many image display controls are created, which causes waste of memory resources.
Therefore, a new picture display method is required to optimize the above processing procedure.
Disclosure of Invention
To this end, the present invention provides a picture display scheme in an attempt to solve or at least alleviate the above-presented problems.
According to an aspect of the present invention, there is provided a picture display method, including the steps of: firstly, responding to the operation of switching to the carousel image display page, and displaying the carousel image display page; creating an example corresponding to the carousel image single instance management class, and initializing an unused control array based on the example, wherein the unused control array is used for storing an unused image display control; creating a carousel graph assembly and initializing the use state of the carousel graph assembly; and if the number of the picture display controls in the unused control array is not less than the preset number, taking the preset number of the picture display controls out of the unused control array and adding the picture display controls into the carousel image assembly so as to perform picture circular rolling display on the carousel image display page.
Optionally, in the picture display method according to the present invention, the step of initializing an unused control array based on an instance includes: based on the example, creating an unused control array, and initializing the length of the unused control array to be a numerical value corresponding to the preset number; and creating a preset number of picture display controls and putting the picture display controls into an unused control array.
Optionally, in the picture display method according to the present invention, further comprising: if the number of the picture display controls in the unused control array is smaller than the preset number, subtracting the number of the picture display controls in the unused control array from the preset number to obtain a number difference value; and creating a different number of picture display controls to be placed in the unused control array.
Optionally, in the picture display method according to the present invention, the method further includes: and initializing a used control array based on the instance, wherein the used control array is used for storing used picture display controls.
Optionally, in the picture display method according to the present invention, the method further includes: if the using state meets a first preset condition, determining that the carousel map assembly is in a destruction state; and removing all in-use picture display controls from the carousel graph component, and synchronously removing all in-use picture display controls to be removed from the used control array.
Optionally, in the picture display method according to the present invention, further comprising: if the using state meets a second preset condition, determining that the carousel picture assembly is in a hidden state; and releasing the non-displayed picture display control from the carousel graph component, and synchronously removing the released non-displayed picture display control from the used control array and putting the released non-displayed picture display control into the unused control array.
Optionally, in the picture display method according to the present invention, the method further includes: acquiring the use state of the carousel image assembly, and judging whether a new carousel image assembly needs to be created or not; and if so, creating a new carousel graph component and initializing the use state of the new carousel graph component.
According to an aspect of the present invention, there is provided a picture display module including a page display unit, a first creation unit, a second creation unit, and a picture display unit. The page display unit is suitable for responding to the operation of switching to the carousel image display page and displaying the carousel image display page; the first creating unit is suitable for creating an example corresponding to the carousel image list management class and initializing an unused control array based on the example, wherein the unused control array is used for storing an unused picture display control; the second creating unit is suitable for creating the carousel graph component and initializing the use state of the carousel graph component; the picture display unit is suitable for taking the preset number of picture display controls out of the unused control array and adding the picture display controls into the carousel image assembly when the number of the picture display controls in the unused control array is not less than the preset number, so that pictures are displayed on the carousel image display page in a circular rolling mode.
According to an aspect of the present invention, there is provided a mobile terminal including: at least one processor; and a memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, the program instructions comprising instructions for performing the picture display method as described above.
According to an aspect of the present invention, there is provided a readable storage medium storing program instructions that, when read and executed by a mobile terminal, cause the mobile terminal to perform the picture display method as described above.
According to the picture display scheme, in the carousel picture display page, an example corresponding to a carousel picture single instance management class is created, an unused control array is initialized based on the example, carousel picture assemblies are created, and when the number of picture display controls in the unused control array is not smaller than a preset number, a preset number of picture display controls are taken out from the unused control array and added to the carousel picture assemblies so as to display pictures in a circulating rolling mode.
In the technical scheme, the picture display controls associated with the carousel map component are managed in a single-case mode, the picture display controls used in global management are applied, the number of the picture display controls needing to be created is controlled by using the preset number, and consumption on a memory is reduced. Moreover, by using the carousel image list management class, the problems that the memory cannot be timely recycled, the memory redundancy and the like caused by frequently creating and destroying the image display control can be avoided, and the stability of application operation is improved. In addition, the carousel graph single instance management class runs in the whole application life cycle and is used at any time, so that the display efficiency of the carousel graph component can be improved, and the development process of the carousel graph component is simplified.
Drawings
To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings, which are indicative of various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof are intended to be within the scope of the claimed subject matter. The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description read in conjunction with the accompanying drawings. Throughout this disclosure, like reference numerals generally refer to like parts or elements.
Fig. 1 illustrates a block diagram of a mobile terminal 100 according to an embodiment of the present invention;
FIG. 2 shows a flow diagram of a picture display method 200 according to one embodiment of the invention; and
fig. 3 shows a schematic diagram of a picture display module 300 according to an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Fig. 1 illustrates a block diagram of a mobile terminal 100 according to an embodiment of the present invention. The mobile terminal 100 may be a mobile phone, a tablet computer, a notebook computer, a multimedia player, a wearable device, etc. configured with a front camera and a display screen, but is not limited thereto. As shown in FIG. 1, the mobile terminal 100 may include a memory interface 102, a multi-core processor 104, and a peripheral interface 106.
The memory interface 102, the multi-core processor 104, and/or the peripheral interface 106 may be discrete components or may be integrated in one or more integrated circuits. In the mobile terminal 100, the various elements may be coupled by one or more communication buses or signal lines. Sensors, devices, and subsystems can be coupled to peripheral interface 106 to facilitate a variety of functions.
For example, the acceleration sensor 110, the magnetic field sensor 112, and the gravity sensor 114 may be coupled to the peripheral interface 106, the acceleration sensor 110 may collect acceleration data in three coordinate axis directions of the body coordinate system, the magnetic field sensor 112 may collect magnetic field data (magnetic induction intensity) in three coordinate axis directions of the body coordinate system, the gravity sensor 114 may collect gravity data in three coordinate axes of the body coordinate system, and the above sensors may conveniently implement functions such as step counting, orientation, and intelligent horizontal and vertical screen switching. Other sensors 116 may also be coupled to the peripheral interface 106, such as a positioning system (e.g., a GPS receiver), a temperature sensor, a biometric sensor, or other sensing device, to facilitate related functions.
The camera subsystem 120 and optical sensor 122, which may be, for example, a charge-coupled device (CCD) or a complementary metal-oxide semiconductor (CMOS) optical sensor, may be used to facilitate implementation of camera functions such as recording photographs and video clips. Communication functions may be facilitated by one or more wireless communication subsystems 124, which may include radio frequency receivers and transmitters and/or optical (e.g., infrared) receivers and transmitters. The particular design and implementation of the wireless communication subsystem 124 may depend on the one or more communication networks supported by the mobile terminal 100. For example, the mobile terminal 100 may include a wireless communication subsystem 124 designed to support LTE, a 3G, GSM network, a GPRS network, an EDGE network, a Wi-Fi or WiMax network, and a Bluetooth network.
The audio subsystem 126 may be coupled to a speaker 128 and a microphone 130 to facilitate voice-enabled functions, such as voice recognition, voice replication, digital recording, and telephony functions. The I/O subsystem 140 may include a touch screen controller 142 and/or one or more other input controllers 144. The touch screen controller 142 may be coupled to a touch screen 146. For example, the touch screen 146 and touch screen controller 142 may detect contact and movement or pauses made therewith using any of a variety of touch sensing technologies, including but not limited to capacitive, resistive, infrared, and surface acoustic wave technologies. One or more other input controllers 144 may be coupled to other input/control devices 148 such as one or more buttons, rocker switches, thumbwheels, infrared ports, USB ports, and/or pointing devices such as styluses. The one or more buttons (not shown) may include up/down buttons for controlling the volume of the speaker 128 and/or microphone 130.
The memory interface 102 may be coupled with a memory 150. The memory 150 may include an internal memory such as, but not limited to, a Static Random Access Memory (SRAM), a non-volatile memory (NVRAM), and the like; the external memory may be, for example, a hard disk, a removable hard disk, a U disk, etc., but is not limited thereto. The memory 150 may store program instructions that may include, for example, an operating system 152 and applications 154. The operating system 152 may be, for example, android, iOS, windows Phone, etc., which includes program instructions for handling basic system services and for performing hardware dependent tasks. The memory 150 may also store applications 154, which applications 154 may include program instructions for implementing various user-desired functions. The application 154 may be provided separately from the operating system or may be native to the operating system. In addition, a driver module may also be added to the operating system when the application 154 is installed in the mobile terminal 100. While the mobile device is running, the operating system 152 is loaded from the memory 150 and executed by the processor 104. The application 154 is also loaded from the memory 150 and executed by the processor 104 at runtime. The application 154 runs on top of an operating system, and utilizes interfaces provided by the operating system and underlying hardware to implement various user-desired functions, such as hardware management, instant messaging, web browsing, and the like.
In one embodiment, the above-mentioned memory 150 stores program instructions including a plurality of program instructions adapted to execute the picture display method 200 of the present invention, and the program instructions can be executed by a processor, so that the picture display method 200 of the present invention can be executed in the mobile terminal 100.
In one embodiment, the above-mentioned application 154 includes a picture display module 300, and the picture display module 300 includes a plurality of program instructions suitable for executing the picture display method 200 of the present invention, and the program instructions can be executed by a processor, so that the picture display method 200 of the present invention can be executed in the picture display module 300 of the mobile terminal 100.
Fig. 2 shows a flow diagram of a picture display method 200 according to an embodiment of the invention. The method 200 may be performed in a mobile terminal, such as the mobile terminal 100 described above.
As shown in fig. 2, the method 200 begins at step S210. In step S210, in response to the operation of switching to the carousel view presentation page, the carousel view presentation page is displayed.
According to an embodiment of the present invention, an application is installed in the mobile terminal 100, and after the application is opened by a user, the user may switch from a current page to a carousel display page through operations such as clicking, sliding, and the like, and at this time, the carousel display page is displayed in an interface of the mobile terminal 100 in response to the operation of switching to the carousel display page.
Subsequently, step S220 is performed, an instance corresponding to the carousel-chart instance management class is created, and an unused control array is initialized based on the instance, where the unused control array is used for storing an unused picture display control. According to an embodiment of the invention, a class object is generated based on the singleton loading mode in a class creating mode, so that creation of an instance corresponding to the carousel single management class is completed.
When the unused control array is initialized based on the instance, the unused control array may be created based on the instance, the length of the unused control array is initialized to a value corresponding to the preset number, and then the preset number of picture display controls are created and placed in the unused control array.
In this embodiment, one picture display control is used to display one picture, and the preset number is generally set to be the minimum number of pictures that can form a carousel display, for example, the preset number is 2, and then a numerical value corresponding to the preset number is also 2. At this time, the length of the initialized unused control array is 2, and 2 picture display controls are created and put into the unused control array.
According to an embodiment of the invention, the method 200 further comprises: and initializing a used control array based on the instance, wherein the used control array is used for storing used picture display controls. In this embodiment, based on the instance, a used control array is created and initialized to a length of 0. It should be noted that both the unused control arrays and the used control arrays are arrays of linked list structure.
The following are examples of code for creating an instance corresponding to the carousel-chart instance management class, initializing an unused control array and a used control array, and managing the picture display control by the two arrays in the instance, specifically as follows:
Figure BDA0003742414900000071
Figure BDA0003742414900000081
the ShareBanner instance is a carousel instance management class, the ImageViewUndesedlist is an unused control array, the ImageViewUsedList is a used control array, and the ImageView is a picture display control.
In step S230, a carousel map component is created, and the use state of the carousel map component is initialized. According to one embodiment of the invention, the carousel map component may be created as follows. In this embodiment, class loading detection is performed first, that is, whether a class corresponding to the carousel view component, such as BannerView, is loaded is checked, and if not, a loading process is performed. Then, a fixed-size memory is allocated to the object corresponding to the class, and the instance field of the class object is initialized to default values such as 0, for example, the use state of the carousel map component, that is, the BannerViewState, may be initialized to default value 0. Then, an object header is set, some information of the object, such as a hash code of the object, is added, a constructor method is executed, a parent class variable, a parent class constructing method, a child class variable and the like are initialized, and accordingly creation of the carousel components and related initialization processing are completed.
Finally, step S240 is executed, if the number of the picture display controls in the unused control array is not less than the preset number, the preset number of the picture display controls are taken out from the unused control array and added to the carousel image assembly, so as to perform circular picture scrolling display on the carousel image display page.
According to an embodiment of the invention, if the number of the picture display controls in the unused control array is not less than 2, 2 picture display controls are taken out from the unused control array and added into the carousel image component, so that the pictures are displayed on the carousel image display page in a circular rolling manner. The carousel view component Banner View is a component capable of circularly displaying pictures, and mainly sends messages at regular time through a message notification mode to notify a picture display control to carry out picture rolling display, so that values taken from unused control arrays are directly assigned to objects corresponding to 2 picture display controls in the carousel view component actually. And 1 picture display control in the 2 picture display controls is used for displaying the currently displayed picture, and the other 1 picture display control is used for displaying the next picture to be displayed in a rolling way, so that the corresponding picture can be displayed through the picture display control in the carousel display.
According to an embodiment of the invention, the method 200 further comprises: and if the number of the picture display controls in the unused control array is smaller than the preset number, subtracting the number of the picture display controls in the unused control array from the preset number to obtain a number difference value, and creating a number difference value picture display control to be placed in the unused control array.
In this embodiment, if the number of the picture display controls in the unused control array is less than 2, for example, the number of the picture display controls in the unused control array is 1, calculating 2-1 to obtain a number difference value of 1, and creating 1 picture display control and placing the picture display control into the unused control array.
When a user views the carousel map display page, various possible operations of the user can have corresponding influences on the state of the carousel map component. For example, when a user normally views the carousel map display page, the carousel map component is in a display state at this time, the user operates the current application to return to the background, lock the screen, open a new page to cover the original carousel map display page, and the like, so that the carousel map component is in a hidden state, and when the current carousel map display page is returned and the system recovers the page, the carousel map component is in a destroyed state. For different states of the carousel map component, the current state of the carousel map component can be reflected by setting a corresponding value for the use state.
In view of the above, according to yet another embodiment of the present invention, the method 200 further comprises: and acquiring the use state of the carousel image assembly, judging whether a new carousel image assembly needs to be created, if so, creating the new carousel image assembly, and initializing the use state of the new carousel image assembly. Thereafter, the picture presentation can continue through the new carousel picture component.
According to yet another embodiment of the invention, the method 200 further comprises: if the use state meets the first preset condition, determining that the carousel graph assembly is in a destruction state, removing all the in-use picture display controls from the carousel graph assembly, and synchronously removing all the removed in-use picture display controls from the used control array.
In this embodiment, the first preset condition is that the value of the usage status is 2, that is, bannerViewState =2, indicating that the carousel component is in the destruction state, at this time, the 2 picture display controls in use are removed from the carousel component, and the 2 picture display controls are removed from the used control array synchronously.
According to yet another embodiment of the invention, the method 200 further comprises: and if the using state meets a second preset condition, determining that the carousel image assembly is in a hidden state, releasing the non-displayed picture display control from the carousel image assembly, synchronously removing the released non-displayed picture display control from the used control array, and putting the released non-displayed picture display control into the unused control array.
In this embodiment, the second preset condition is that the value of the usage state is 1, that is, banner viewstate =1, indicating that the carousel component is in a hidden state, the non-illustrated 1 picture display control is released from the carousel component, and the picture display control is synchronously removed from the used control array and placed into the unused control array.
According to yet another embodiment of the invention, the method 200 further comprises: and if the use state meets a third preset condition, determining that the carousel image assembly is in the display state, acquiring the use state of the carousel image assembly again, and judging whether a new carousel image assembly needs to be created.
In this embodiment, the third preset condition is that the value of the use state is 0, i.e., bannerViewState =0, indicating that the carousel component is in the display state. It should be noted that, when determining whether the usage status satisfies the first preset condition, the second preset condition, and the third preset condition, it may be directly determined which preset condition the usage status satisfies by the value of the usage status, or it may be determined whether the usage status satisfies the first preset condition, and when the usage status satisfies the first preset condition, corresponding processing is executed, and when the usage status does not satisfy the first preset condition, it is determined whether the usage status satisfies the second preset condition. When the using state meets the second preset condition, corresponding operation is carried out, and when the using state also does not meet the second preset condition, the using state can be directly determined to meet the third preset condition, and at the moment, corresponding processing is executed.
Fig. 3 shows a schematic diagram of a picture display module 300 according to an embodiment of the invention. The picture display module 300 resides in a mobile terminal (e.g., the aforementioned mobile terminal 100). The picture display module 300 circularly scrolls and displays pictures by performing the picture display method 200 of the present invention.
As shown in fig. 3, the picture display module 300 includes a page display unit 310, a first creation unit 320, a picture display unit 340, and a second creation unit 330 respectively connected to the page display unit 310 and the picture display unit 340.
The page display unit 310 may display the carousel presentation page in response to a switch operation to the carousel presentation page. The first creating unit 320 may create an instance corresponding to the carousel map instance management class, and initialize an unused control array based on the instance, where the unused control array is used to store an unused picture display control. The second creating unit 330 may create a carousel map component, and initialize a use state of the carousel map component. The picture display unit 340 may take out a preset number of picture display controls from the unused control array and add the picture display controls to the carousel map component when the number of the picture display controls in the unused control array is not less than the preset number, so as to perform circular picture scrolling display on the carousel map display page.
It should be noted that the page display unit 310 is configured to execute the aforementioned step S210, the first creation unit 320 is configured to execute the aforementioned step S220, the second creation unit 330 is configured to execute the aforementioned step S230, and the picture display unit 340 is configured to execute the aforementioned step S240. Here, for the execution logic of the page display unit 310, the first creating unit 320, the second creating unit 330, and the picture display unit 340, reference may be made to the detailed description of steps S210 to S240 in the method 200, and details are not repeated here.
According to the picture display scheme provided by the embodiment of the invention, in a carousel picture display page, an example corresponding to a carousel picture list management class is created, an unused control array is initialized based on the example, a carousel picture assembly is created, and when the number of picture display controls in the unused control array is not less than a preset number, a preset number of picture display controls are taken out from the unused control array and added to the carousel picture assembly so as to display pictures in a circulating rolling manner.
In the technical scheme, the picture display controls associated with the carousel map component are managed in a single-case mode, the picture display controls used in global management are applied, the number of the picture display controls needing to be created is controlled by using the preset number, and consumption on a memory is reduced. Moreover, by using the carousel image list management class, the problems that the memory cannot be timely recycled, the memory redundancy and the like caused by frequently creating and destroying the image display control can be avoided, and the stability of application operation is improved. In addition, the carousel graph single instance management class runs in the whole application life cycle and is used at any time, so that the display efficiency of the carousel graph component can be improved, and the development process of the carousel graph component is simplified.
The various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as removable hard drives, U.S. disks, floppy disks, CD-ROMs, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
In the case of program code execution on programmable computers, the mobile terminal generally includes a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to execute the picture display method of the present invention according to instructions in the program code stored in the memory.
By way of example, and not limitation, readable media may comprise readable storage media and communication media. Readable storage media store information such as computer readable instructions, data structures, program modules or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of readable media.
In the description provided herein, algorithms and displays are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with examples of this invention. The required structure for constructing such a system is apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in a device as described in this embodiment, or alternatively may be located in one or more devices different from the device in this example. The modules in the foregoing examples may be combined into one module or may be further divided into multiple sub-modules.
Those skilled in the art will appreciate that the modules in the devices in an embodiment may be adaptively changed and arranged in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
Furthermore, some of the described embodiments are described herein as a method or combination of method elements that can be performed by a processor of a computer system or by other means of performing the described functions. A processor having the necessary instructions for carrying out the method or method elements thus forms a means for carrying out the method or method elements. Further, the elements of the apparatus embodiments described herein are examples of the following apparatus: the means for performing the functions performed by the elements for the purpose of carrying out the invention.
As used herein, unless otherwise specified the use of the ordinal adjectives "first", "second", "third", etc., to describe a common object, merely indicate that different instances of like objects are being referred to, and are not intended to imply that the objects so described must be in a given sequence, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this description, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. The present invention has been disclosed in an illustrative rather than a restrictive sense, and the scope of the present invention is defined by the appended claims.

Claims (10)

1. A picture display method includes:
responding to the operation of switching to the carousel graph display page, and displaying the carousel graph display page;
creating an example corresponding to the carousel image list management class, and initializing an unused control array based on the example, wherein the unused control array is used for storing an unused picture display control;
creating a carousel graph component, and initializing the use state of the carousel graph component;
and if the number of the picture display controls in the unused control array is not less than the preset number, taking the preset number of the picture display controls from the unused control array and adding the picture display controls into the carousel image assembly so as to perform picture circular rolling display on the carousel image display page.
2. The method of claim 1, wherein the initializing an unused control array based on the instance comprises:
based on the example, creating an unused control array, and initializing the length of the unused control array to be a numerical value corresponding to a preset number;
and creating a preset number of picture display controls and putting the picture display controls into the unused control array.
3. The method of claim 1 or 2, further comprising:
if the number of the picture display controls in the unused control array is smaller than the preset number, calculating the number of the picture display controls in the unused control array subtracted from the preset number to obtain a number difference value;
and creating a number of picture display controls with different numbers and putting the picture display controls into the unused control array.
4. The method of any of claims 1-3, further comprising:
initializing a used control array based on the instance, the used control array for storing used picture display controls.
5. The method of claim 4, further comprising:
if the using state meets a first preset condition, determining that the carousel map assembly is in a destroying state;
and removing all in-use picture display controls from the carousel map component, and synchronously removing all in-use picture display controls to be removed from the used control array.
6. The method of claim 4 or 5, further comprising:
if the using state meets a second preset condition, determining that the carousel image assembly is in a hidden state;
and releasing the picture display control which is not displayed from the carousel picture assembly, synchronously removing the released picture display control which is not displayed from the used control array, and putting the picture display control which is not displayed into the unused control array.
7. The method as optionally recited in claims 1-6, further comprising:
acquiring the use state of the carousel image assembly, and judging whether a new carousel image assembly needs to be created or not;
and if so, creating a new carousel graph component and initializing the use state of the new carousel graph component.
8. A picture display module comprising:
the page display unit is suitable for responding to the operation of switching to the carousel image display page and displaying the carousel image display page;
the first creating unit is suitable for creating an example corresponding to the carousel image list management class and initializing an unused control array based on the example, wherein the unused control array is used for storing an unused picture display control;
the second creating unit is suitable for creating a carousel graph component and initializing the use state of the carousel graph component;
and the picture display unit is suitable for taking out a preset number of picture display controls from the unused control array and adding the picture display controls into the carousel picture assembly when the number of the picture display controls in the unused control array is not less than the preset number so as to perform picture circular rolling display on the carousel picture display page.
9. A mobile terminal, comprising:
at least one processor; and
a memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, the program instructions comprising instructions for performing the method of any of claims 1-7.
10. A readable storage medium storing program instructions that, when read and executed by a mobile terminal, cause the mobile terminal to perform the method of any one of claims 1-7.
CN202210821119.XA 2022-07-12 2022-07-12 Picture display method, module, mobile terminal and storage medium Pending CN115269077A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210821119.XA CN115269077A (en) 2022-07-12 2022-07-12 Picture display method, module, mobile terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210821119.XA CN115269077A (en) 2022-07-12 2022-07-12 Picture display method, module, mobile terminal and storage medium

Publications (1)

Publication Number Publication Date
CN115269077A true CN115269077A (en) 2022-11-01

Family

ID=83764860

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210821119.XA Pending CN115269077A (en) 2022-07-12 2022-07-12 Picture display method, module, mobile terminal and storage medium

Country Status (1)

Country Link
CN (1) CN115269077A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116185323A (en) * 2023-02-17 2023-05-30 广州市保伦电子有限公司 Infinite circulation scrolling display method, device, storage medium and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116185323A (en) * 2023-02-17 2023-05-30 广州市保伦电子有限公司 Infinite circulation scrolling display method, device, storage medium and system
CN116185323B (en) * 2023-02-17 2024-03-08 广东保伦电子股份有限公司 Infinite circulation scrolling display method, device, storage medium and system

Similar Documents

Publication Publication Date Title
CN107463627B (en) Picture loading method and terminal
US9448694B2 (en) Graphical user interface for navigating applications
US10599336B2 (en) Method of displaying content and electronic device adapted to the same
CN108463799B (en) Flexible display of electronic device and operation method thereof
CN110704184B (en) Application memory optimization method and device and mobile terminal
CN104035706A (en) Display method and electronic device
CN107153546B (en) Video playing method and mobile device
US20150067398A1 (en) Method, apparatus, and recording medium for interworking with external terminal
CN111931093A (en) Display method of table in page and mobile terminal
CN115730092A (en) Method, apparatus, device and storage medium for content presentation
CN115269077A (en) Picture display method, module, mobile terminal and storage medium
CN111142997A (en) Application display method, vehicle machine and computer storage medium
CN111679875A (en) Page content display method and system and mobile terminal
CN110765398A (en) Page content display method and mobile terminal
CN111949264A (en) Page element positioning method and mobile terminal
CN112416466B (en) Application program loading method, mobile terminal and readable storage medium
CN111273841B (en) Page processing method and mobile terminal
CN112540716A (en) Method and device for passing through intelligent cabin application program among multiple screens and electronic equipment
US9753933B2 (en) Electronic device and method for mounting file system using virtual block device
EP3043252A1 (en) Method and electronic device for displaying electronic document
CN108132803B (en) Timing keep-alive and awakening method, system, terminal and medium based on mobile terminal
CN110516187A (en) A kind of page processing method, mobile terminal, readable storage medium storing program for executing
CN115767706A (en) Time calibration method and device, mobile terminal and storage medium
CN114510307A (en) Dynamic wallpaper implementation method, computing device and storage medium
CN112463006A (en) Page sliding control method and mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination