WO2016131207A1 - Control method, control apparatus and electronic device - Google Patents

Control method, control apparatus and electronic device Download PDF

Info

Publication number
WO2016131207A1
WO2016131207A1 PCT/CN2015/075225 CN2015075225W WO2016131207A1 WO 2016131207 A1 WO2016131207 A1 WO 2016131207A1 CN 2015075225 W CN2015075225 W CN 2015075225W WO 2016131207 A1 WO2016131207 A1 WO 2016131207A1
Authority
WO
WIPO (PCT)
Prior art keywords
control
display
data
display data
display interface
Prior art date
Application number
PCT/CN2015/075225
Other languages
French (fr)
Chinese (zh)
Inventor
张
Original Assignee
锤子软件(北京)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 锤子软件(北京)有限公司 filed Critical 锤子软件(北京)有限公司
Publication of WO2016131207A1 publication Critical patent/WO2016131207A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range

Definitions

  • the present invention relates to the field of human-computer interaction, and in particular, to a control method, a control device, and an electronic device.
  • an electronic coupon application can be installed on most electronic devices, so that the user can conveniently make notes or reminders.
  • the data in the electronic note is carried by the control, and one electronic note contains multiple separable contents.
  • a plurality of controls are required to respectively carry the plurality of separable contents, and each time a new content is added, a new control needs to be created to carry the newly added content.
  • different controls need to be used to carry, so there is a technical problem of wasted control resources.
  • the invention provides a control method, a control device and an electronic device to solve the technical problem of waste of control resources in the prior art.
  • the present invention provides a control method, where the method is applied to an electronic device, and a display interface of an electronic note application is displayed on a display unit of the electronic device, where the display interface is
  • the display data is carried by one or more controls, and the control has a corresponding relationship with the data carried by the control, the one or more controls include a first control, and the method includes:
  • the first control When it is determined that the data carried by the first control is no longer displayed on the display interface, the first control is released, and the correspondence between the first control and the data carried by the first control is released, and The first control is removed from the display interface, and the memory of the first control is reclaimed.
  • the recovering and storing the memory of the first control includes:
  • the operation of reclaiming the memory of the first control is performed at an interval preset time.
  • the method further includes:
  • the first control When it is determined that there is new data to be displayed on the display interface after the first control is released, before the preset time is reached, the first control is used to carry the new data, and the first data is saved. The correspondence between the control and the new data.
  • the display data of the display interface includes first display data and second display data, and the method further includes:
  • determining that the display data of the display interface changes comprises:
  • the moving the first display data corresponding to the moving operation from the first location to the second location of the display interface according to the moving operation comprises:
  • the second display data displayed by the display interface is divided into M movable units, wherein data corresponding to each movable unit is separately carried by one control, and M is a positive integer;
  • the second control After the second control is moved, the second control is released, and the correspondence between the second control and the first display data carried by the second control is released, and the second control is The display interface is removed, and the memory of the second control is reclaimed;
  • the first display data is carried by using a third control such that the first display data is displayed on the display interface.
  • the method further includes:
  • the displaying, by the third control, the first display data, so that the displaying the first display data on the display interface comprises:
  • the method further includes:
  • Release a fourth control cancel the correspondence between the fourth control and the first display data, remove the fourth control from the display interface, and recycle the memory of the fourth control; Before the moving operation of the first display data for the display interface is detected, the first display data is carried by the fourth control;
  • the displaying, by the third control, the first display data, so that the displaying the first display data on the display interface comprises:
  • Creating a third control using the third control to carry the first display data, and saving a correspondence between the third control and the first display data, so that the first display data is displayed on the display interface on.
  • the method further includes:
  • the plurality of controls carrying the text data of the display interface are merged.
  • the dividing the second display data displayed by the display interface into the M movable units comprises:
  • the first display data is picture data, segmenting the second display data in units of rows, thereby dividing the second display data into the M movable units;
  • the second display data is divided into units of words, and the second display data is further divided into the M movable units.
  • the method further includes:
  • the method further includes:
  • the first display data is enlarged from the second size to the first size.
  • the present invention also discloses a control device, which is applied to an electronic device, wherein a display interface of an electronic note application is displayed on a display unit of the electronic device, and display data on the display interface
  • the device is controlled by one or more controls, and the control has a corresponding relationship with the data carried by the control, the one or more controls include a first control, and the device includes:
  • a determining module configured to determine whether display data of the display interface changes
  • a determining module configured to determine whether data carried by the first control is displayed in the display interface when determining that the display data of the display interface changes;
  • a first release module configured to release the first control and release data carried by the first control and the first control when determining that data carried by the first control is no longer displayed on the display interface Corresponding relationship between the first control is removed from the display interface, and the memory of the first control is reclaimed.
  • the first release module is specifically configured to:
  • the operation of reclaiming the memory of the first control is performed at an interval preset time.
  • the device further includes:
  • a multiplexing module configured to use the first control to carry the new data when it is determined that there is new data to be displayed on the display interface after the first control is released and before the preset time of the interval is reached And storing a correspondence between the first control and the new data.
  • the device further includes:
  • a detecting module configured to detect a moving operation of the first display data for the display interface, where the display data of the display interface includes first display data and second display data;
  • a moving module configured to: when the moving operation of the first display data for the display interface is detected, move the first display data corresponding to the moving operation from the first position of the display interface to the first Two positions
  • the determining module is specifically configured to:
  • the mobile module includes:
  • a first creating sub-module configured to create a second control, and use the second control to carry first display data corresponding to the moving operation
  • a dividing sub-module configured to divide the second display data displayed by the display interface into M movable units, wherein data corresponding to each movable unit is separately carried by a control, and M is a positive integer;
  • control submodule configured to control the second control to move between the M movable units
  • a releasing submodule configured to release the second control after the second control moves, and release a correspondence between the second control and the first display data carried by the second control, The second control is removed from the display interface, and the memory of the second control is reclaimed;
  • a carrying submodule configured to carry the first display data by using a third control, so that the first display data is displayed on the display interface.
  • the device further includes:
  • a hiding submodule configured to set a display property of the third control to be hidden from being displayed before the second control is created, wherein the first is before the moving operation of the first display data for the display interface is detected Display data is carried by the third control;
  • the carrier submodule is specifically configured to:
  • the device further includes:
  • a second release module configured to: before the second control is created, release the fourth control, release the correspondence between the fourth control and the first display data, and use the fourth control from the display interface Removing, reclaiming memory of the fourth control; wherein, before detecting a moving operation of the first display data for the display interface, the first display data is carried by the fourth control;
  • the carrier submodule is specifically configured to:
  • Creating a third control using the third control to carry the first display data, and saving a correspondence between the third control and the first display data, so that the first display data is displayed on the display interface on.
  • the device further includes:
  • a merging module configured to merge the plurality of controls that carry the text data of the display interface after the second control moves.
  • the segmentation submodule includes:
  • a first segmentation submodule configured to divide the second display data into units of behavior when the first display data is picture data, and further divide the second display data into the M movable units ;and / or
  • a second segmentation sub-module configured to divide the second display data into words in units of words when the first display data is text data, and further divide the second display data into the M movable units .
  • the device further includes:
  • a reduction module configured to reduce the first display data from a first size to a second size before creating the second control
  • an amplification module configured to enlarge the first display data from the second size to the first size after the second control moves.
  • the present invention further discloses an electronic device, wherein a display interface of an electronic note application is displayed on a display unit of the electronic device, and display data on the display interface is carried by one or more controls,
  • the control device has a corresponding relationship with the data carried by the control, the one or more controls include a first control, and the electronic device further includes:
  • a determining unit configured to determine whether display data of the display interface changes
  • a determining unit configured to determine, when the display data of the display interface changes, whether data carried by the first control is displayed in the display interface
  • a first release unit configured to release the first control and release data carried by the first control and the first control when determining that data carried by the first control is no longer displayed on the display interface Corresponding relationship between the first control is removed from the display interface, and the memory of the first control is reclaimed.
  • a control method is provided, which is applied to an electronic device, wherein a display interface of the electronic note application is displayed on the display unit of the electronic device, and the data displayed on the display interface is controlled by one or more controls.
  • the first control is configured to determine the first control device when the display data of the display interface changes. Whether the data to be carried is displayed in the display interface; when it is determined that the data carried by the first control is no longer displayed on the display interface, releasing the first control, releasing the first control and the first Corresponding relationship between data carried by the control, the first control is removed from the display interface, and the memory of the first control is reclaimed.
  • the data of the electronic note can be displayed by multiplexing the limited control, and the technical effect of saving the control resource is achieved.
  • FIG. 2 is a flowchart of controlling movement of first display data in a control method according to an embodiment of the present invention
  • FIG. 3 is a flowchart of moving a first display data from a first position to a second position of a display interface in a control method according to an embodiment of the present invention
  • FIG. 4 is a structural diagram of a control device according to an embodiment of the present invention.
  • FIG. 5 is a structural diagram of an electronic device according to an embodiment of the present invention.
  • the invention provides a control method, a control device and an electronic device to solve the technical problem of waste of control resources in the prior art.
  • a control method is provided, which is applied to an electronic device, wherein a display interface of an electronic note application is displayed on a display unit of the electronic device, and data displayed on the display interface is carried by one or more controls, and the control and the Corresponding relationship between the data carried by the control, the one or more controls include a first control, the method includes: determining whether the display data of the display interface changes; when determining that the display data of the display interface changes, Determining whether the data carried by the first control is displayed in the display interface; when it is determined that the data carried by the first control is no longer displayed on the display interface, releasing the first control, releasing the Corresponding relationship between the first control and the data carried by the first control, the first control is removed from the display interface, and the memory of the first control is reclaimed.
  • the embodiment of the invention can also realize the display of the data of the electronic note by the multiplexing of the limited control, and achieve the technical effect of saving the control resource.
  • an embodiment of the present invention provides a control method, which is applied to an electronic device, where a display interface of an electronic note application is displayed on a display unit of the electronic device, and data displayed on the display interface is carried by one or more controls.
  • the control has a corresponding relationship with the data carried by the control, and the one or more controls include a first control. Referring to FIG. 1, the method includes:
  • the electronic device determines whether display data of the display interface changes.
  • the electronic device determines whether data carried by the first control is displayed in the display interface.
  • the electronic device is, for example, a mobile phone, a tablet computer, a notebook computer, or the like.
  • each picture may be carried by one control, and each part of the text data (that is, the text immediately adjacent to the image not separated by the picture) is also carried by a control.
  • one or more controls can carry data in the display interface; of course, each image can be carried by one control, and each fixed line of text (for example: 3 lines, 5 lines, etc.) is carried by one control.
  • the embodiment of the present invention is not listed in detail, and is not limited, as to how to carry data of the display interface of the electronic signature application through one or more controls. It should be noted that each control has a correspondence with data carried by the control, and the one or more controls include at least a first control.
  • the electronic device first determines whether display data of the display interface changes.
  • the display content of the display interface may be changed based on various trigger conditions, for example, the user of the electronic device deletes part of the data of the display interface, the user of the electronic device moves the data of the display interface, and the like.
  • the invention is not limited thereto.
  • the display data of the display interface includes first display data and second display data
  • the method further includes: when detecting a movement operation of the first display data for the display interface, And moving the first display data corresponding to the moving operation from the first position of the display interface to the second position according to the moving operation.
  • determining the change of the display data of the display interface includes: when the moving operation of the first display data of the display interface is detected, and the first display data corresponding to the moving operation is used according to the moving operation When the first position of the display interface is moved to the second position, it is determined that the display data of the display interface changes.
  • the control that carries the display data of the display interface of the electronic device may be one or more controls, and the one or more controls include at least the first control, and may of course include The second control, the third control, and the fourth control, when performing the determining operation, may first select the first control to perform the determination, and if it is determined that the data carried by the first control is no longer displayed on the display interface, execute S103. If the control that carries the display data further includes a second control, a third control, a fourth control, and the like, further determining whether the data carried by the second control is displayed in the display interface, and if determining the second control When the carried data is no longer displayed on the display interface, the operation of releasing the second control is performed... and so on.
  • a control that carries display data of a display interface of the electronic device includes multiple controls
  • the multiple controls include a first control, a second control, and a third control.
  • the traversing of all the controls is performed, when it is determined that the data carried by the first control is no longer displayed on the display interface, the data corresponding to the data that is no longer displayed on the display interface is released.
  • the operation of the space such as releasing the first control.
  • the specific implementation manner may be very flexible, and the present invention does not limit this.
  • the first control since the data carried by the first control is no longer displayed on the display interface, the first control may be released in order to save control resources and reuse the control.
  • the releasing the first control refers to releasing the correspondence between the first control and the data carried by the first control, removing the first control in the interface, and reclaiming the memory of the first control, for example, : Remove the contents of this memory directly, or overwrite the data on this memory with new content, and so on.
  • only the data displayed on the display interface of the electronic note application is carried by the control, and if the data corresponding to the control is no longer displayed on the display interface, the corresponding control is released, and the first a correspondence between a control and data carried by the first control, removing the first control from the display interface, and reclaiming memory of the first control, thereby effectively saving control resources and a system Resources.
  • the method provided by the invention not only saves the control resources and system resources, but also effectively improves The operating efficiency of the system.
  • the method for reclaiming the memory of the first control may be to immediately reclaim the memory for storing the first control, or may delay or periodically reclaim the storage.
  • the memory of a control includes: performing an operation of reclaiming and storing the memory of the first control at a preset time after releasing the first control.
  • the memory can be reclaimed for a certain period of time.
  • the preset time of the interval may be set in advance by the system or the user, and is not limited herein.
  • the memory for storing the first control is reclaimed by delaying for 1 minute, 2 minutes, or 3 minutes.
  • the first control when it is determined that there is new data to be displayed on the display interface after the first control is released, before the preset time of the interval is reached, the first control is used to carry the new data, and the saver is saved. Corresponding relationship between the first control and the new data.
  • the preset time of the interval is 1 minute, and when the calculation has not yet reached 1 minute from the time when the first control is released, there is new data that needs or is to be displayed.
  • the memory for storing the first control may not be temporarily reclaimed, but the first control is used to carry the newly added data, and the first control and the new data are saved.
  • the control can also be used to carry new data due to delaying the memory of the storage control, thereby achieving the technical effect of the control multiplexing. Therefore, the embodiment of the present invention can realize the display of the data of the electronic note by the multiplexing of the limited control, and achieve the technical effect of saving the control resource.
  • the existing control is used to carry the newly added data, there is no need to create a new control to carry the newly added data, thereby effectively improving the operating efficiency of the system.
  • the method further includes:
  • S203b The first data is not moved when the operation is not a preset movement operation.
  • the data displayed by the display interface of the electronic device includes first display data and second display data.
  • the first display data is, for example, image data, text data, and the like.
  • the operations for the first display data are, for example, a click operation, a drag operation, a gesture operation, and the like.
  • different predetermined conditions may be set according to actual requirements, and the preset moving operations are, for example, an operation of first selecting and then dragging, an operation being a predetermined gesture, and the like, which are not enumerated in detail in the embodiments of the present invention.
  • the selection operation for the first display data is different based on the difference of the first display data.
  • the selection operation is, for example, a long press operation, a quick double click operation, and the like;
  • the selection operation is, for example, a sliding operation, wherein the text on the sliding track is the selected text data, and the selection operation is, for example, pressing and holding the left mouse button to drag and then release the cursor.
  • the text corresponding to the position moved to is the selected text data and so on.
  • the first position is the position of the selected first display data, and the second position may be the end of the drag operation. a point position; if the detected preset movement operation is an operation of generating a preset gesture, the first position is a position corresponding to a starting point of the preset gesture, and the second position is according to an operation trajectory and The distance is determined, for example, if the first operation is a top-down gesture, the second position is below the first position, and if the first operation is a left-to-right operation, the second position is at the first position.
  • the right side and the like, and the distance of the second position relative to the first position is proportional to the distance of the gesture operation, and the method for determining the first position and the second position is not enumerated in detail, and No restrictions.
  • the first display data corresponding to the moving operation is moved from the first position of the display interface to the second position according to the moving operation.
  • the method specifically includes:
  • S301 Create a second control, and use the second control to carry the first display data corresponding to the moving operation.
  • S302 Divide the second display data displayed by the display interface of the display unit into M movable units, wherein data of each movable unit is separately carried by one control, and M is a positive integer.
  • the first display data is carried by using a third control, so that the first display data is displayed on the display interface.
  • the first display data is controlled to enter the selected state, and a temporary control (ie, the second control) is created to carry the first data.
  • the second control is configured to carry the first display data or a copy of the first display data.
  • the copy of the first display data is data obtained by performing a copy operation on the first display data.
  • the newly created second control does not belong to the same container as other controls, and is independent of other controls.
  • Other controls are controls corresponding to the data displayed in the current display interface, such as a first control, such as a control that originally carries the first display data. Therefore, the second control can move in the display interface to achieve the effect of moving the first display data or the copy of the first display data carried by the second control.
  • the second display when the second display data is divided into M movable units, the second display may be The data is divided line by line, so that M is equal to the number of rows of the second display data; the second display data may also be divided word by word, so that M is equal to the number of words of the first text data, of course, other segmentation methods may also be used.
  • the embodiments of the invention are not enumerated in detail and are not limiting.
  • the second display data may be differently divided according to the difference of the first display data, and the two types of the splitting manners are introduced in the following description.
  • the following two situations are not limited. .
  • the first type when the first display data is specifically: picture data, the second display data displayed by the display unit is divided into a plurality of movable units, specifically:
  • the second display data is divided in units of rows, and the second display data is further divided into M movable units.
  • the second display data displayed by the display unit is divided into a plurality of movable units, specifically:
  • the second display data is divided in units of words, and the second display data is further divided into a plurality of movable units.
  • the first display data when the first display data is moved in the middle of the second display data by the operation, the first display data can be controlled to change between any two words, between any two lines, or between any two segments. .
  • the second control can be controlled to move between the plurality of movable units by the movement trajectory of the operation for the first display data.
  • the second control is controlled to move from top to bottom; if the movement trajectory for the operation of the first display data is from left to right , you can control the second control to move from left to right, and so on.
  • the third display is used to carry the first display data such that the first display data is displayed on the display interface.
  • the source of the third control there are different implementations formula.
  • the first display data is carried by the third control before detecting a moving operation of the first display data for the display interface.
  • the electronic device detects the moving operation of the first display data for the display interface, before the second control is created, the electronic device sets the display attribute of the third control that carries the first display data from the display to hide.
  • the second control is created to carry the first display data.
  • the second control is released. Thereafter, the display attribute of the third control is set to be hidden from being displayed, and the first display data is carried by the third control, so that the first display data is displayed on the display interface.
  • a temporary control ie, a second control
  • a second control is created to carry the first display data so that the first display data can be moved in the display interface.
  • the second control is released to save control and system resources, and the first display data is re-hosted by using the third control that originally carries the first display data.
  • the reuse of limited controls is achieved, saving control and system resources, and effectively improving the operating efficiency of the system.
  • the first display data is carried by the fourth control before detecting the moving operation of the first display data for the display interface.
  • the electronic device detects the moving operation of the first display data for the display interface, before the second control is created, the electronic device releases the fourth control to cancel the relationship between the fourth control and the first display data.
  • the fourth control is removed from the display interface, and the memory of the fourth control is reclaimed.
  • the second control is created to carry the first display data. After the end of the movement for the second control or the first display data, the second control is released.
  • the first display data is carried by the third control, and the corresponding relationship between the third control and the first display data is saved, so that the first display data is displayed on the On the display interface.
  • a temporary control ie, a second control
  • the second control is released to save the control and system resources, and the new control, that is, the third control, is carried to carry the first display data, thereby achieving a better Data display effect.
  • the method provided by the embodiment of the present invention may further include: after the end of the moving of the second control, merging a plurality of controls that carry the text data of the display interface.
  • the manner of merging the multiple controls of the data carrying the display interface is different according to the difference of the first display data. Two of them are introduced below. Of course, in the specific implementation process, the following two situations are not limited.
  • the first display data is image data.
  • the multiple controls that combine the data carrying the display interface are specifically: M controls corresponding to the M movable units.
  • M controls corresponding to the M movable units.
  • one of the M controls may be used to carry data corresponding to the M controls, and other controls are released, other controls are removed from the display interface, and the control is reclaimed and stored. Memory.
  • the first display data is text data.
  • the multiple controls that merge the data that carries the display interface are specifically: merge the M controls corresponding to the M movable units and carry the first display. The control of the data.
  • the first display data is text data
  • adjacent text data is carried by the same control, that is, the first display data may also be used with part of the text data in the second display data.
  • the same control is carried, so in this case, all the text data lines need to be sequentially adjusted and merged.
  • control resources and the system memory resources can be saved more effectively, so that the mobile device can utilize the released memory resources for other processing to improve the operation of the system. responding speed.
  • the method before the first display data is carried by the second control based on step S301, the method further includes: reducing the first display data from the first size to the second size;
  • the method further includes: magnifying the first display data from the second size to the first size.
  • the first data when the first display data is reduced from the first size to the second size, the first data may be reduced by a preset multiple, for example, the first size is 100px*200px, and the reduction factor is 10 times (of course also It can be other multiples, so that the second size is: 10px*20px; the first data can also be reduced to a predetermined size, for example, the height of the second size is twice the line spacing (of course, other predetermined sizes), assuming a single The size is 10 times the line spacing * 20 times the line spacing, then the second size is: 1 line spacing * 2 times the line spacing and so on.
  • the first data when the first display data is reduced from the first size to the second size, the first data may be reduced by a preset multiple, for example, the first size is 100px*200px, and the reduction factor is 10 times (of course also It can be other multiples, so that the second size is: 10px*20px; the first data can also be reduced to a predetermined size, for example
  • the electronic device determines that the display content changes, it may be determined whether the data carried by the first control is displayed in the display interface.
  • the first control is released, and the correspondence between the first control and the data carried by the first control is released.
  • the first control is removed from the display interface, and the memory of the first control is reclaimed.
  • the method for reclaiming and storing the memory of the first control is: performing an operation of reclaiming and storing the memory of the first control at a preset time interval after the first control is released.
  • the first control When it is determined that there is new data to be displayed on the display interface after the first control is released, before the preset time is reached, the first control is used to carry the new data, and the first data is saved.
  • the first control that has been created is used to carry the newly added data, which is very suitable for the scene of displaying data in the fast moving display interface, because in the process of rapidly moving the displayed data, it will be generated. A lot of new data and data that is no longer displayed on the display interface, so by releasing the control and reusing the first control that has been created to carry the new data, without creating a new control, effectively improving the processing of the system And response speed, to achieve fast moving data and improve the display efficiency and speed of the display interface.
  • an embodiment of the present invention further discloses a control device 400, where the control device is applied to an electronic device, and an electronic note application is displayed on a display unit of the electronic device.
  • a display interface the display data on the display interface is carried by one or more controls, and the control has a corresponding relationship with data carried by the control, the one or more controls including a first control
  • Apparatus 400 includes:
  • a determining module 401 configured to determine whether display data of the display interface changes
  • the determining module 402 is configured to determine, when the display data of the display interface changes, whether the data carried by the first control is displayed in the display interface;
  • the first release module 403 is configured to: when it is determined that the data carried by the first control is no longer displayed on the display interface, release the first control, and release the first control and the first control Corresponding relationship between the data, the first control is removed from the display interface, and the memory of the first control is reclaimed.
  • the first release module is specifically configured to:
  • the operation of reclaiming the memory of the first control is performed at an interval preset time.
  • the device further includes:
  • a multiplexing module configured to use the first control to carry the new data when it is determined that there is new data to be displayed on the display interface after the first control is released and before the preset time of the interval is reached And storing a correspondence between the first control and the new data.
  • the device further includes:
  • a detecting module configured to detect a moving operation of the first display data for the display interface, where the display data of the display interface includes first display data and second display data;
  • a moving module configured to: when the moving operation of the first display data for the display interface is detected, move the first display data corresponding to the moving operation from the first position of the display interface to the first Two positions
  • the determining module is specifically configured to:
  • the mobile module includes:
  • a first creating sub-module configured to create a second control, and use the second control to carry first display data corresponding to the moving operation
  • a dividing sub-module configured to divide the second display data displayed by the display interface into M movable units, wherein data corresponding to each movable unit is separately carried by a control, and M is a positive integer;
  • control submodule configured to control the second control to move between the M movable units
  • a releasing submodule configured to release the second control after the second control moves, and release a correspondence between the second control and the first display data carried by the second control, The second control is removed from the display interface, and the memory of the second control is reclaimed;
  • a carrying submodule configured to carry the first display data by using a third control, so that the first display data is displayed on the display interface.
  • the device further includes:
  • a hiding submodule configured to set a display property of the third control to be hidden from being displayed before the second control is created, wherein the first is before the moving operation of the first display data for the display interface is detected Display data is carried by the third control;
  • the carrier submodule is specifically configured to:
  • the device further includes:
  • a second release module configured to: before the second control is created, release the fourth control, release the correspondence between the fourth control and the first display data, and use the fourth control from the display interface Removing, reclaiming memory of the fourth control; wherein, before detecting a moving operation of the first display data for the display interface, the first display data is carried by the fourth control;
  • the carrier submodule is specifically configured to:
  • Creating a third control using the third control to carry the first display data, and saving a correspondence between the third control and the first display data, so that the first display data is displayed on the display interface on.
  • the device further includes:
  • a merging module configured to merge the plurality of controls that carry the text data of the display interface after the second control moves.
  • the segmentation submodule includes:
  • a first segmentation submodule configured to divide the second display data into units of behavior when the first display data is picture data, and further divide the second display data into the M movable units ;and / or
  • a second segmentation sub-module configured to divide the second display data into words in units of words when the first display data is text data, and further divide the second display data into the M movable units .
  • the device further includes:
  • a reduction module configured to reduce the first display data from a first size to a second size before creating the second control
  • an amplification module configured to enlarge the first display data from the second size to the first size after the second control moves.
  • an embodiment of the present invention further discloses an electronic device 500.
  • the display unit of the electronic device displays a display interface of an electronic note application, and the display interface
  • the display data is carried by one or more controls, and the control has a corresponding relationship with the data carried by the control.
  • the one or more controls include a first control, and the electronic device 500 further includes:
  • a determining unit 501 configured to determine whether display data of the display interface changes
  • the determining unit 502 is configured to determine, when the display data of the display interface changes, whether the data carried by the first control is displayed in the display interface;
  • the first release unit 503 is configured to: when it is determined that the data carried by the first control is no longer displayed on the display interface, release the first control, and release the first control and the first control Corresponding relationship between the data, the first control is removed from the display interface, and the memory of the first control is reclaimed.
  • the first release unit is specifically configured to:
  • the operation of reclaiming the memory of the first control is performed at an interval preset time.
  • the electronic device further includes:
  • a multiplexing unit configured to use the first control to carry the new data when it is determined that there is new data to be displayed on the display interface after the first control is released and before the preset time of the interval is reached And storing a correspondence between the first control and the new data.
  • the electronic device further includes:
  • a detecting unit configured to detect a moving operation of the first display data for the display interface, where the display data of the display interface includes first display data and second display data;
  • a moving unit configured to: when the moving operation of the first display data for the display interface is detected, move the first display data corresponding to the moving operation from the first position of the display interface to the first Two positions
  • the determining unit is specifically configured to:
  • the mobile unit includes:
  • a first creating subunit configured to create a second control, and use the second control to carry first display data corresponding to the moving operation
  • a dividing subunit configured to divide the second display data displayed by the display interface into M movable units, wherein data corresponding to each movable unit is separately carried by a control, and M is a positive integer;
  • control subunit configured to control the second control to move between the M movable units
  • a releasing subunit configured to release the second control after the end of the moving of the second control, and release a correspondence between the second control and the first display data carried by the second control, The second control is removed from the display interface, and the memory of the second control is reclaimed;
  • a carrying subunit configured to carry the first display data by using a third control, so that the first display data is displayed on the display interface.
  • the electronic device further includes:
  • a hidden subunit configured to set a display attribute of the third control to be hidden from being displayed by the display before the second control is created, wherein the first before the moving operation of the first display data for the display interface is detected Display data is carried by the third control;
  • the carrier subunit is specifically configured to:
  • the electronic device further includes:
  • a second release unit configured to release the fourth control, release the correspondence between the fourth control and the first display data, and the fourth control from the display interface, before creating the second control Removing, reclaiming memory of the fourth control; wherein, before detecting a moving operation of the first display data for the display interface, the first display data is carried by the fourth control;
  • the carrier subunit is specifically configured to:
  • Creating a third control using the third control to carry the first display data, and saving a correspondence between the third control and the first display data, so that the first display data is displayed on the display interface on.
  • the electronic device further includes:
  • a merging unit configured to merge the plurality of controls that carry the text data of the display interface after the second control moves.
  • the segmentation subunit includes:
  • a first dividing subunit configured to divide the second display data into units of behavior when the first display data is picture data, and further divide the second display data into the M movable units ;and / or
  • a second dividing subunit configured to divide the second display data into words in units of words when the first display data is text data, and further divide the second display data into the M movable units .
  • the electronic device further includes:
  • a reduction unit configured to reduce the first display data from a first size to a second size before creating the second control
  • an amplifying unit configured to enlarge the first display data from the second size to the first size after the second control moves end
  • a control method is provided, which is applied to an electronic device, wherein a display interface of the electronic note application is displayed on the display unit of the electronic device, and the data displayed on the display interface is controlled by one or more controls.
  • the first control is configured to determine the first control device when the display data of the display interface changes. Whether the data to be carried is displayed in the display interface; when it is determined that the data carried by the first control is no longer displayed on the display interface, releasing the first control, releasing the first control and the first Corresponding relationship between data carried by the control, the first control is removed from the display interface, and the memory of the first control is reclaimed.
  • the data of the electronic note can be displayed by multiplexing the limited control, and the technical effect of saving the control resource is achieved.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Control Of Indicators Other Than Cathode Ray Tubes (AREA)

Abstract

A control method, a control apparatus and an electronic device; a display interface of an electronic note application program is displayed on the display unit of the electronic device; the display data of the display interface is carried by one or more controls , the control has a corresponding relationship with the data carried by the control, and the one or more controls comprise a first control; the method comprises: determining whether the display data of the display interface is changed or not; when determined the display data of the display interface being changed, determining whether the data carried by the first control is displayed on the display interface or not; when determined the data carried by the first control being no longer displayed in the display interface, releasing the first control, eliminating the corresponding relationship between the first control and the data carried by the first control, removing the first control from the display interface, and collecting the memory storing the first control; the control resources and system resources are saved effectively.

Description

一种控制方法、控制装置及电子设备Control method, control device and electronic device
本申请要求于2015年2月16日提交中国专利局、申请号为201510084989.3、发明名称为“一种控制方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 201510084989.3, entitled "A Control Method and Electronic Apparatus" on February 16, 2015, the entire contents of which are incorporated herein by reference. .
技术领域Technical field
本发明涉及人机交互领域,尤其涉及一种控制方法、控制装置及电子设备。The present invention relates to the field of human-computer interaction, and in particular, to a control method, a control device, and an electronic device.
背景技术Background technique
随着科学技术的不断发展,电子技术也得到了飞速的发展,电子产品的种类也越来越多,人们也享受到了科技发展带来的各种便利。现在人们可以通过各种类型的电子设备,享受随着科技发展带来的舒适生活。例如,智能手机、平板电脑等电子设备已经成为人们生活中一个重要的组成部分,用户可以使用手机、平板电脑等电子设备来听音乐、玩游戏等等,以减轻现代快节奏生活所带来的压力。With the continuous development of science and technology, electronic technology has also developed rapidly, and there are more and more types of electronic products. People also enjoy the convenience brought by the development of science and technology. Nowadays, people can enjoy the comfortable life brought by the development of science and technology through various types of electronic devices. For example, electronic devices such as smartphones and tablets have become an important part of people's lives. Users can use electronic devices such as mobile phones and tablets to listen to music, play games, etc., to alleviate the modern fast-paced life. pressure.
现有技术中,大部分电子设备上都可以安装电子便签应用程序,以便用户方便进行记事或者提醒,通常情况下电子便签中的数据通过控件进行承载,其中一条电子便签包含多个可分割的内容,就需要多个控件来分别承载所述多个可分割的内容,每新增一个内容时,就需要创建新的控件承载新增的内容。而针对不同的电子便签则同样需要采用不同的控件来承载,故而存在控件资源浪费的技术问题。In the prior art, an electronic coupon application can be installed on most electronic devices, so that the user can conveniently make notes or reminders. Generally, the data in the electronic note is carried by the control, and one electronic note contains multiple separable contents. A plurality of controls are required to respectively carry the plurality of separable contents, and each time a new content is added, a new control needs to be created to carry the newly added content. For different electronic notes, different controls need to be used to carry, so there is a technical problem of wasted control resources.
发明内容Summary of the invention
本发明提供一种控制方法、控制装置及电子设备,以解决现有技术中控件资源浪费的技术问题。The invention provides a control method, a control device and an electronic device to solve the technical problem of waste of control resources in the prior art.
第一方面,本发明提供一种控制方法,所述方法应用于电子设备中,所述电子设备的显示单元上显示有电子便签应用程序的显示界面,所述显示界面上 的显示数据由一个或多个控件承载,所述控件与所述控件承载的数据之间具有对应关系,所述一个或多个控件包括第一控件,所述方法包括:In a first aspect, the present invention provides a control method, where the method is applied to an electronic device, and a display interface of an electronic note application is displayed on a display unit of the electronic device, where the display interface is The display data is carried by one or more controls, and the control has a corresponding relationship with the data carried by the control, the one or more controls include a first control, and the method includes:
确定所述显示界面的显示数据是否发生变化;Determining whether the display data of the display interface changes;
在确定所述显示界面的显示数据发生变化时,判断所述第一控件所承载的数据是否显示于所述显示界面中;When it is determined that the display data of the display interface changes, determining whether data carried by the first control is displayed in the display interface;
当判断所述第一控件所承载的数据不再显示于所述显示界面时,释放所述第一控件,解除所述第一控件与所述第一控件承载的数据之间的对应关系,将所述第一控件从所述显示界面中移除,回收存储所述第一控件的内存。When it is determined that the data carried by the first control is no longer displayed on the display interface, the first control is released, and the correspondence between the first control and the data carried by the first control is released, and The first control is removed from the display interface, and the memory of the first control is reclaimed.
可选地,所述回收存储所述第一控件的内存包括:Optionally, the recovering and storing the memory of the first control includes:
在释放所述第一控件后、间隔预设时间执行回收存储所述第一控件的内存的操作。After the first control is released, the operation of reclaiming the memory of the first control is performed at an interval preset time.
可选地,所述方法还包括:Optionally, the method further includes:
当在释放所述第一控件后、间隔的所述预设时间到达之前,确定存在新数据将显示于所述显示界面时,使用所述第一控件承载所述新数据,保存所述第一控件与所述新数据的对应关系。When it is determined that there is new data to be displayed on the display interface after the first control is released, before the preset time is reached, the first control is used to carry the new data, and the first data is saved. The correspondence between the control and the new data.
可选地,所述显示界面的显示数据包括第一显示数据和第二显示数据,所述方法还包括:Optionally, the display data of the display interface includes first display data and second display data, and the method further includes:
当检测到针对所述显示界面的第一显示数据的移动操作,根据所述移动操作将所述移动操作对应的第一显示数据从所述显示界面的第一位置移动到第二位置;When detecting a movement operation of the first display data for the display interface, moving the first display data corresponding to the movement operation from the first position to the second position of the display interface according to the moving operation;
则所述确定所述显示界面的显示数据发生变化包括:Then determining that the display data of the display interface changes comprises:
当检测到所述显示界面的第一显示数据的移动操作且根据所述移动操作将所述移动操作对应的第一显示数据从所述显示界面的第一位置移动到第二位置时,确定所述显示界面的显示数据发生变化。When the moving operation of the first display data of the display interface is detected and the first display data corresponding to the moving operation is moved from the first position to the second position of the display interface according to the moving operation, determining The display data of the display interface changes.
可选地,所述根据所述移动操作将所述移动操作对应的第一显示数据从所述显示界面的第一位置移动到第二位置包括:Optionally, the moving the first display data corresponding to the moving operation from the first location to the second location of the display interface according to the moving operation comprises:
创建第二控件,利用所述第二控件承载所述移动操作对应的第一显示数据;Creating a second control, and using the second control to carry the first display data corresponding to the moving operation;
将所述显示界面显示的所述第二显示数据分割为M个可移动单元,其中,每个可移动单元对应的数据由一个控件单独承载,M为正整数; The second display data displayed by the display interface is divided into M movable units, wherein data corresponding to each movable unit is separately carried by one control, and M is a positive integer;
控制所述第二控件在所述M个可移动单元中间移动;Controlling the second control to move between the M movable units;
在所述第二控件移动结束之后,释放所述第二控件,解除所述第二控件与所述第二控件承载的第一显示数据之间的对应关系,将所述第二控件从所述显示界面中移除,回收存储所述第二控件的内存;After the second control is moved, the second control is released, and the correspondence between the second control and the first display data carried by the second control is released, and the second control is The display interface is removed, and the memory of the second control is reclaimed;
使用第三控件承载所述第一显示数据,以使得所述第一显示数据显示于所述显示界面上。The first display data is carried by using a third control such that the first display data is displayed on the display interface.
可选地,在创建第二控件之前,所述方法还包括:Optionally, before the second control is created, the method further includes:
将所述第三控件的显示属性由显示设置为隐藏;其中,在检测到针对所述显示界面的第一显示数据的移动操作之前,所述第一显示数据由所述第三控件承载;Setting the display attribute of the third control to be hidden from the display; wherein, before detecting the moving operation of the first display data for the display interface, the first display data is carried by the third control;
所述使用第三控件承载所述第一显示数据,以使得所述第一显示数据显示于所述显示界面上包括:The displaying, by the third control, the first display data, so that the displaying the first display data on the display interface comprises:
将所述第三控件的显示属性由隐藏设置为显示,使用所述第三控件承载所述第一显示数据,以使得所述第一显示数据显示于所述显示界面上。Setting the display attribute of the third control to be displayed by hiding, using the third control to carry the first display data, so that the first display data is displayed on the display interface.
可选地,在创建第二控件之前,所述方法还包括:Optionally, before the second control is created, the method further includes:
释放第四控件,解除所述第四控件与所述第一显示数据之间的对应关系,将所述第四控件从所述显示界面中移除,回收存储所述第四控件的内存;其中,在检测到针对所述显示界面的第一显示数据的移动操作之前,所述第一显示数据由所述第四控件承载;Release a fourth control, cancel the correspondence between the fourth control and the first display data, remove the fourth control from the display interface, and recycle the memory of the fourth control; Before the moving operation of the first display data for the display interface is detected, the first display data is carried by the fourth control;
所述使用第三控件承载所述第一显示数据,以使得所述第一显示数据显示于所述显示界面上包括:The displaying, by the third control, the first display data, so that the displaying the first display data on the display interface comprises:
创建第三控件,使用所述第三控件承载所述第一显示数据,保存所述第三控件与所述第一显示数据的对应关系,以使得所述第一显示数据显示于所述显示界面上。Creating a third control, using the third control to carry the first display data, and saving a correspondence between the third control and the first display data, so that the first display data is displayed on the display interface on.
可选地,所述方法还包括:Optionally, the method further includes:
在所述第二控件移动结束之后,合并承载所述显示界面的文字数据的多个控件。After the second control moves, the plurality of controls carrying the text data of the display interface are merged.
可选地,所述将所述显示界面显示的第二显示数据分割为M个可移动单元包括: Optionally, the dividing the second display data displayed by the display interface into the M movable units comprises:
当所述第一显示数据为图片数据时,将所述第二显示数据以行为单位进行分割,进而将所述第二显示数据分割为所述M个可移动单元;和/或When the first display data is picture data, segmenting the second display data in units of rows, thereby dividing the second display data into the M movable units; and/or
当所述第一显示数据为文字数据时将所述第二显示数据以字为单位进行分割,进而将所述第二显示数据分割为所述M个可移动单元。When the first display data is text data, the second display data is divided into units of words, and the second display data is further divided into the M movable units.
可选地,在创建第二控件之前,所述方法还包括:Optionally, before the second control is created, the method further includes:
将所述第一显示数据由第一尺寸缩小为第二尺寸;Reducing the first display data from a first size to a second size;
在所述第二控件移动结束之后,所述方法还包括:After the second control moves, the method further includes:
将所述第一显示数据由所述第二尺寸放大为所述第一尺寸。The first display data is enlarged from the second size to the first size.
第二方面,本发明还公开了一种控制装置,所述控制装置应用于电子设备中,所述电子设备的显示单元上显示有电子便签应用程序的显示界面,所述显示界面上的显示数据由一个或多个控件承载,所述控件与所述控件承载的数据之间具有对应关系,所述一个或多个控件包括第一控件,所述装置包括:In a second aspect, the present invention also discloses a control device, which is applied to an electronic device, wherein a display interface of an electronic note application is displayed on a display unit of the electronic device, and display data on the display interface The device is controlled by one or more controls, and the control has a corresponding relationship with the data carried by the control, the one or more controls include a first control, and the device includes:
确定模块,用于确定所述显示界面的显示数据是否发生变化;a determining module, configured to determine whether display data of the display interface changes;
判断模块,用于在确定所述显示界面的显示数据发生变化时,判断所述第一控件所承载的数据是否显示于所述显示界面中;a determining module, configured to determine whether data carried by the first control is displayed in the display interface when determining that the display data of the display interface changes;
第一释放模块,用于当判断所述第一控件所承载的数据不再显示于所述显示界面时,释放所述第一控件,解除所述第一控件与所述第一控件承载的数据之间的对应关系,将所述第一控件从所述显示界面中移除,回收存储所述第一控件的内存。a first release module, configured to release the first control and release data carried by the first control and the first control when determining that data carried by the first control is no longer displayed on the display interface Corresponding relationship between the first control is removed from the display interface, and the memory of the first control is reclaimed.
可选地,所述第一释放模块具体用于:Optionally, the first release module is specifically configured to:
在释放所述第一控件后、间隔预设时间执行回收存储所述第一控件的内存的操作。After the first control is released, the operation of reclaiming the memory of the first control is performed at an interval preset time.
可选地,所述装置还包括:Optionally, the device further includes:
复用模块,用于当在释放所述第一控件后、间隔的所述预设时间到达之前,确定存在新数据将显示于所述显示界面时,使用所述第一控件承载所述新数据,保存所述第一控件与所述新数据的对应关系。a multiplexing module, configured to use the first control to carry the new data when it is determined that there is new data to be displayed on the display interface after the first control is released and before the preset time of the interval is reached And storing a correspondence between the first control and the new data.
可选地,所述装置还包括:Optionally, the device further includes:
检测模块,用于检测针对所述显示界面的第一显示数据的移动操作;其中,所述显示界面的显示数据包括第一显示数据和第二显示数据; a detecting module, configured to detect a moving operation of the first display data for the display interface, where the display data of the display interface includes first display data and second display data;
移动模块,用于当检测到针对所述显示界面的第一显示数据的移动操作,根据所述移动操作将所述移动操作对应的第一显示数据从所述显示界面的第一位置移动到第二位置;a moving module, configured to: when the moving operation of the first display data for the display interface is detected, move the first display data corresponding to the moving operation from the first position of the display interface to the first Two positions
则所述确定模块具体用于:The determining module is specifically configured to:
当检测到所述显示界面的第一显示数据的移动操作且根据所述移动操作将所述移动操作对应的第一显示数据从所述显示界面的第一位置移动到第二位置时,确定所述显示界面的显示数据发生变化。When the moving operation of the first display data of the display interface is detected and the first display data corresponding to the moving operation is moved from the first position to the second position of the display interface according to the moving operation, determining The display data of the display interface changes.
可选地,所述移动模块包括:Optionally, the mobile module includes:
第一创建子模块,用于创建第二控件,利用所述第二控件承载所述移动操作对应的第一显示数据;a first creating sub-module, configured to create a second control, and use the second control to carry first display data corresponding to the moving operation;
分割子模块,用于将所述显示界面显示的第二显示数据分割为M个可移动单元,其中,每个可移动单元对应的数据由一个控件单独承载,M为正整数;a dividing sub-module, configured to divide the second display data displayed by the display interface into M movable units, wherein data corresponding to each movable unit is separately carried by a control, and M is a positive integer;
控制子模块,用于控制所述第二控件在所述M个可移动单元中间移动;a control submodule, configured to control the second control to move between the M movable units;
释放子模块,用于在所述第二控件移动结束之后,释放所述第二控件,解除所述第二控件与所述第二控件承载的第一显示数据之间的对应关系,将所述第二控件从所述显示界面中移除,回收存储所述第二控件的内存;a releasing submodule, configured to release the second control after the second control moves, and release a correspondence between the second control and the first display data carried by the second control, The second control is removed from the display interface, and the memory of the second control is reclaimed;
承载子模块,用于使用第三控件承载所述第一显示数据,以使得所述第一显示数据显示于所述显示界面上。And a carrying submodule, configured to carry the first display data by using a third control, so that the first display data is displayed on the display interface.
可选地,所述装置还包括:Optionally, the device further includes:
隐藏子模块,用于在创建第二控件之前,将第三控件的显示属性由显示设置为隐藏,其中,在检测到针对所述显示界面的第一显示数据的移动操作之前,所述第一显示数据由所述第三控件承载;a hiding submodule configured to set a display property of the third control to be hidden from being displayed before the second control is created, wherein the first is before the moving operation of the first display data for the display interface is detected Display data is carried by the third control;
所述承载子模块具体用于:The carrier submodule is specifically configured to:
将所述第三控件的显示属性由隐藏设置为显示,使用所述第三控件承载所述第一显示数据,以使得所述第一显示数据显示于所述显示界面上。Setting the display attribute of the third control to be displayed by hiding, using the third control to carry the first display data, so that the first display data is displayed on the display interface.
可选地,所述装置还包括:Optionally, the device further includes:
第二释放模块,用于在创建第二控件之前,释放第四控件,解除所述第四控件与所述第一显示数据之间的对应关系,将所述第四控件从所述显示界面中移除,回收存储所述第四控件的内存;其中,在检测到针对所述显示界面的第一显示数据的移动操作之前,所述第一显示数据由所述第四控件承载; a second release module, configured to: before the second control is created, release the fourth control, release the correspondence between the fourth control and the first display data, and use the fourth control from the display interface Removing, reclaiming memory of the fourth control; wherein, before detecting a moving operation of the first display data for the display interface, the first display data is carried by the fourth control;
所述承载子模块具体用于:The carrier submodule is specifically configured to:
创建第三控件,使用所述第三控件承载所述第一显示数据,保存所述第三控件与所述第一显示数据的对应关系,以使得所述第一显示数据显示于所述显示界面上。Creating a third control, using the third control to carry the first display data, and saving a correspondence between the third control and the first display data, so that the first display data is displayed on the display interface on.
可选地,所述装置还包括:Optionally, the device further includes:
合并模块,用于在所述第二控件移动结束之后,合并承载所述显示界面的文字数据的多个控件。And a merging module, configured to merge the plurality of controls that carry the text data of the display interface after the second control moves.
可选地,所述分割子模块包括:Optionally, the segmentation submodule includes:
第一分割子模块,用于当所述第一显示数据为图片数据时,将所述第二显示数据以行为单位进行分割,进而将所述第二显示数据分割为所述M个可移动单元;和/或a first segmentation submodule, configured to divide the second display data into units of behavior when the first display data is picture data, and further divide the second display data into the M movable units ;and / or
第二分割子模块,用于当所述第一显示数据为文字数据时将所述第二显示数据以字为单位进行分割,进而将所述第二显示数据分割为所述M个可移动单元。a second segmentation sub-module, configured to divide the second display data into words in units of words when the first display data is text data, and further divide the second display data into the M movable units .
可选地,所述装置还包括:Optionally, the device further includes:
缩小模块,用于在创建第二控件之前,将所述第一显示数据由第一尺寸缩小为第二尺寸;a reduction module, configured to reduce the first display data from a first size to a second size before creating the second control;
放大模块,用于在所述第二控件移动结束之后,将所述第一显示数据由所述第二尺寸放大为所述第一尺寸。And an amplification module, configured to enlarge the first display data from the second size to the first size after the second control moves.
第三方面,本发明还公开了一种电子设备,所述电子设备的显示单元上显示有电子便签应用程序的显示界面,所述显示界面上的显示数据由一个或多个控件承载,所述控件与所述控件承载的数据之间具有对应关系,所述一个或多个控件包括第一控件,所述电子设备还包括:In a third aspect, the present invention further discloses an electronic device, wherein a display interface of an electronic note application is displayed on a display unit of the electronic device, and display data on the display interface is carried by one or more controls, The control device has a corresponding relationship with the data carried by the control, the one or more controls include a first control, and the electronic device further includes:
确定单元,用于确定所述显示界面的显示数据是否发生变化;a determining unit, configured to determine whether display data of the display interface changes;
判断单元,用于在确定所述显示界面的显示数据发生变化时,判断所述第一控件所承载的数据是否显示于所述显示界面中;a determining unit, configured to determine, when the display data of the display interface changes, whether data carried by the first control is displayed in the display interface;
第一释放单元,用于当判断所述第一控件所承载的数据不再显示于所述显示界面时,释放所述第一控件,解除所述第一控件与所述第一控件承载的数据之间的对应关系,将所述第一控件从所述显示界面中移除,回收存储所述第一控件的内存。 a first release unit, configured to release the first control and release data carried by the first control and the first control when determining that data carried by the first control is no longer displayed on the display interface Corresponding relationship between the first control is removed from the display interface, and the memory of the first control is reclaimed.
本发明有益效果如下:The beneficial effects of the present invention are as follows:
由于在本发明实施例中,提供了一种控制方法,应用于电子设备中,电子设备的显示单元上显示有电子便签应用程序的显示界面,显示界面上所显示的数据由一个或多个控件承载,所述控件与所述控件承载的数据之间具有对应关系,所述一个或多个控件包括第一控件,在确定所述显示界面的显示数据发生变化时,判断所述第一控件所承载的数据是否显示于所述显示界面中;当判断所述第一控件所承载的数据不再显示于所述显示界面时,释放所述第一控件,解除所述第一控件与所述第一控件承载的数据之间的对应关系,将所述第一控件从所述显示界面中移除,回收存储所述第一控件的内存。也就是仅仅显示于电子便签应用程序的显示界面的数据才通过控件进行承载,而如果控件对应的数据不再显示于显示界面,则释放对应的控件,解除所述第一控件与所述第一控件承载的数据之间的对应关系,将所述第一控件从所述显示界面中移除,回收存储所述第一控件的内存,从而能够有效节省控件资源以及***资源。In the embodiment of the present invention, a control method is provided, which is applied to an electronic device, wherein a display interface of the electronic note application is displayed on the display unit of the electronic device, and the data displayed on the display interface is controlled by one or more controls. The first control is configured to determine the first control device when the display data of the display interface changes. Whether the data to be carried is displayed in the display interface; when it is determined that the data carried by the first control is no longer displayed on the display interface, releasing the first control, releasing the first control and the first Corresponding relationship between data carried by the control, the first control is removed from the display interface, and the memory of the first control is reclaimed. That is, only the data displayed on the display interface of the electronic note application is carried by the control, and if the data corresponding to the control is no longer displayed on the display interface, the corresponding control is released, and the first control and the first are released. Corresponding relationship between the data carried by the control, the first control is removed from the display interface, and the memory of the first control is reclaimed, thereby effectively saving control resources and system resources.
进一步地,本发明实施例还可以通过有限控件的复用实现对电子便签的数据的展示,达到了节约控件资源的技术效果。Further, in the embodiment of the present invention, the data of the electronic note can be displayed by multiplexing the limited control, and the technical effect of saving the control resource is achieved.
附图说明DRAWINGS
图1为本发明实施例中控制方法的流程图;1 is a flowchart of a control method in an embodiment of the present invention;
图2为本发明实施例控制方法中对第一显示数据的移动进行控制的流程图;2 is a flowchart of controlling movement of first display data in a control method according to an embodiment of the present invention;
图3为本发明实施例控制方法中将第一显示数据由显示界面的第一位置移动至第二位置的流程图;3 is a flowchart of moving a first display data from a first position to a second position of a display interface in a control method according to an embodiment of the present invention;
图4为本发明实施例中控制装置的结构图;4 is a structural diagram of a control device according to an embodiment of the present invention;
图5为本发明实施例中电子设备的结构图。FIG. 5 is a structural diagram of an electronic device according to an embodiment of the present invention.
具体实施方式detailed description
本发明提供一种控制方法、控制装置及电子设备,以解决现有技术中控件资源浪费的技术问题。The invention provides a control method, a control device and an electronic device to solve the technical problem of waste of control resources in the prior art.
本申请实施例中的技术方案为解决上述的技术问题,总体思路如下: The technical solution in the embodiment of the present application is to solve the above technical problem, and the general idea is as follows:
提供了一种控制方法,应用于电子设备中,电子设备的显示单元上显示有电子便签应用程序的显示界面,显示界面上所显示的数据由一个或多个控件承载,所述控件与所述控件承载的数据之间具有对应关系,所述一个或多个控件包括第一控件,方法包括:确定所述显示界面的显示数据是否发生变化;在确定所述显示界面的显示数据发生变化时,判断所述第一控件所承载的数据是否显示于所述显示界面中;当判断所述第一控件所承载的数据不再显示于所述显示界面时,释放所述第一控件,解除所述第一控件与所述第一控件承载的数据之间的对应关系,将所述第一控件从所述显示界面中移除,回收存储所述第一控件的内存。也就是仅仅显示于电子便签应用程序的显示界面的数据才通过控件进行承载,而如果控件对应的数据不再显示于显示界面,则释放对应的控件,解除所述第一控件与所述第一控件承载的数据之间的对应关系,将所述第一控件从所述显示界面中移除,回收存储所述第一控件的内存,从而能够有效节省控件资源以及***资源,提高***的运行效率。本发明实施例还能够通过有限控件的复用实现对电子便签的数据的展示,达到了节约控件资源的技术效果。A control method is provided, which is applied to an electronic device, wherein a display interface of an electronic note application is displayed on a display unit of the electronic device, and data displayed on the display interface is carried by one or more controls, and the control and the Corresponding relationship between the data carried by the control, the one or more controls include a first control, the method includes: determining whether the display data of the display interface changes; when determining that the display data of the display interface changes, Determining whether the data carried by the first control is displayed in the display interface; when it is determined that the data carried by the first control is no longer displayed on the display interface, releasing the first control, releasing the Corresponding relationship between the first control and the data carried by the first control, the first control is removed from the display interface, and the memory of the first control is reclaimed. That is, only the data displayed on the display interface of the electronic note application is carried by the control, and if the data corresponding to the control is no longer displayed on the display interface, the corresponding control is released, and the first control and the first are released. Corresponding relationship between the data carried by the control, removing the first control from the display interface, and reclaiming and storing the memory of the first control, thereby effectively saving control resources and system resources, and improving system operation efficiency . The embodiment of the invention can also realize the display of the data of the electronic note by the multiplexing of the limited control, and achieve the technical effect of saving the control resource.
为了更好的理解上述技术方案,下面通过附图以及具体实施例对本发明技术方案做详细的说明,应当理解本发明实施例以及实施例中的具体特征是对本发明技术方案的详细的说明,而不是对本发明技术方案的限定,在不冲突的情况下,本发明实施例以及实施例中的技术特征可以相互组合。For a better understanding of the above technical solutions, the technical solutions of the present invention will be described in detail below through the accompanying drawings and specific embodiments. It should be understood that the specific features of the embodiments and the embodiments of the present invention are the detailed description of the technical solutions of the present invention, and The technical features of the embodiments of the present invention and the embodiments may be combined with each other without conflict.
第一方面,本发明实施例提供一种控制方法,应用于电子设备中,电子设备的显示单元上显示有电子便签应用程序的显示界面,显示界面上所显示的数据由一个或多个控件承载,所述控件与所述控件承载的数据之间具有对应关系,所述一个或多个控件包括第一控件,请参考图1,该方法包括:In a first aspect, an embodiment of the present invention provides a control method, which is applied to an electronic device, where a display interface of an electronic note application is displayed on a display unit of the electronic device, and data displayed on the display interface is carried by one or more controls. The control has a corresponding relationship with the data carried by the control, and the one or more controls include a first control. Referring to FIG. 1, the method includes:
S101,电子设备确定所述显示界面的显示数据是否发生变化。S101. The electronic device determines whether display data of the display interface changes.
S102,在所述电子设备确定所述显示界面的显示数据发生变化时,所述电子设备判断所述第一控件所承载的数据是否显示于所述显示界面中。S102. When the electronic device determines that the display data of the display interface changes, the electronic device determines whether data carried by the first control is displayed in the display interface.
S103,当所述电子设备判断所述第一控件所承载的数据不再显示于所述显示界面时,所述电子设备释放所述第一控件,解除所述第一控件与所述第一控件承载的数据之间的对应关系,将所述第一控件从所述显示界面中移除,回收存储所述第一控件的内存。S103, when the electronic device determines that the data carried by the first control is no longer displayed on the display interface, the electronic device releases the first control, and the first control and the first control are released. Corresponding relationship between the carried data, the first control is removed from the display interface, and the memory of the first control is reclaimed.
举例来说,所述电子设备例如为:手机、平板电脑、笔记本电脑等等。 For example, the electronic device is, for example, a mobile phone, a tablet computer, a notebook computer, or the like.
举例来说,所述电子便签应用程序的显示界面中可以每张图片采用一个控件进行承载,而每部分文字数据(也就是紧紧相邻没有被图片隔开的文字)也采用一个控件进行承载,进而可以通过一个或多个控件承载显示界面中的数据;当然,还可以每张图片采用一个控件进行承载,而每固定行文字(例如:3行、5行等等)采用一个控件进行承载等等,对于如何通过一个或多个控件承载电子便签应用程序的显示界面的数据,本发明实施例不再详细列举,并且不作限制。需要说明的是,每一个控件与所述控件承载的数据之间具有对应关系,所述一个或多个控件至少包括第一控件。For example, in the display interface of the electronic note application, each picture may be carried by one control, and each part of the text data (that is, the text immediately adjacent to the image not separated by the picture) is also carried by a control. In turn, one or more controls can carry data in the display interface; of course, each image can be carried by one control, and each fixed line of text (for example: 3 lines, 5 lines, etc.) is carried by one control. The embodiment of the present invention is not listed in detail, and is not limited, as to how to carry data of the display interface of the electronic signature application through one or more controls. It should be noted that each control has a correspondence with data carried by the control, and the one or more controls include at least a first control.
S101中,所述电子设备首先确定所述显示界面的显示数据是否发生变化。显示界面的显示内容发生变化可以基于多种触发条件,例如:电子设备的用户删除了显示界面的部分数据、电子设备的用户移动了显示界面的数据等等。本发明对此不进行限定。In S101, the electronic device first determines whether display data of the display interface changes. The display content of the display interface may be changed based on various trigger conditions, for example, the user of the electronic device deletes part of the data of the display interface, the user of the electronic device moves the data of the display interface, and the like. The invention is not limited thereto.
在一种可能的实现方式中,所述显示界面的显示数据包括第一显示数据和第二显示数据,所述方法还包括:当检测到针对所述显示界面的第一显示数据的移动操作,根据所述移动操作将所述移动操作对应的第一显示数据从所述显示界面的第一位置移动到第二位置。In a possible implementation manner, the display data of the display interface includes first display data and second display data, and the method further includes: when detecting a movement operation of the first display data for the display interface, And moving the first display data corresponding to the moving operation from the first position of the display interface to the second position according to the moving operation.
则所述确定所述显示界面的显示数据发生变化包括:当检测到所述显示界面的第一显示数据的移动操作且根据所述移动操作将所述移动操作对应的第一显示数据从所述显示界面的第一位置移动到第二位置时,确定所述显示界面的显示数据发生变化。And determining the change of the display data of the display interface includes: when the moving operation of the first display data of the display interface is detected, and the first display data corresponding to the moving operation is used according to the moving operation When the first position of the display interface is moved to the second position, it is determined that the display data of the display interface changes.
S102中,当电子设备确定所述显示界面的显示数据发生变化时,判断所述第一控件所承载的数据是否显示于所述显示界面中。In S102, when the electronic device determines that the display data of the display interface changes, it is determined whether data carried by the first control is displayed in the display interface.
举例说明,在一种可能的实现方式中,承载所述电子设备的显示界面的显示数据的控件可以为一个或者多个控件,所述一个或多个控件至少包括第一控件,当然还可以包括第二控件、第三控件、第四控件……在执行判断操作时,可以首先选取第一控件进行判断,如果判断第一控件所承载的数据不再显示于显示界面时,则执行S103。若承载所述显示数据的控件还包括第二控件、第三控件、第四控件……等,还进一步判断第二控件所承载的数据是否显示于所述显示界面中,如果判断第二控件所承载的数据不再显示于显示界面时,则执行释放第二控件的操作……以此类推。 For example, in a possible implementation, the control that carries the display data of the display interface of the electronic device may be one or more controls, and the one or more controls include at least the first control, and may of course include The second control, the third control, and the fourth control, when performing the determining operation, may first select the first control to perform the determination, and if it is determined that the data carried by the first control is no longer displayed on the display interface, execute S103. If the control that carries the display data further includes a second control, a third control, a fourth control, and the like, further determining whether the data carried by the second control is displayed in the display interface, and if determining the second control When the carried data is no longer displayed on the display interface, the operation of releasing the second control is performed... and so on.
举例说明,在另外一种可能的实现方式中,当承载所述电子设备的显示界面的显示数据的控件包括多个控件时,所述多个控件包括第一控件、第二控件、第三控件……时,也可以在遍历所有控件执行完判断操作后,当确定所述第一控件所承载的数据不再显示于所述显示界面时,再执行释放不再显示于显示界面的数据对应的空间的操作,例如释放第一控件。具体的实现方式可以是非常灵活的,本发明对此不进行限定。For example, in another possible implementation manner, when a control that carries display data of a display interface of the electronic device includes multiple controls, the multiple controls include a first control, a second control, and a third control. When the traversing of all the controls is performed, when it is determined that the data carried by the first control is no longer displayed on the display interface, the data corresponding to the data that is no longer displayed on the display interface is released. The operation of the space, such as releasing the first control. The specific implementation manner may be very flexible, and the present invention does not limit this.
S103中,由于第一控件所承载的数据不再显示于显示界面,则为了节省控件资源,并对控件进行重复使用,则可以释放第一控件。In S103, since the data carried by the first control is no longer displayed on the display interface, the first control may be released in order to save control resources and reuse the control.
其中,释放第一控件指的是解除所述第一控件与所述第一控件承载的数据之间的对应关系,将第一控件在界面中移除,并且回收存储第一控件的内存,例如:将这块内存上的内容直接去除、又或者将这块内存上的数据通过新的内容覆盖等等。由于在本发明实施例中,仅仅对显示于电子便签应用程序的显示界面的数据才通过控件进行承载,而如果控件对应的数据不再显示于显示界面,则释放对应的控件,解除所述第一控件与所述第一控件承载的数据之间的对应关系,将所述第一控件从所述显示界面中移除,回收存储所述第一控件的内存,从而能够有效节省控件资源以及***资源。由于通过释放控件、回收内存的方式减少了控件对***内存的占用,而内存资源对移动设备而言是非常宝贵的资源,因此本发明提供的方法不仅节省了控件资源和***资源,还有效提升了***的运行效率。The releasing the first control refers to releasing the correspondence between the first control and the data carried by the first control, removing the first control in the interface, and reclaiming the memory of the first control, for example, : Remove the contents of this memory directly, or overwrite the data on this memory with new content, and so on. In the embodiment of the present invention, only the data displayed on the display interface of the electronic note application is carried by the control, and if the data corresponding to the control is no longer displayed on the display interface, the corresponding control is released, and the first a correspondence between a control and data carried by the first control, removing the first control from the display interface, and reclaiming memory of the first control, thereby effectively saving control resources and a system Resources. Since the control system reduces the occupation of the system memory by releasing the control and reclaiming the memory, and the memory resource is an invaluable resource for the mobile device, the method provided by the invention not only saves the control resources and system resources, but also effectively improves The operating efficiency of the system.
需要说明的是,在释放第一控件时,回收存储第一控件的内存的方式可以是立即回收所述用于存储所述第一控件的内存,也可以是延时或者定时回收存储所述第一控件的内存。举例说明,所述回收存储所述第一控件的内存包括:在释放所述第一控件后、间隔预设时间执行回收存储所述第一控件的内存的操作。在这种实现方式中,在释放第一控件后,也可以延时一定时间回收内存。间隔的所述预设时间可以预先由***或者用户设定,在此不限定。举例来说,例如在释放第一控件后,延时1分钟、2分钟或者3分钟再回收用于存储第一控件的内存。It should be noted that, when the first control is released, the method for reclaiming the memory of the first control may be to immediately reclaim the memory for storing the first control, or may delay or periodically reclaim the storage. The memory of a control. For example, the recovering and storing the memory of the first control includes: performing an operation of reclaiming and storing the memory of the first control at a preset time after releasing the first control. In this implementation, after the first control is released, the memory can be reclaimed for a certain period of time. The preset time of the interval may be set in advance by the system or the user, and is not limited herein. For example, after releasing the first control, the memory for storing the first control is reclaimed by delaying for 1 minute, 2 minutes, or 3 minutes.
进一步地,当在释放所述第一控件后、间隔的所述预设时间到达之前,确定存在新数据将显示于所述显示界面时,使用所述第一控件承载所述新数据,保存所述第一控件与所述新数据的对应关系。在这种实现方式中,如果在释放 第一控件后,间隔的预设时间到达之前,例如间隔的预设时间为1分钟,而距离释放第一控件的时刻起计算还未到达1分钟时,存在新增的数据需要或者将要显示于所述显示界面时,则可以暂时不回收用于存储所述第一控件的内存,而是使用所述第一控件承载所述新增的数据,并保存所述第一控件与所述新数据的对应关系,以使得所述新增的数据能够显示于所述显示界面上。在这种实现方式中,由于延时回收存储控件的内存,所述控件还可以用于承载新数据,从而达到控件复用的技术效果。因此,本发明实施例可以通过有限控件的复用实现对电子便签的数据的展示,达到了节约控件资源的技术效果。此外,由于使用已经存在的控件来承载新增数据,因此无需另行创建新的控件来承载所述新增数据,因此也有效提高了***的运行效率。Further, when it is determined that there is new data to be displayed on the display interface after the first control is released, before the preset time of the interval is reached, the first control is used to carry the new data, and the saver is saved. Corresponding relationship between the first control and the new data. In this implementation, if it is releasing After the first control, before the preset time of the interval arrives, for example, the preset time of the interval is 1 minute, and when the calculation has not yet reached 1 minute from the time when the first control is released, there is new data that needs or is to be displayed. When the interface is displayed, the memory for storing the first control may not be temporarily reclaimed, but the first control is used to carry the newly added data, and the first control and the new data are saved. Correspondence relationship, so that the newly added data can be displayed on the display interface. In this implementation manner, the control can also be used to carry new data due to delaying the memory of the storage control, thereby achieving the technical effect of the control multiplexing. Therefore, the embodiment of the present invention can realize the display of the data of the electronic note by the multiplexing of the limited control, and achieve the technical effect of saving the control resource. In addition, since the existing control is used to carry the newly added data, there is no need to create a new control to carry the newly added data, thereby effectively improving the operating efficiency of the system.
作为进一步的优选实施例,请参考图2,方法还包括:As a further preferred embodiment, please refer to FIG. 2, the method further includes:
S201:检测获得针对显示界面上所显示的第一显示数据的操作;S201: detecting an operation for obtaining the first display data displayed on the display interface;
S202:判断所述操作是否为预设的移动操作;S202: Determine whether the operation is a preset moving operation;
S203a:在所述操作为预设的移动操作时,根据所述移动操作将所述移动操作对应的第一显示数据由所述显示界面的第一位置移动至第二位置;S203a: when the operation is a preset moving operation, moving the first display data corresponding to the moving operation from the first position of the display interface to the second position according to the moving operation;
S203b:在所述操作不是预设的移动操作时,不对第一数据进行移动。S203b: The first data is not moved when the operation is not a preset movement operation.
S201中,所述电子设备的显示界面显示的数据包括第一显示数据和第二显示数据。所述第一显示数据例如为:图像数据、文字数据等等。In S201, the data displayed by the display interface of the electronic device includes first display data and second display data. The first display data is, for example, image data, text data, and the like.
针对第一显示数据的操作例如为:点击操作、拖动操作、手势操作等等。The operations for the first display data are, for example, a click operation, a drag operation, a gesture operation, and the like.
S202中,可以根据实际需求,设置不同的预定条件,所述预设的移动操作例如为:操作为先选择再拖动的操作、操作为预定手势等等,本发明实施例不再详细列举。In S202, different predetermined conditions may be set according to actual requirements, and the preset moving operations are, for example, an operation of first selecting and then dragging, an operation being a predetermined gesture, and the like, which are not enumerated in detail in the embodiments of the present invention.
其中,基于第一显示数据的不同,针对第一显示数据的选择操作也不同,例如:如果第一显示数据为图片数据,则选择操作例如为:长按操作、快速双击操作等等;如果第一显示数据为文字数据,则选择操作例如为:滑动操作,其中滑动轨迹上的文字则为选中的文字数据,选择操作又例如为:按住鼠标左键进行拖动然后松开的操作,光标移动至的位置所对应的文字则为选中的文字数据等等。The selection operation for the first display data is different based on the difference of the first display data. For example, if the first display data is picture data, the selection operation is, for example, a long press operation, a quick double click operation, and the like; When the display data is text data, the selection operation is, for example, a sliding operation, wherein the text on the sliding track is the selected text data, and the selection operation is, for example, pressing and holding the left mouse button to drag and then release the cursor. The text corresponding to the position moved to is the selected text data and so on.
S203中,如果检测到的预设的移动操作为先选择再拖动的操作的话,则第一位置为被选择的第一显示数据所在位置,第二位置可以为拖动操作的结束 点位置;如果所述检测到的预设的移动操作为产生预设手势的操作的话,则第一位置为预设手势的起始点所对应的位置,而第二位置则可以根据操作的轨迹和距离来定,例如:如果第一操作为从上至下的手势的话,则第二位置位于第一位置下方,如果第一操作为从左至右的操作的话,则第二位置位于第一位置右侧等等,而第二位置相对于第一位置的距离,则与手势操作的距离成正比,对于采用何种方式确定第一位置和第二位置,本发明实施例不再详细列举,并且不作限制。In S203, if the detected preset movement operation is the operation of first selecting and then dragging, the first position is the position of the selected first display data, and the second position may be the end of the drag operation. a point position; if the detected preset movement operation is an operation of generating a preset gesture, the first position is a position corresponding to a starting point of the preset gesture, and the second position is according to an operation trajectory and The distance is determined, for example, if the first operation is a top-down gesture, the second position is below the first position, and if the first operation is a left-to-right operation, the second position is at the first position. The right side and the like, and the distance of the second position relative to the first position is proportional to the distance of the gesture operation, and the method for determining the first position and the second position is not enumerated in detail, and No restrictions.
作为进一步的优选实施例,S203中根据所述移动操作将所述移动操作对应的第一显示数据由显示界面的第一位置移动至第二位置,请参考图3,具体包括:As a further preferred embodiment, in S203, the first display data corresponding to the moving operation is moved from the first position of the display interface to the second position according to the moving operation. Referring to FIG. 3, the method specifically includes:
S301:创建第二控件,利用所述第二控件承载所述移动操作对应的第一显示数据。S301: Create a second control, and use the second control to carry the first display data corresponding to the moving operation.
S302:将显示单元的显示界面所显示的第二显示数据分割为M个可移动单元,其中每个可移动单元的数据由一个控件单独承载,M为正整数。S302: Divide the second display data displayed by the display interface of the display unit into M movable units, wherein data of each movable unit is separately carried by one control, and M is a positive integer.
S303:控制所述第二控件在所述M个可移动单元中间移动;S303: Control the second control to move between the M movable units;
S304:在所述第二控件移动结束之后,释放所述第二控件,解除所述第二控件与所述第二控件承载的第一显示数据之间的对应关系,将所述第二控件从所述显示界面中移除,回收存储所述第二控件的内存。S304: After the second control moves, the second control is released, and the correspondence between the second control and the first display data carried by the second control is released, and the second control is removed from the second control. The display interface is removed, and the memory of the second control is collected and stored.
S305,使用第三控件承载所述第一显示数据,以使得所述第一显示数据显示于所述显示界面上。S305. The first display data is carried by using a third control, so that the first display data is displayed on the display interface.
S301中,在检测到针对第一显示数据的操作中为预设的移动操作之后,控制第一显示数据进入选中状态,并且创建一个临时控件(也即:第二控件)来承载第一数据。其中,创建的第二控件用于承载所述第一显示数据或者第一显示数据的复本。所述第一显示数据的复本即对所述第一显示数据进行复制操作得到的数据。需要说明的是,新创建的第二控件与其他控件不属于同一个容器,其独立于其他控件。其他控件为当前显示界面中显示的数据所对应的控件,例如第一控件,例如原先承载第一显示数据的控件等。因此,第二控件能够在显示界面中移动,进而达到移动第二控件所承载的第一显示数据或者第一显示数据的复本的效果。In S301, after detecting a preset movement operation in the operation for the first display data, the first display data is controlled to enter the selected state, and a temporary control (ie, the second control) is created to carry the first data. The second control is configured to carry the first display data or a copy of the first display data. The copy of the first display data is data obtained by performing a copy operation on the first display data. It should be noted that the newly created second control does not belong to the same container as other controls, and is independent of other controls. Other controls are controls corresponding to the data displayed in the current display interface, such as a first control, such as a control that originally carries the first display data. Therefore, the second control can move in the display interface to achieve the effect of moving the first display data or the copy of the first display data carried by the second control.
S302中,在将第二显示数据分割为M个可移动单元时,可以将第二显示 数据逐行进行分割,这样M等于第二显示数据的行数;也可以将第二显示数据逐字进行分割,这样M等于第一文字数据的字数,当然,也可以采用其他分割方式,对此本发明实施例不再详细列举,并且不作限制。In S302, when the second display data is divided into M movable units, the second display may be The data is divided line by line, so that M is equal to the number of rows of the second display data; the second display data may also be divided word by word, so that M is equal to the number of words of the first text data, of course, other segmentation methods may also be used. The embodiments of the invention are not enumerated in detail and are not limiting.
另外,S302中还可以基于第一显示数据的不同,对第二显示数据采用不同的分割方式,下面列举其中的两种分割方式进行介绍,当然,在具体实施过程中,不限于以下两种情况。In addition, in the S302, the second display data may be differently divided according to the difference of the first display data, and the two types of the splitting manners are introduced in the following description. Of course, in the specific implementation process, the following two situations are not limited. .
第一种,在第一显示数据具体为:图片数据时,将显示单元所显示的第二显示数据分割为多个可移动单元,具体为:The first type, when the first display data is specifically: picture data, the second display data displayed by the display unit is divided into a plurality of movable units, specifically:
将第二显示数据以行为单位进行分割,进而将第二显示数据分割为M个可移动单元。The second display data is divided in units of rows, and the second display data is further divided into M movable units.
在这种情况下,在通过操作控制图片数据进行移动时,可以控制图片数据在的位置在任意两行文字进行移动。In this case, when moving by operating the control picture data, it is possible to control the position of the picture data to move in any two lines of text.
第二种,第一显示数据具体为:文字数据时,将显示单元所显示的第二显示数据分割为多个可移动单元,具体为:In the second embodiment, when the first display data is specifically: text data, the second display data displayed by the display unit is divided into a plurality of movable units, specifically:
将第二显示数据以字为单位进行分割,进而将第二显示数据分割为多个可移动单元。The second display data is divided in units of words, and the second display data is further divided into a plurality of movable units.
在这种情况下,在通过操作控制第一显示数据在第二显示数据中间移动时,可以控制第一显示数据在任意两个字之间、任意两行之间或者任意两段之间变换位置。In this case, when the first display data is moved in the middle of the second display data by the operation, the first display data can be controlled to change between any two words, between any two lines, or between any two segments. .
S303中,举例来说,可以通过针对第一显示数据的操作的移动轨迹,来控制第二控件在多个可移动单元中间移动。In S303, for example, the second control can be controlled to move between the plurality of movable units by the movement trajectory of the operation for the first display data.
例如:如果针对第一显示数据的操作的移动轨迹为从上至下的方向,则控制第二控件从上至下移动;如果针对第一显示数据的操作的移动轨迹为从左至右的方向,则可以控制第二控件从左至右移动等等。For example, if the movement trajectory of the operation for the first display data is from top to bottom, the second control is controlled to move from top to bottom; if the movement trajectory for the operation of the first display data is from left to right , you can control the second control to move from left to right, and so on.
S304中,在第二控件被拖动至合适位置(也即:第一显示数据移动结束)之后,此时会把第二控件进行释放,释放的做法是解除所述第二控件与所述第二控件承载的第一显示数据之间的对应关系,将第二控件从显示界面中移除,并且回收第二控件所占用的内存。In S304, after the second control is dragged to a suitable position (that is, the first display data movement ends), the second control is released at this time, and the release is performed by releasing the second control and the first Corresponding relationship between the first display data carried by the second control, the second control is removed from the display interface, and the memory occupied by the second control is recovered.
在S305中,使用第三控件来承载所述第一显示数据,以使得所述第一显示数据显示于所述显示界面上。根据第三控件的来源不同,具有不同的实现方 式。In S305, the third display is used to carry the first display data such that the first display data is displayed on the display interface. Depending on the source of the third control, there are different implementations formula.
举例说明,在一种可能的实现方式中,在检测到针对所述显示界面的第一显示数据的移动操作之前,所述第一显示数据由所述第三控件承载。在电子设备检测到针对所述显示界面的第一显示数据的移动操作后,在创建第二控件之前,电子设备将承载所述第一显示数据的所述第三控件的显示属性由显示设置为隐藏。而后,再创建第二控件承载第一显示数据。当针对第二控件或者第一显示数据的移动结束之后,则释放第二控件。之后,将所述第三控件的显示属性由隐藏设置为显示,使用所述第三控件承载所述第一显示数据,以使得所述第一显示数据显示于所述显示界面上。在这一种实现方式中,创建临时控件即第二控件来承载第一显示数据,以便第一显示数据能够在显示界面中移动。进一步的,在使用第二控件移动第一显示数据的操作结束后,即释放第二控件,以节省控件和***资源,并使用原先承载第一显示数据的第三控件重新承载第一显示数据,达到了有限控件的复用,节省了控件和***资源,并有效提升了***的运行效率。For example, in a possible implementation, the first display data is carried by the third control before detecting a moving operation of the first display data for the display interface. After the electronic device detects the moving operation of the first display data for the display interface, before the second control is created, the electronic device sets the display attribute of the third control that carries the first display data from the display to hide. Then, the second control is created to carry the first display data. After the end of the movement for the second control or the first display data, the second control is released. Thereafter, the display attribute of the third control is set to be hidden from being displayed, and the first display data is carried by the third control, so that the first display data is displayed on the display interface. In this implementation, a temporary control, ie, a second control, is created to carry the first display data so that the first display data can be moved in the display interface. Further, after the operation of moving the first display data by using the second control ends, the second control is released to save control and system resources, and the first display data is re-hosted by using the third control that originally carries the first display data. The reuse of limited controls is achieved, saving control and system resources, and effectively improving the operating efficiency of the system.
举例说明,在另外一种可能的实现方式中,在检测到针对所述显示界面的第一显示数据的移动操作之前,所述第一显示数据由第四控件承载。在电子设备检测到针对所述显示界面的第一显示数据的移动操作后,在创建第二控件之前,电子设备释放第四控件,解除所述第四控件与所述第一显示数据之间的对应关系,将所述第四控件从所述显示界面中移除,回收存储所述第四控件的内存。而后,再创建第二控件承载第一显示数据。当针对第二控件或者第一显示数据的移动结束之后,则释放第二控件。之后,创建第三控件,使用所述第三控件承载所述第一显示数据,保存所述第三控件与所述第一显示数据的对应关系,以使得所述第一显示数据显示于所述显示界面上。在这一种实现方式中,创建临时控件即第二控件来承载第一显示数据,以便第一显示数据能够在显示界面中移动。进一步的,在使用第二控件移动第一显示数据的操作结束后,即释放第二控件,以节省控件和***资源,并创建新控件即第三控件来承载第一显示数据,达到了更好的数据展示效果。For example, in another possible implementation, the first display data is carried by the fourth control before detecting the moving operation of the first display data for the display interface. After the electronic device detects the moving operation of the first display data for the display interface, before the second control is created, the electronic device releases the fourth control to cancel the relationship between the fourth control and the first display data. Correspondingly, the fourth control is removed from the display interface, and the memory of the fourth control is reclaimed. Then, the second control is created to carry the first display data. After the end of the movement for the second control or the first display data, the second control is released. After the third control is created, the first display data is carried by the third control, and the corresponding relationship between the third control and the first display data is saved, so that the first display data is displayed on the On the display interface. In this implementation, a temporary control, ie, a second control, is created to carry the first display data so that the first display data can be moved in the display interface. Further, after the operation of moving the first display data by using the second control ends, the second control is released to save the control and system resources, and the new control, that is, the third control, is carried to carry the first display data, thereby achieving a better Data display effect.
进一步的,本发明实施例提供的方法还可以包括:在所述第二控件移动结束之后,合并承载所述显示界面的文字数据的多个控件。Further, the method provided by the embodiment of the present invention may further include: after the end of the moving of the second control, merging a plurality of controls that carry the text data of the display interface.
需要说明的是,由于第二控件即第一显示数据的移动导致了显示界面中的 数据的显示位置整体发生了变化,故而需要瞬时调整M个可移动单元的排列顺序,这个过程通常是毫秒级的。接着,需要拼接所有承载文字数据的控件,由于是操作的数据本身,不对UI(User Interface:用户界面)控件的特征进行调整(因为只移动了控件的位置,而并未新增控件或者改变控件的大小),所以这个过程也是非常快的。最后让整个UI进行重绘,因为只有当前显示界面有数个控件进行显示,而后台并没有控件,所以也大大提高了重绘UI过程的速度。进而整体上能够达到快速拖动第一显示数据的技术效果。It should be noted that, because the movement of the second control, that is, the first display data, is caused in the display interface. The display position of the data has changed as a whole, so it is necessary to instantaneously adjust the order of arrangement of the M movable units, which is usually in the order of milliseconds. Then, it is necessary to splicing all the controls that carry the text data. Since the data itself is the operation, the features of the UI (User Interface) control are not adjusted (because only the position of the control is moved, and the control is not added or the control is changed. The size), so this process is also very fast. Finally, the entire UI is redrawn, because only the current display interface has several controls for display, and there is no control in the background, so the speed of redrawing the UI process is greatly improved. In turn, the technical effect of quickly dragging the first display data can be achieved as a whole.
基于第一显示数据的不同,合并承载显示界面的数据的多个控件的方式也不同,下面列举其中的两种进行介绍,当然,在具体实施过程中,不限于以下两种情况。The manner of merging the multiple controls of the data carrying the display interface is different according to the difference of the first display data. Two of them are introduced below. Of course, in the specific implementation process, the following two situations are not limited.
第一种,第一显示数据为图像数据,在这种情况下,合并承载显示界面的数据的多个控件具体为:合并M个可移动单元所对应的M个控件。合并控件的操作具体执行时,可以是使用M个控件中的一个控件来承载所述M个控件对应的数据,同时释放其他控件,将其他控件从显示界面中移除,并回收存储所述控件的内存。First, the first display data is image data. In this case, the multiple controls that combine the data carrying the display interface are specifically: M controls corresponding to the M movable units. When the operation of the merged control is specifically executed, one of the M controls may be used to carry data corresponding to the M controls, and other controls are released, other controls are removed from the display interface, and the control is reclaimed and stored. Memory.
举例来说,由于图像数据在电子便签应用程序中都是采用单独的控件进行承载的,在这种情况下,则只需要对被图片数据所打乱的文本数据进行合并即可。For example, since the image data is carried by a separate control in the electronic note application, in this case, only the text data disturbed by the picture data needs to be merged.
第二种,第一显示数据为文字数据,在这种情况下,合并承载显示界面的数据的多个控件具体为:合并M个可移动单元所对应的M个控件以及承载所述第一显示数据的控件。In the second case, the first display data is text data. In this case, the multiple controls that merge the data that carries the display interface are specifically: merge the M controls corresponding to the M movable units and carry the first display. The control of the data.
举例来说由于第一显示数据为文字数据,而通常情况下,相邻的文字数据会采用同一个控件进行承载,也就是第一显示数据也可能会和第二显示数据中的部分文字数据采用同一个控件进行承载,故而在这种情况下,则需要对所有的文字数据行顺序调整并合并。For example, since the first display data is text data, in general, adjacent text data is carried by the same control, that is, the first display data may also be used with part of the text data in the second display data. The same control is carried, so in this case, all the text data lines need to be sequentially adjusted and merged.
由于在本发明具体实现时,合并了承载文字数据的多个控件,因此可以更加有效地节省控件资源和***内存资源,以便移动设备可以利用释放的内存资源进行其他处理,以提高***的运行和响应速度。Since the multiple controls that carry the text data are combined in the specific implementation of the present invention, the control resources and the system memory resources can be saved more effectively, so that the mobile device can utilize the released memory resources for other processing to improve the operation of the system. responding speed.
作为进一步的优选实施例,在基于步骤S301将第一显示数据采用第二控件进行承载之前,方法还包括:将第一显示数据由第一尺寸缩小为第二尺寸; As a further preferred embodiment, before the first display data is carried by the second control based on step S301, the method further includes: reducing the first display data from the first size to the second size;
在第二控件移动结束之后,方法还包括:将第一显示数据由第二尺寸放大为第一尺寸。After the second control moves, the method further includes: magnifying the first display data from the second size to the first size.
举例来说,在将第一显示数据由第一尺寸缩小为第二尺寸时,可以将第一数据缩小预设倍数,例如:第一尺寸为100px*200px,而缩小倍数为10倍(当然也可以为其他倍数),从而第二尺寸为:10px*20px;也可以将第一数据缩小至预定尺寸,例如:第二尺寸的高度为两倍行距(当然也可以是其它预定尺寸),假设单一尺寸为10倍行距*20倍行距,则第二尺寸为:1倍行距*2倍行距等等。通过上述方案能够保证第一数据能够更加方便的被移动。For example, when the first display data is reduced from the first size to the second size, the first data may be reduced by a preset multiple, for example, the first size is 100px*200px, and the reduction factor is 10 times (of course also It can be other multiples, so that the second size is: 10px*20px; the first data can also be reduced to a predetermined size, for example, the height of the second size is twice the line spacing (of course, other predetermined sizes), assuming a single The size is 10 times the line spacing * 20 times the line spacing, then the second size is: 1 line spacing * 2 times the line spacing and so on. Through the above scheme, it can be ensured that the first data can be moved more conveniently.
需要说明的是,在移动所述第二控件即移动第一显示数据的过程中,当电子设备确定显示内容发生变化时,即可以判断第一控件所承载的数据是否显示于所述显示界面中,当判断所述第一控件所承载的数据不再显示于所述显示界面时,释放所述第一控件,解除所述第一控件与所述第一控件承载的数据之间的对应关系,将所述第一控件从所述显示界面中移除,回收存储所述第一控件的内存。进一步地,所述回收存储所述第一控件的内存的方式为:在释放所述第一控件后、间隔预设时间执行回收存储所述第一控件的内存的操作。当在释放所述第一控件后、间隔的所述预设时间到达之前,确定存在新数据将显示于所述显示界面时,使用所述第一控件承载所述新数据,保存所述第一控件与所述新数据的对应关系。在这种实现方式中,复用已经创建的第一控件来承载新增的数据,对于快速移动显示界面中的显示数据的场景是非常适用的,由于在快速移动显示数据的过程中,会产生大量新增的数据以及不再显示于显示界面的数据,因此通过释放控件以及复用已经创建的第一控件来承载新增的数据的方式,而无需创建新的控件,有效提高了***的处理和响应速度,达到了快速移动数据以及提高显示界面的显示效率和速度的效果。It should be noted that, in the process of moving the second control, that is, moving the first display data, when the electronic device determines that the display content changes, it may be determined whether the data carried by the first control is displayed in the display interface. When it is determined that the data carried by the first control is no longer displayed on the display interface, the first control is released, and the correspondence between the first control and the data carried by the first control is released. The first control is removed from the display interface, and the memory of the first control is reclaimed. Further, the method for reclaiming and storing the memory of the first control is: performing an operation of reclaiming and storing the memory of the first control at a preset time interval after the first control is released. When it is determined that there is new data to be displayed on the display interface after the first control is released, before the preset time is reached, the first control is used to carry the new data, and the first data is saved. The correspondence between the control and the new data. In this implementation, the first control that has been created is used to carry the newly added data, which is very suitable for the scene of displaying data in the fast moving display interface, because in the process of rapidly moving the displayed data, it will be generated. A lot of new data and data that is no longer displayed on the display interface, so by releasing the control and reusing the first control that has been created to carry the new data, without creating a new control, effectively improving the processing of the system And response speed, to achieve fast moving data and improve the display efficiency and speed of the display interface.
第二方面,基于同一发明构思,参见图4,本发明实施例还公开了一种控制装置400,所述控制装置应用于电子设备中,所述电子设备的显示单元上显示有电子便签应用程序的显示界面,所述显示界面上的显示数据由一个或多个控件承载,所述控件与所述控件承载的数据之间具有对应关系,所述一个或多个控件包括第一控件,所述装置400包括:In a second aspect, based on the same inventive concept, referring to FIG. 4, an embodiment of the present invention further discloses a control device 400, where the control device is applied to an electronic device, and an electronic note application is displayed on a display unit of the electronic device. a display interface, the display data on the display interface is carried by one or more controls, and the control has a corresponding relationship with data carried by the control, the one or more controls including a first control, Apparatus 400 includes:
确定模块401,用于确定所述显示界面的显示数据是否发生变化; a determining module 401, configured to determine whether display data of the display interface changes;
判断模块402,用于在确定所述显示界面的显示数据发生变化时,判断所述第一控件所承载的数据是否显示于所述显示界面中;The determining module 402 is configured to determine, when the display data of the display interface changes, whether the data carried by the first control is displayed in the display interface;
第一释放模块403,用于当判断所述第一控件所承载的数据不再显示于所述显示界面时,释放所述第一控件,解除所述第一控件与所述第一控件承载的数据之间的对应关系,将所述第一控件从所述显示界面中移除,回收存储所述第一控件的内存。The first release module 403 is configured to: when it is determined that the data carried by the first control is no longer displayed on the display interface, release the first control, and release the first control and the first control Corresponding relationship between the data, the first control is removed from the display interface, and the memory of the first control is reclaimed.
可选地,所述第一释放模块具体用于:Optionally, the first release module is specifically configured to:
在释放所述第一控件后、间隔预设时间执行回收存储所述第一控件的内存的操作。After the first control is released, the operation of reclaiming the memory of the first control is performed at an interval preset time.
可选地,所述装置还包括:Optionally, the device further includes:
复用模块,用于当在释放所述第一控件后、间隔的所述预设时间到达之前,确定存在新数据将显示于所述显示界面时,使用所述第一控件承载所述新数据,保存所述第一控件与所述新数据的对应关系。a multiplexing module, configured to use the first control to carry the new data when it is determined that there is new data to be displayed on the display interface after the first control is released and before the preset time of the interval is reached And storing a correspondence between the first control and the new data.
可选地,所述装置还包括:Optionally, the device further includes:
检测模块,用于检测针对所述显示界面的第一显示数据的移动操作;其中,所述显示界面的显示数据包括第一显示数据和第二显示数据;a detecting module, configured to detect a moving operation of the first display data for the display interface, where the display data of the display interface includes first display data and second display data;
移动模块,用于当检测到针对所述显示界面的第一显示数据的移动操作,根据所述移动操作将所述移动操作对应的第一显示数据从所述显示界面的第一位置移动到第二位置;a moving module, configured to: when the moving operation of the first display data for the display interface is detected, move the first display data corresponding to the moving operation from the first position of the display interface to the first Two positions
则所述确定模块具体用于:The determining module is specifically configured to:
当检测到所述显示界面的第一显示数据的移动操作且根据所述移动操作将所述移动操作对应的第一显示数据从所述显示界面的第一位置移动到第二位置时,确定所述显示界面的显示数据发生变化。When the moving operation of the first display data of the display interface is detected and the first display data corresponding to the moving operation is moved from the first position to the second position of the display interface according to the moving operation, determining The display data of the display interface changes.
可选地,所述移动模块包括:Optionally, the mobile module includes:
第一创建子模块,用于创建第二控件,利用所述第二控件承载所述移动操作对应的第一显示数据;a first creating sub-module, configured to create a second control, and use the second control to carry first display data corresponding to the moving operation;
分割子模块,用于将所述显示界面显示的第二显示数据分割为M个可移动单元,其中,每个可移动单元对应的数据由一个控件单独承载,M为正整数;a dividing sub-module, configured to divide the second display data displayed by the display interface into M movable units, wherein data corresponding to each movable unit is separately carried by a control, and M is a positive integer;
控制子模块,用于控制所述第二控件在所述M个可移动单元中间移动; a control submodule, configured to control the second control to move between the M movable units;
释放子模块,用于在所述第二控件移动结束之后,释放所述第二控件,解除所述第二控件与所述第二控件承载的第一显示数据之间的对应关系,将所述第二控件从所述显示界面中移除,回收存储所述第二控件的内存;a releasing submodule, configured to release the second control after the second control moves, and release a correspondence between the second control and the first display data carried by the second control, The second control is removed from the display interface, and the memory of the second control is reclaimed;
承载子模块,用于使用第三控件承载所述第一显示数据,以使得所述第一显示数据显示于所述显示界面上。And a carrying submodule, configured to carry the first display data by using a third control, so that the first display data is displayed on the display interface.
可选地,所述装置还包括:Optionally, the device further includes:
隐藏子模块,用于在创建第二控件之前,将第三控件的显示属性由显示设置为隐藏,其中,在检测到针对所述显示界面的第一显示数据的移动操作之前,所述第一显示数据由所述第三控件承载;a hiding submodule configured to set a display property of the third control to be hidden from being displayed before the second control is created, wherein the first is before the moving operation of the first display data for the display interface is detected Display data is carried by the third control;
所述承载子模块具体用于:The carrier submodule is specifically configured to:
将所述第三控件的显示属性由隐藏设置为显示,使用所述第三控件承载所述第一显示数据,以使得所述第一显示数据显示于所述显示界面上。Setting the display attribute of the third control to be displayed by hiding, using the third control to carry the first display data, so that the first display data is displayed on the display interface.
可选地,所述装置还包括:Optionally, the device further includes:
第二释放模块,用于在创建第二控件之前,释放第四控件,解除所述第四控件与所述第一显示数据之间的对应关系,将所述第四控件从所述显示界面中移除,回收存储所述第四控件的内存;其中,在检测到针对所述显示界面的第一显示数据的移动操作之前,所述第一显示数据由所述第四控件承载;a second release module, configured to: before the second control is created, release the fourth control, release the correspondence between the fourth control and the first display data, and use the fourth control from the display interface Removing, reclaiming memory of the fourth control; wherein, before detecting a moving operation of the first display data for the display interface, the first display data is carried by the fourth control;
所述承载子模块具体用于:The carrier submodule is specifically configured to:
创建第三控件,使用所述第三控件承载所述第一显示数据,保存所述第三控件与所述第一显示数据的对应关系,以使得所述第一显示数据显示于所述显示界面上。Creating a third control, using the third control to carry the first display data, and saving a correspondence between the third control and the first display data, so that the first display data is displayed on the display interface on.
可选地,所述装置还包括:Optionally, the device further includes:
合并模块,用于在所述第二控件移动结束之后,合并承载所述显示界面的文字数据的多个控件。And a merging module, configured to merge the plurality of controls that carry the text data of the display interface after the second control moves.
可选地,所述分割子模块包括:Optionally, the segmentation submodule includes:
第一分割子模块,用于当所述第一显示数据为图片数据时,将所述第二显示数据以行为单位进行分割,进而将所述第二显示数据分割为所述M个可移动单元;和/或 a first segmentation submodule, configured to divide the second display data into units of behavior when the first display data is picture data, and further divide the second display data into the M movable units ;and / or
第二分割子模块,用于当所述第一显示数据为文字数据时将所述第二显示数据以字为单位进行分割,进而将所述第二显示数据分割为所述M个可移动单元。a second segmentation sub-module, configured to divide the second display data into words in units of words when the first display data is text data, and further divide the second display data into the M movable units .
可选地,所述装置还包括:Optionally, the device further includes:
缩小模块,用于在创建第二控件之前,将所述第一显示数据由第一尺寸缩小为第二尺寸;a reduction module, configured to reduce the first display data from a first size to a second size before creating the second control;
放大模块,用于在所述第二控件移动结束之后,将所述第一显示数据由所述第二尺寸放大为所述第一尺寸。And an amplification module, configured to enlarge the first display data from the second size to the first size after the second control moves.
第三方面,基于同一发明构思,参见图4,本发明实施例还公开了一种电子设备500,所述电子设备的显示单元上显示有电子便签应用程序的显示界面,所述显示界面上的显示数据由一个或多个控件承载,所述控件与所述控件承载的数据之间具有对应关系,所述一个或多个控件包括第一控件,所述电子设备500还包括:In a third aspect, based on the same inventive concept, referring to FIG. 4, an embodiment of the present invention further discloses an electronic device 500. The display unit of the electronic device displays a display interface of an electronic note application, and the display interface The display data is carried by one or more controls, and the control has a corresponding relationship with the data carried by the control. The one or more controls include a first control, and the electronic device 500 further includes:
确定单元501,用于确定所述显示界面的显示数据是否发生变化;a determining unit 501, configured to determine whether display data of the display interface changes;
判断单元502,用于在确定所述显示界面的显示数据发生变化时,判断所述第一控件所承载的数据是否显示于所述显示界面中;The determining unit 502 is configured to determine, when the display data of the display interface changes, whether the data carried by the first control is displayed in the display interface;
第一释放单元503,用于当判断所述第一控件所承载的数据不再显示于所述显示界面时,释放所述第一控件,解除所述第一控件与所述第一控件承载的数据之间的对应关系,将所述第一控件从所述显示界面中移除,回收存储所述第一控件的内存。The first release unit 503 is configured to: when it is determined that the data carried by the first control is no longer displayed on the display interface, release the first control, and release the first control and the first control Corresponding relationship between the data, the first control is removed from the display interface, and the memory of the first control is reclaimed.
可选地,所述第一释放单元具体用于:Optionally, the first release unit is specifically configured to:
在释放所述第一控件后、间隔预设时间执行回收存储所述第一控件的内存的操作。After the first control is released, the operation of reclaiming the memory of the first control is performed at an interval preset time.
可选地,所述电子设备还包括:Optionally, the electronic device further includes:
复用单元,用于当在释放所述第一控件后、间隔的所述预设时间到达之前,确定存在新数据将显示于所述显示界面时,使用所述第一控件承载所述新数据,保存所述第一控件与所述新数据的对应关系。a multiplexing unit, configured to use the first control to carry the new data when it is determined that there is new data to be displayed on the display interface after the first control is released and before the preset time of the interval is reached And storing a correspondence between the first control and the new data.
可选地,所述电子设备还包括:Optionally, the electronic device further includes:
检测单元,用于检测针对所述显示界面的第一显示数据的移动操作;其中,所述显示界面的显示数据包括第一显示数据和第二显示数据; a detecting unit, configured to detect a moving operation of the first display data for the display interface, where the display data of the display interface includes first display data and second display data;
移动单元,用于当检测到针对所述显示界面的第一显示数据的移动操作,根据所述移动操作将所述移动操作对应的第一显示数据从所述显示界面的第一位置移动到第二位置;a moving unit, configured to: when the moving operation of the first display data for the display interface is detected, move the first display data corresponding to the moving operation from the first position of the display interface to the first Two positions
则所述确定单元具体用于:Then the determining unit is specifically configured to:
当检测到所述显示界面的第一显示数据的移动操作且根据所述移动操作将所述移动操作对应的第一显示数据从所述显示界面的第一位置移动到第二位置时,确定所述显示界面的显示数据发生变化。When the moving operation of the first display data of the display interface is detected and the first display data corresponding to the moving operation is moved from the first position to the second position of the display interface according to the moving operation, determining The display data of the display interface changes.
可选地,所述移动单元包括:Optionally, the mobile unit includes:
第一创建子单元,用于创建第二控件,利用所述第二控件承载所述移动操作对应的第一显示数据;a first creating subunit, configured to create a second control, and use the second control to carry first display data corresponding to the moving operation;
分割子单元,用于将所述显示界面显示的第二显示数据分割为M个可移动单元,其中,每个可移动单元对应的数据由一个控件单独承载,M为正整数;a dividing subunit, configured to divide the second display data displayed by the display interface into M movable units, wherein data corresponding to each movable unit is separately carried by a control, and M is a positive integer;
控制子单元,用于控制所述第二控件在所述M个可移动单元中间移动;a control subunit, configured to control the second control to move between the M movable units;
释放子单元,用于在所述第二控件移动结束之后,释放所述第二控件,解除所述第二控件与所述第二控件承载的第一显示数据之间的对应关系,将所述第二控件从所述显示界面中移除,回收存储所述第二控件的内存;a releasing subunit, configured to release the second control after the end of the moving of the second control, and release a correspondence between the second control and the first display data carried by the second control, The second control is removed from the display interface, and the memory of the second control is reclaimed;
承载子单元,用于使用第三控件承载所述第一显示数据,以使得所述第一显示数据显示于所述显示界面上。And a carrying subunit, configured to carry the first display data by using a third control, so that the first display data is displayed on the display interface.
可选地,所述电子设备还包括:Optionally, the electronic device further includes:
隐藏子单元,用于在创建第二控件之前,将第三控件的显示属性由显示设置为隐藏,其中,在检测到针对所述显示界面的第一显示数据的移动操作之前,所述第一显示数据由所述第三控件承载;a hidden subunit, configured to set a display attribute of the third control to be hidden from being displayed by the display before the second control is created, wherein the first before the moving operation of the first display data for the display interface is detected Display data is carried by the third control;
所述承载子单元具体用于:The carrier subunit is specifically configured to:
将所述第三控件的显示属性由隐藏设置为显示,使用所述第三控件承载所述第一显示数据,以使得所述第一显示数据显示于所述显示界面上。Setting the display attribute of the third control to be displayed by hiding, using the third control to carry the first display data, so that the first display data is displayed on the display interface.
可选地,所述电子设备还包括:Optionally, the electronic device further includes:
第二释放单元,用于在创建第二控件之前,释放第四控件,解除所述第四控件与所述第一显示数据之间的对应关系,将所述第四控件从所述显示界面中移除,回收存储所述第四控件的内存;其中,在检测到针对所述显示界面的第一显示数据的移动操作之前,所述第一显示数据由所述第四控件承载; a second release unit, configured to release the fourth control, release the correspondence between the fourth control and the first display data, and the fourth control from the display interface, before creating the second control Removing, reclaiming memory of the fourth control; wherein, before detecting a moving operation of the first display data for the display interface, the first display data is carried by the fourth control;
所述承载子单元具体用于:The carrier subunit is specifically configured to:
创建第三控件,使用所述第三控件承载所述第一显示数据,保存所述第三控件与所述第一显示数据的对应关系,以使得所述第一显示数据显示于所述显示界面上。Creating a third control, using the third control to carry the first display data, and saving a correspondence between the third control and the first display data, so that the first display data is displayed on the display interface on.
可选地,所述电子设备还包括:Optionally, the electronic device further includes:
合并单元,用于在所述第二控件移动结束之后,合并承载所述显示界面的文字数据的多个控件。And a merging unit, configured to merge the plurality of controls that carry the text data of the display interface after the second control moves.
可选地,所述分割子单元包括:Optionally, the segmentation subunit includes:
第一分割子单元,用于当所述第一显示数据为图片数据时,将所述第二显示数据以行为单位进行分割,进而将所述第二显示数据分割为所述M个可移动单元;和/或a first dividing subunit, configured to divide the second display data into units of behavior when the first display data is picture data, and further divide the second display data into the M movable units ;and / or
第二分割子单元,用于当所述第一显示数据为文字数据时将所述第二显示数据以字为单位进行分割,进而将所述第二显示数据分割为所述M个可移动单元。a second dividing subunit, configured to divide the second display data into words in units of words when the first display data is text data, and further divide the second display data into the M movable units .
可选地,所述电子设备还包括:Optionally, the electronic device further includes:
缩小单元,用于在创建第二控件之前,将所述第一显示数据由第一尺寸缩小为第二尺寸;a reduction unit, configured to reduce the first display data from a first size to a second size before creating the second control;
放大单元,用于在所述第二控件移动结束之后,将所述第一显示数据由所述第二尺寸放大为所述第一尺寸。And an amplifying unit, configured to enlarge the first display data from the second size to the first size after the second control moves end
本发明一个或多个实施例,至少具有以下有益效果:One or more embodiments of the present invention have at least the following beneficial effects:
由于在本发明实施例中,提供了一种控制方法,应用于电子设备中,电子设备的显示单元上显示有电子便签应用程序的显示界面,显示界面上所显示的数据由一个或多个控件承载,所述控件与所述控件承载的数据之间具有对应关系,所述一个或多个控件包括第一控件,在确定所述显示界面的显示数据发生变化时,判断所述第一控件所承载的数据是否显示于所述显示界面中;当判断所述第一控件所承载的数据不再显示于所述显示界面时,释放所述第一控件,解除所述第一控件与所述第一控件承载的数据之间的对应关系,将所述第一控件从所述显示界面中移除,回收存储所述第一控件的内存。也就是仅仅显示于电子便签应用程序的显示界面的数据才通过控件进行承载,而如果控件对应的数据不再显示于显示界面,则释放对应的控件,解除所述第一控件与所述第一 控件承载的数据之间的对应关系,将所述第一控件从所述显示界面中移除,回收存储所述第一控件的内存,从而能够有效节省控件资源以及***资源。In the embodiment of the present invention, a control method is provided, which is applied to an electronic device, wherein a display interface of the electronic note application is displayed on the display unit of the electronic device, and the data displayed on the display interface is controlled by one or more controls. The first control is configured to determine the first control device when the display data of the display interface changes. Whether the data to be carried is displayed in the display interface; when it is determined that the data carried by the first control is no longer displayed on the display interface, releasing the first control, releasing the first control and the first Corresponding relationship between data carried by the control, the first control is removed from the display interface, and the memory of the first control is reclaimed. That is, only the data displayed on the display interface of the electronic note application is carried by the control, and if the data corresponding to the control is no longer displayed on the display interface, the corresponding control is released, and the first control and the first are released. Corresponding relationship between the data carried by the control, the first control is removed from the display interface, and the memory of the first control is reclaimed, thereby effectively saving control resources and system resources.
进一步地,本发明实施例还可以通过有限控件的复用实现对电子便签的数据的展示,达到了节约控件资源的技术效果。Further, in the embodiment of the present invention, the data of the electronic note can be displayed by multiplexing the limited control, and the technical effect of saving the control resource is achieved.
本领域内的技术人员应明白,本发明的实施例可提供为方法、***、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
本发明是参照根据本发明实施例的方法、设备(***)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。While the preferred embodiment of the invention has been described, it will be understood that Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and the modifications and
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。 It is apparent that those skilled in the art can make various modifications and variations to the invention without departing from the spirit and scope of the invention. Thus, it is intended that the present invention cover the modifications and modifications of the invention

Claims (20)

  1. 一种控制方法,其特征在于,所述方法应用于电子设备中,所述电子设备的显示单元上显示有电子便签应用程序的显示界面,所述显示界面上的显示数据由一个或多个控件承载,所述控件与所述控件承载的数据之间具有对应关系,所述一个或多个控件包括第一控件,所述方法包括:A control method is applied to an electronic device, wherein a display interface of an electronic note application is displayed on a display unit of the electronic device, and display data on the display interface is controlled by one or more controls The bearer, the control has a corresponding relationship with the data carried by the control, the one or more controls include a first control, and the method includes:
    确定所述显示界面的显示数据是否发生变化;Determining whether the display data of the display interface changes;
    在确定所述显示界面的显示数据发生变化时,判断所述第一控件所承载的数据是否显示于所述显示界面中;When it is determined that the display data of the display interface changes, determining whether data carried by the first control is displayed in the display interface;
    当判断所述第一控件所承载的数据不再显示于所述显示界面时,释放所述第一控件,解除所述第一控件与所述第一控件承载的数据之间的对应关系,将所述第一控件从所述显示界面中移除,回收存储所述第一控件的内存。When it is determined that the data carried by the first control is no longer displayed on the display interface, the first control is released, and the correspondence between the first control and the data carried by the first control is released, and The first control is removed from the display interface, and the memory of the first control is reclaimed.
  2. 根据权利要求1所述的方法,其特征在于,所述回收存储所述第一控件的内存包括:The method according to claim 1, wherein the reclaiming the memory storing the first control comprises:
    在释放所述第一控件后、间隔预设时间执行回收存储所述第一控件的内存的操作。After the first control is released, the operation of reclaiming the memory of the first control is performed at an interval preset time.
  3. 根据权利要求2所述的方法,其特征在于,所述方法还包括:The method of claim 2, wherein the method further comprises:
    当在释放所述第一控件后、间隔的所述预设时间到达之前,确定存在新数据将显示于所述显示界面时,使用所述第一控件承载所述新数据,保存所述第一控件与所述新数据的对应关系。When it is determined that there is new data to be displayed on the display interface after the first control is released, before the preset time is reached, the first control is used to carry the new data, and the first data is saved. The correspondence between the control and the new data.
  4. 根据权利要求1所述的方法,其特征在于,所述显示界面的显示数据包括第一显示数据和第二显示数据,所述方法还包括:The method according to claim 1, wherein the display data of the display interface comprises first display data and second display data, the method further comprising:
    当检测到针对所述显示界面的第一显示数据的移动操作,根据所述移动操作将所述移动操作对应的第一显示数据从所述显示界面的第一位置移动到第二位置;When detecting a movement operation of the first display data for the display interface, moving the first display data corresponding to the movement operation from the first position to the second position of the display interface according to the moving operation;
    则所述确定所述显示界面的显示数据发生变化包括:Then determining that the display data of the display interface changes comprises:
    当检测到所述显示界面的第一显示数据的移动操作且根据所述移动操作将所述移动操作对应的第一显示数据从所述显示界面的第一位置移动到第二位置时,确定所述显示界面的显示数据发生变化。 When the moving operation of the first display data of the display interface is detected and the first display data corresponding to the moving operation is moved from the first position to the second position of the display interface according to the moving operation, determining The display data of the display interface changes.
  5. 根据权利要求4所述的方法,其特征在于,所述根据所述移动操作将所述移动操作对应的第一显示数据从所述显示界面的第一位置移动到第二位置包括:The method according to claim 4, wherein the moving the first display data corresponding to the moving operation from the first position to the second position of the display interface according to the moving operation comprises:
    创建第二控件,利用所述第二控件承载所述移动操作对应的第一显示数据;Creating a second control, and using the second control to carry the first display data corresponding to the moving operation;
    将所述显示界面显示的所述第二显示数据分割为M个可移动单元,其中,每个可移动单元对应的数据由一个控件单独承载,M为正整数;The second display data displayed by the display interface is divided into M movable units, wherein data corresponding to each movable unit is separately carried by one control, and M is a positive integer;
    控制所述第二控件在所述M个可移动单元中间移动;Controlling the second control to move between the M movable units;
    在所述第二控件移动结束之后,释放所述第二控件,解除所述第二控件与所述第二控件承载的第一显示数据之间的对应关系,将所述第二控件从所述显示界面中移除,回收存储所述第二控件的内存;After the second control is moved, the second control is released, and the correspondence between the second control and the first display data carried by the second control is released, and the second control is The display interface is removed, and the memory of the second control is reclaimed;
    使用第三控件承载所述第一显示数据,以使得所述第一显示数据显示于所述显示界面上。The first display data is carried by using a third control such that the first display data is displayed on the display interface.
  6. 根据权利要求5所述的方法,其特征在于,在创建第二控件之前,所述方法还包括:The method of claim 5, wherein before the creating the second control, the method further comprises:
    将所述第三控件的显示属性由显示设置为隐藏;其中,在检测到针对所述显示界面的第一显示数据的移动操作之前,所述第一显示数据由所述第三控件承载;Setting the display attribute of the third control to be hidden from the display; wherein, before detecting the moving operation of the first display data for the display interface, the first display data is carried by the third control;
    所述使用第三控件承载所述第一显示数据,以使得所述第一显示数据显示于所述显示界面上包括:The displaying, by the third control, the first display data, so that the displaying the first display data on the display interface comprises:
    将所述第三控件的显示属性由隐藏设置为显示,使用所述第三控件承载所述第一显示数据,以使得所述第一显示数据显示于所述显示界面上。Setting the display attribute of the third control to be displayed by hiding, using the third control to carry the first display data, so that the first display data is displayed on the display interface.
  7. 根据权利要求5所述的方法,其特征在于,在创建第二控件之前,所述方法还包括:The method of claim 5, wherein before the creating the second control, the method further comprises:
    释放第四控件,解除所述第四控件与所述第一显示数据之间的对应关系,将所述第四控件从所述显示界面中移除,回收存储所述第四控件的内存;其中,在检测到针对所述显示界面的第一显示数据的移动操作之前,所述第一显示数据由所述第四控件承载;Release a fourth control, cancel the correspondence between the fourth control and the first display data, remove the fourth control from the display interface, and recycle the memory of the fourth control; Before the moving operation of the first display data for the display interface is detected, the first display data is carried by the fourth control;
    所述使用第三控件承载所述第一显示数据,以使得所述第一显示数据显示于所述显示界面上包括: The displaying, by the third control, the first display data, so that the displaying the first display data on the display interface comprises:
    创建第三控件,使用所述第三控件承载所述第一显示数据,保存所述第三控件与所述第一显示数据的对应关系,以使得所述第一显示数据显示于所述显示界面上。Creating a third control, using the third control to carry the first display data, and saving a correspondence between the third control and the first display data, so that the first display data is displayed on the display interface on.
  8. 根据权利要求5所述的方法,其特征在于,所述方法还包括:The method of claim 5, wherein the method further comprises:
    在所述第二控件移动结束之后,合并承载所述显示界面的文字数据的多个控件。After the second control moves, the plurality of controls carrying the text data of the display interface are merged.
  9. 根据权利要求5所述的方法,其特征在于,所述将所述显示界面显示的第二显示数据分割为M个可移动单元包括:The method according to claim 5, wherein the dividing the second display data displayed by the display interface into M movable units comprises:
    当所述第一显示数据为图片数据时,将所述第二显示数据以行为单位进行分割,进而将所述第二显示数据分割为所述M个可移动单元;和/或When the first display data is picture data, segmenting the second display data in units of rows, thereby dividing the second display data into the M movable units; and/or
    当所述第一显示数据为文字数据时将所述第二显示数据以字为单位进行分割,进而将所述第二显示数据分割为所述M个可移动单元。When the first display data is text data, the second display data is divided into units of words, and the second display data is further divided into the M movable units.
  10. 根据权利要求5-9任意一项所述的方法,其特征在于,在创建第二控件之前,所述方法还包括:The method according to any one of claims 5-9, wherein before the creating the second control, the method further comprises:
    将所述第一显示数据由第一尺寸缩小为第二尺寸;Reducing the first display data from a first size to a second size;
    在所述第二控件移动结束之后,所述方法还包括:After the second control moves, the method further includes:
    将所述第一显示数据由所述第二尺寸放大为所述第一尺寸。The first display data is enlarged from the second size to the first size.
  11. 一种控制装置,其特征在于,所述控制装置应用于电子设备中,所述电子设备的显示单元上显示有电子便签应用程序的显示界面,所述显示界面上的显示数据由一个或多个控件承载,所述控件与所述控件承载的数据之间具有对应关系,所述一个或多个控件包括第一控件,所述装置包括:A control device is applied to an electronic device, wherein a display interface of an electronic note application is displayed on a display unit of the electronic device, and display data on the display interface is composed of one or more The control device bears a correspondence between the control and the data carried by the control, the one or more controls include a first control, and the device includes:
    确定模块,用于确定所述显示界面的显示数据是否发生变化;a determining module, configured to determine whether display data of the display interface changes;
    判断模块,用于在确定所述显示界面的显示数据发生变化时,判断所述第一控件所承载的数据是否显示于所述显示界面中;a determining module, configured to determine whether data carried by the first control is displayed in the display interface when determining that the display data of the display interface changes;
    第一释放模块,用于当判断所述第一控件所承载的数据不再显示于所述显示界面时,释放所述第一控件,解除所述第一控件与所述第一控件承载的数据之间的对应关系,将所述第一控件从所述显示界面中移除,回收存储所述第一控件的内存。a first release module, configured to release the first control and release data carried by the first control and the first control when determining that data carried by the first control is no longer displayed on the display interface Corresponding relationship between the first control is removed from the display interface, and the memory of the first control is reclaimed.
  12. 根据权利要求11所述的装置,其特征在于,所述第一释放模块具体用于: The device according to claim 11, wherein the first release module is specifically configured to:
    在释放所述第一控件后、间隔预设时间执行回收存储所述第一控件的内存的操作。After the first control is released, the operation of reclaiming the memory of the first control is performed at an interval preset time.
  13. 根据权利要求12所述的装置,其特征在于,所述装置还包括:The device of claim 12, wherein the device further comprises:
    复用模块,用于当在释放所述第一控件后、间隔的所述预设时间到达之前,确定存在新数据将显示于所述显示界面时,使用所述第一控件承载所述新数据,保存所述第一控件与所述新数据的对应关系。a multiplexing module, configured to use the first control to carry the new data when it is determined that there is new data to be displayed on the display interface after the first control is released and before the preset time of the interval is reached And storing a correspondence between the first control and the new data.
  14. 根据权利要求11所述的装置,其特征在于,所述装置还包括:The device according to claim 11, wherein the device further comprises:
    检测模块,用于检测针对所述显示界面的第一显示数据的移动操作;其中,所述显示界面的显示数据包括第一显示数据和第二显示数据;a detecting module, configured to detect a moving operation of the first display data for the display interface, where the display data of the display interface includes first display data and second display data;
    移动模块,用于当检测到针对所述显示界面的第一显示数据的移动操作,根据所述移动操作将所述移动操作对应的第一显示数据从所述显示界面的第一位置移动到第二位置;a moving module, configured to: when the moving operation of the first display data for the display interface is detected, move the first display data corresponding to the moving operation from the first position of the display interface to the first Two positions
    则所述确定模块具体用于:The determining module is specifically configured to:
    当检测到所述显示界面的第一显示数据的移动操作且根据所述移动操作将所述移动操作对应的第一显示数据从所述显示界面的第一位置移动到第二位置时,确定所述显示界面的显示数据发生变化。When the moving operation of the first display data of the display interface is detected and the first display data corresponding to the moving operation is moved from the first position to the second position of the display interface according to the moving operation, determining The display data of the display interface changes.
  15. 根据权利要求14所述的装置,其特征在于,所述移动模块包括:The device of claim 14, wherein the mobile module comprises:
    第一创建子模块,用于创建第二控件,利用所述第二控件承载所述移动操作对应的第一显示数据;a first creating sub-module, configured to create a second control, and use the second control to carry first display data corresponding to the moving operation;
    分割子模块,用于将所述显示界面显示的第二显示数据分割为M个可移动单元,其中,每个可移动单元对应的数据由一个控件单独承载,M为正整数;a dividing sub-module, configured to divide the second display data displayed by the display interface into M movable units, wherein data corresponding to each movable unit is separately carried by a control, and M is a positive integer;
    控制子模块,用于控制所述第二控件在所述M个可移动单元中间移动;a control submodule, configured to control the second control to move between the M movable units;
    释放子模块,用于在所述第二控件移动结束之后,释放所述第二控件,解除所述第二控件与所述第二控件承载的第一显示数据之间的对应关系,将所述第二控件从所述显示界面中移除,回收存储所述第二控件的内存;a releasing submodule, configured to release the second control after the second control moves, and release a correspondence between the second control and the first display data carried by the second control, The second control is removed from the display interface, and the memory of the second control is reclaimed;
    承载子模块,用于使用第三控件承载所述第一显示数据,以使得所述第一显示数据显示于所述显示界面上。And a carrying submodule, configured to carry the first display data by using a third control, so that the first display data is displayed on the display interface.
  16. 根据权利要求15所述的装置,其特征在于,所述装置还包括: The device according to claim 15, wherein the device further comprises:
    隐藏子模块,用于在创建第二控件之前,将第三控件的显示属性由显示设置为隐藏,其中,在检测到针对所述显示界面的第一显示数据的移动操作之前,所述第一显示数据由所述第三控件承载;a hiding submodule configured to set a display property of the third control to be hidden from being displayed before the second control is created, wherein the first is before the moving operation of the first display data for the display interface is detected Display data is carried by the third control;
    所述承载子模块具体用于:The carrier submodule is specifically configured to:
    将所述第三控件的显示属性由隐藏设置为显示,使用所述第三控件承载所述第一显示数据,以使得所述第一显示数据显示于所述显示界面上。Setting the display attribute of the third control to be displayed by hiding, using the third control to carry the first display data, so that the first display data is displayed on the display interface.
  17. 根据权利要求15所述的装置,其特征在于,所述装置还包括:The device according to claim 15, wherein the device further comprises:
    第二释放模块,用于在创建第二控件之前,释放第四控件,解除所述第四控件与所述第一显示数据之间的对应关系,将所述第四控件从所述显示界面中移除,回收存储所述第四控件的内存;其中,在检测到针对所述显示界面的第一显示数据的移动操作之前,所述第一显示数据由所述第四控件承载;a second release module, configured to: before the second control is created, release the fourth control, release the correspondence between the fourth control and the first display data, and use the fourth control from the display interface Removing, reclaiming memory of the fourth control; wherein, before detecting a moving operation of the first display data for the display interface, the first display data is carried by the fourth control;
    所述承载子模块具体用于:The carrier submodule is specifically configured to:
    创建第三控件,使用所述第三控件承载所述第一显示数据,保存所述第三控件与所述第一显示数据的对应关系,以使得所述第一显示数据显示于所述显示界面上。Creating a third control, using the third control to carry the first display data, and saving a correspondence between the third control and the first display data, so that the first display data is displayed on the display interface on.
  18. 根据权利要求15所述的装置,其特征在于,所述装置还包括:The device according to claim 15, wherein the device further comprises:
    合并模块,用于在所述第二控件移动结束之后,合并承载所述显示界面的文字数据的多个控件。And a merging module, configured to merge the plurality of controls that carry the text data of the display interface after the second control moves.
  19. 根据权利要求15所述的装置,其特征在于,所述分割子模块包括:The device according to claim 15, wherein the segmentation sub-module comprises:
    第一分割子模块,用于当所述第一显示数据为图片数据时,将所述第二显示数据以行为单位进行分割,进而将所述第二显示数据分割为所述M个可移动单元;和/或a first segmentation submodule, configured to divide the second display data into units of behavior when the first display data is picture data, and further divide the second display data into the M movable units ;and / or
    第二分割子模块,用于当所述第一显示数据为文字数据时将所述第二显示数据以字为单位进行分割,进而将所述第二显示数据分割为所述M个可移动单元。a second segmentation sub-module, configured to divide the second display data into words in units of words when the first display data is text data, and further divide the second display data into the M movable units .
  20. 一种电子设备,其特征在于,所述电子设备的显示单元上显示有电子便签应用程序的显示界面,所述显示界面上的显示数据由一个或多个控件承载,所述控件与所述控件承载的数据之间具有对应关系,所述一个或多个控件包括第一控件,所述电子设备还包括: An electronic device, wherein a display interface of an electronic note application is displayed on a display unit of the electronic device, and display data on the display interface is carried by one or more controls, and the control and the control The one or more controls include a first control, and the electronic device further includes:
    确定单元,用于确定所述显示界面的显示数据是否发生变化;a determining unit, configured to determine whether display data of the display interface changes;
    判断单元,用于在确定所述显示界面的显示数据发生变化时,判断所述第一控件所承载的数据是否显示于所述显示界面中;a determining unit, configured to determine, when the display data of the display interface changes, whether data carried by the first control is displayed in the display interface;
    第一释放单元,用于当判断所述第一控件所承载的数据不再显示于所述显示界面时,释放所述第一控件,解除所述第一控件与所述第一控件承载的数据之间的对应关系,将所述第一控件从所述显示界面中移除,回收存储所述第一控件的内存。 a first release unit, configured to release the first control and release data carried by the first control and the first control when determining that data carried by the first control is no longer displayed on the display interface Corresponding relationship between the first control is removed from the display interface, and the memory of the first control is reclaimed.
PCT/CN2015/075225 2015-02-16 2015-03-27 Control method, control apparatus and electronic device WO2016131207A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510084989.3 2015-02-16
CN201510084989 2015-02-16

Publications (1)

Publication Number Publication Date
WO2016131207A1 true WO2016131207A1 (en) 2016-08-25

Family

ID=53912050

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/075225 WO2016131207A1 (en) 2015-02-16 2015-03-27 Control method, control apparatus and electronic device

Country Status (2)

Country Link
CN (3) CN106155506B (en)
WO (1) WO2016131207A1 (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10970646B2 (en) 2015-10-01 2021-04-06 Google Llc Action suggestions for user-selected content
US10055390B2 (en) * 2015-11-18 2018-08-21 Google Llc Simulated hyperlinks on a mobile device based on user intent and a centered selection of text
CN105892869A (en) * 2016-04-28 2016-08-24 北京小米移动软件有限公司 Image position adjusting method and device
CN105976414A (en) * 2016-04-28 2016-09-28 北京小米移动软件有限公司 Picture position editing method and picture position editing device
CN105975188B (en) * 2016-04-28 2020-07-03 北京小米移动软件有限公司 Picture position adjusting method and device
CN105975205A (en) * 2016-04-29 2016-09-28 乐视控股(北京)有限公司 Method and device for editing picture in note application, and mobile terminal
CN107515718A (en) * 2016-06-15 2017-12-26 腾讯科技(深圳)有限公司 Resource control method, server and user terminal
CN107885439B (en) * 2017-12-01 2020-06-26 维沃移动通信有限公司 Note segmentation method and mobile terminal
CN108205459A (en) * 2018-02-07 2018-06-26 苏州本乔信息技术有限公司 A kind of merging display methods and system for visualizing data resource
CN110737383B (en) * 2019-09-30 2021-06-18 广州视源电子科技股份有限公司 Element adding method and device and electronic equipment
CN112035031B (en) * 2020-08-31 2022-03-11 北京小米松果电子有限公司 Note generation method and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103336691A (en) * 2013-06-29 2013-10-02 安科智慧城市技术(中国)有限公司 Dynamic layout method and system based on Android
CN104166541A (en) * 2013-05-17 2014-11-26 阿里巴巴集团控股有限公司 Method and device for updating measured control library

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5039911B2 (en) * 2000-10-11 2012-10-03 インターナショナル・ビジネス・マシーンズ・コーポレーション Data processing device, input / output device, touch panel control method, storage medium, and program transmission device
US20070061780A1 (en) * 2005-08-29 2007-03-15 Microsoft Corporation Enterprise resource planning system test framework
US8683317B2 (en) * 2009-09-23 2014-03-25 Fisher-Rosemount Systems, Inc. Dynamically linked graphical messages for process control systems
CN102377853B (en) * 2010-08-25 2014-10-22 中兴通讯股份有限公司 Management device and method for application, interface window and service of mobile terminal
CN102156716B (en) * 2010-12-02 2013-01-02 广州市动景计算机科技有限公司 Method and device for re-typesetting web page
CN103365532A (en) * 2012-04-11 2013-10-23 中兴通讯股份有限公司 Change method and change system of terminal application display
KR20150009036A (en) * 2013-07-10 2015-01-26 삼성전자주식회사 Method and apparatus for processing a memo in electronic device having a touch device
CN103488392A (en) * 2013-09-03 2014-01-01 小米科技有限责任公司 Editing method and device used for editable content of touch screen, and terminal

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104166541A (en) * 2013-05-17 2014-11-26 阿里巴巴集团控股有限公司 Method and device for updating measured control library
CN103336691A (en) * 2013-06-29 2013-10-02 安科智慧城市技术(中国)有限公司 Dynamic layout method and system based on Android

Also Published As

Publication number Publication date
CN104866206B (en) 2018-06-19
CN104866182B (en) 2018-05-18
CN104866206A (en) 2015-08-26
CN106155506A (en) 2016-11-23
CN106155506B (en) 2019-02-01
CN104866182A (en) 2015-08-26

Similar Documents

Publication Publication Date Title
WO2016131207A1 (en) Control method, control apparatus and electronic device
US11301126B2 (en) Icon control method and terminal
JP5982369B2 (en) Folder operation method and apparatus in touch-sensitive device
EP2613286A1 (en) Mobile terminal and message-based conversation operation method for the same
KR101329584B1 (en) Multi-touch method of providing text block editing, and computer-readable recording medium for the same
TW201600980A (en) Manage event on calendar with timeline
US20150278983A1 (en) Terminal apparatus, electronic whiteboard system, input assist method for electronic whiteboard, and medium
CN103597437A (en) Method and apparatus for controlling a display of multimedia content using a timeline-based interface
KR101586559B1 (en) Information processing apparatus and information processing method
JP2013127794A (en) Multi-touch interaction providing method and device of portable terminal
JP2013175180A (en) Device and method for changing application
WO2022194004A1 (en) Application icon arrangement method and apparatus, and electronic device
US9305523B2 (en) Method of editing contents and an electronic device therefor
US20140215393A1 (en) Touch-based multiple selection
CN106716332A (en) Gesture navigation for secondary user interface
WO2021027485A9 (en) Information processing method and apparatus, storage medium, and electronic device
WO2015196976A1 (en) Method and system for optimization of sliding performance of asynchronously loaded data, and mobile terminal
US9229604B2 (en) User interface element
CN102693064B (en) Method and system for quitting protection screen by terminal
KR20150025105A (en) Method and apparatus for operating input function in a electronic device
EP2708999A2 (en) Method for editing display information and electronic device thereof
TW201913299A (en) Method for operating terminal device, apparatus, and electronic device
WO2022143337A1 (en) Display control method and apparatus, and electronic device and storage medium
CN105808516B (en) Information processing method and electronic equipment
JP5768187B2 (en) Method and apparatus for executing a move operation on an area in a table

Legal Events

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

Ref document number: 15882346

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15882346

Country of ref document: EP

Kind code of ref document: A1