CN101833447B - Method for realizing desktop Widget animation by using tweening animation - Google Patents

Method for realizing desktop Widget animation by using tweening animation Download PDF

Info

Publication number
CN101833447B
CN101833447B CN 201010144675 CN201010144675A CN101833447B CN 101833447 B CN101833447 B CN 101833447B CN 201010144675 CN201010144675 CN 201010144675 CN 201010144675 A CN201010144675 A CN 201010144675A CN 101833447 B CN101833447 B CN 101833447B
Authority
CN
China
Prior art keywords
animation
layout
effect
widget
definition
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN 201010144675
Other languages
Chinese (zh)
Other versions
CN101833447A (en
Inventor
姜磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN 201010144675 priority Critical patent/CN101833447B/en
Publication of CN101833447A publication Critical patent/CN101833447A/en
Application granted granted Critical
Publication of CN101833447B publication Critical patent/CN101833447B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method for realizing a desktop Widget animation by using a tweening animation, which is applied to an Android development platform. The method comprises the following steps of: defining the animation effect N and the layout n of the tweening animation; assigning the tweening animation in a layout Animation attribute of a layout object in the layout; and using a switching Widget layout to ensure that the tweening animation on the layout object in the layout has an effect, the animation on the layout object acts on a child control in the layout object so as to realize the Android desktop Widget animation. Compared with the prior art, the method continuously changes pictures in an image view through a remote view object to generate an animation effect, can simply and effectively realize an animation with a changing transparence, an animation with a moving position, a rotation animation, a zooming animation and an animation generated after the combination of the types of the animations.

Description

Animation was realized the desktop widget cartoon method between a kind of utilization was mended
Technical field
The present invention relates to a kind of realization desktop widget cartoon method, particularly relate to a kind of between utilize mending on the standard A ndroid development platform animation realize the desktop widget cartoon method.
Background technology:
The use of the Android operating system that Google releases becomes more and more popular, especially in the application of smart mobile phone.Android SDK (abbreviation of Software Development Kit, i.e. SDK) lets exploitation Android platform application software become and is easy to, and rich and varied application program has also been accelerated the popularization of Android system in product.And the desktop widget of Android (is the visual small tool that a kind of user/system can be mutual; Such instrument provides the service of single goal; Picture shows news, weather forecast, clock, stock information, calendar function etc.) also make the desktop of Android system become colourful; User/system can self-defined desktop, puts the little plug-in unit of different Widget as required.But be subject to the degree of support of Android SDK to the Widget application development, can not be as freely the element on the interface being controlled the exploitation Activity application program.If user/system thinks about it that the effect that realization such as animation is the same on Widget can be very difficult.
Under the present technology, for realizing the Widget animation effect, the picture of ceaselessly changing among the Image View (image views) through Remote Views (remote view object) produces animation effect.The method not only expends system resource very much, and the animation effect that produces is undesirable, is difficult to the animation of realizing that some are complicated, as to have relatively high expectations.In addition, in the process of Widget animation, if define the layout animation in advance on the layout object in the Widget layout, then can be when layout be plotted to the interface for the first time to the child control generation effect of layout object.But, only be the data of interface element to be upgraded after this through the Widget frame mechanism if interface layout no longer changes, no longer generation effect of the animation that defines on the layout object.
Summary of the invention:
The objective of the invention is to overcome the deficiency of prior art; Animation realization desktop widget cartoon method between a kind of utilization benefit is provided; Be applied on the standard Google Android SDK development platform; Solved effectively when exploitation Android desktop widget application program, realized the problem that animation effect is difficult.
In order to achieve the above object; The technical scheme that the present invention adopts is: animation was realized the desktop widget cartoon method between a kind of utilization was mended; When exploitation Android desktop widget application program; In resource, define animation between benefit (animation refers to the Tween Animation in the Android SDK development platform between benefit, the initial frame and the end frame of definition animation, middle the interpolation frame of animation is drawn by the automatic computing of computing machine) also with the layout animation attributes of the layout object of this animation assignment in layout.In the operation, make animation generation effect between the benefit on the layout object in the layout through switching the Widget layout, the animation on the layout object acts on the child control in the layout object, realizes the colourful animation of Android desktop widget with this.
Animation was realized the desktop widget cartoon method between a kind of utilization was mended, and its step is following:
Step 1 is added the animation effect of animation between mending and the definition of layout in the resource of Android system, the animation effect of animation and the layout that comprises animation effect between definition is mended;
Step 2, the current layout of Widget is waited for the generation of customer incident or system event;
Step 3, customer incident or system event need produce certain animation effect N;
Step 4, the animation effect N that system's judges incident or system event need produce;
Step 5 judges whether the layout n that comprises animation effect N is the same with current layout;
Step 6, the layout n that comprises animation effect N is the same with current layout, then switches to the layout different with layout n;
Step 7; The layout n and the current layout that comprise animation effect N are different; Then switch to layout n; The animation definition that the layout animation attributes directed towards user of the layout object among the layout n or system are required, this animation will be to the child control generation effect in the layout object, and the animation effect of child control is the required animation of user or system;
Step 8 switches to the layout n that comprises animation effect N, and the Widget interface is upgraded, and the layout animation attributes of layout object animation generation effect pointed in the layout produces animation effect N.
Child control is the control that Widget supported.
Compared with prior art, the invention has the beneficial effects as follows: solved the problem of implementation of Android desktop widget animation effectively, can be applied to all Android versions of issue at present.The present invention connects in Widget application program inner room and has called animation between Android system benefit; When the developer writes application program; Only need the definition animation; Animation is realized by the Android system, can realize transparency change animation, position mobile animation, rotation animation, convergent-divergent animation and this several kinds of animations that animation combination back produces more satisfactoryly.
Description of drawings:
Fig. 1 utilizes the process flow diagram of animation realization desktop widget animation between benefit for the present invention.
Embodiment:
Be elaborated with reference to accompanying drawing below in conjunction with embodiment, so that technical characterictic of the present invention and advantage are carried out more deep annotation.
Animation was realized the desktop widget cartoon method between a kind of utilization was mended, and when exploitation Android desktop widget application program, in resource, defined animation between benefit, and with the layout animation attributes of the layout object of this animation assignment in layout.In the operation, make animation generation effect between the benefit on the layout object in the layout through switching the Widget layout, the animation on the layout object acts on the child control in the layout object, realizes the animation of Android desktop widget with this.
The present invention utilizes the process flow diagram of animation realization desktop widget animation between benefit as shown in Figure 1.After resources definition is good, in the Widget application program, produce the Widget animation effect, its step is following:
Step 1 is added the animation effect of animation between mending and the definition of layout in the resource of Android system, the animation effect of animation and the layout that comprises animation effect between definition is mended;
Step 2, the current layout of Widget is waited for the generation of customer incident or system event;
Step 3, customer incident or system event need produce certain animation effect N;
Step 4, the animation effect N that system's judges incident or system event need produce;
Step 5 judges whether the layout n that comprises animation effect N is the same with current layout;
Step 6, the layout n that comprises animation effect N is the same with current layout, then switches to the layout different with layout n;
Step 7; The layout n and the current layout that comprise animation effect N are different; Then switch to layout n; The animation definition that the layout animation attributes directed towards user of the layout object among the layout n or system are required, this animation will be to the child control generation effect in the layout object, and the animation effect of child control is the required animation of user or system;
Step 8 switches to the layout n that comprises animation effect N, and the Widget interface is upgraded, and the layout animation attributes of layout object animation generation effect pointed in the layout produces animation effect N.
Child control is the control that Widget supported.
In practical operation, the animation effect and the layout of animation between the benefit that needs in the Widget application program engineering defined.
Animation is through the XML (abbreviation of Extensible Markup Language between benefit; Be extend markup language) animation between the benefit of document definition; Can define one or more animations; The transparency change animation that each animation is supported for the Android system, position mobile animation, rotation animation, convergent-divergent animation one or more, or the combination between them, such as: the animation 1 of definition; With the animation of an XML document definition, be transparency change animation, position mobile animation, rotation animation, convergent-divergent animation one; The animation 2 of definition with the animation of an XML document definition, is transparency change animation, position mobile animation, rotation animation, convergent-divergent animation one; The animation 3 of definition with the animation of an XML document definition, is transparency change animation, position mobile animation, rotation animation, convergent-divergent animation one; The animation N of definition with the animation of an XML document definition, is transparency change animation, position mobile animation, rotates the one or more of animation, convergent-divergent animation, or the combination between them.
Animation comprises one or more layouts through the layout of XML document definition between benefit.Produce in the layout of animation effect at needs, the layout animation attributes of layout object is set at a kind of in the animation that defines in the animation between benefit.The layout object here is the layout object that Widget supported, like frame layout, linear placement and relative layout, or the combination between them, the animation that the layout animation attributes of these layout objects is pointed to will act on the child control in the layout object.Definition and layout is following: the layout 1 of definition is one of layout object of supporting of Widget; The layout 2 of definition is one of layout object of supporting of Widget; The layout 3 of definition is one of layout object of supporting of Widget; The layout n of definition is the combination between one of layout object of supporting of Widget or they.
Through the description of above embodiment, those skilled in the art can be well understood to the present invention can be implemented in call on the Android desktop widget Android system mend between animation, produce good Widget animation effect.
Although the present invention has made clear and complete description through specific embodiment to it; But invention is not limited only to said embodiment; And to one skilled in the art, all improvement and the selection made based on the present invention are contingent and all be included in the present invention.

Claims (4)

1. one kind is utilized animation realization desktop widget cartoon method between benefit, is applied on the standard Google Android SDK development platform, and step is following:
Step 1, the animation effect of animation and the layout that comprises animation effect between definition is mended are added the animation effect of animation between mending and the definition of layout in the resource of Android system;
Step 2, the current layout of Widget is waited for the generation of customer incident or system event;
Step 3, customer incident or system event need produce certain animation effect N;
Step 4, the animation effect N that system's judges incident or system event need produce;
Step 5 judges whether the layout n that comprises animation effect N is the same with current layout;
Step 6, the layout n that comprises animation effect N is the same with current layout, then switches to the layout different with layout n;
Step 7; The layout n and the current layout that comprise animation effect N are different; Then switch to layout n; The animation definition that the layout animation attributes directed towards user of the layout object among the layout n or system are required, the animation that the layout animation attributes is pointed to will be to the child control generation effect in the layout object, and the animation effect of child control is the required animation of user or system;
Step 8 switches to and produces the layout n that comprises animation effect N, and the Widget interface is upgraded, and the layout animation attributes of layout object animation generation effect pointed in the layout produces animation effect N.
2. animation was realized the desktop widget cartoon method between utilization according to claim 1 was mended, and was characterised in that: described animation effect N comprises transparency change animation, position mobile animation, rotation animation, convergent-divergent animation and this several kinds of animations that animation combination back produces.
3. animation was realized the desktop widget cartoon method between utilization according to claim 1 was mended, and it is characterized in that: the layout object among the described layout n is that the layout object that Widget supported makes up the layout object that the back produces with these layout objects.
4. animation was realized the desktop widget cartoon method between utilization according to claim 1 was mended, and it is characterized in that: described child control is the control that Widget supported.
CN 201010144675 2010-04-08 2010-04-08 Method for realizing desktop Widget animation by using tweening animation Expired - Fee Related CN101833447B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010144675 CN101833447B (en) 2010-04-08 2010-04-08 Method for realizing desktop Widget animation by using tweening animation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010144675 CN101833447B (en) 2010-04-08 2010-04-08 Method for realizing desktop Widget animation by using tweening animation

Publications (2)

Publication Number Publication Date
CN101833447A CN101833447A (en) 2010-09-15
CN101833447B true CN101833447B (en) 2012-12-26

Family

ID=42717528

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010144675 Expired - Fee Related CN101833447B (en) 2010-04-08 2010-04-08 Method for realizing desktop Widget animation by using tweening animation

Country Status (1)

Country Link
CN (1) CN101833447B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102662755B (en) * 2012-05-11 2015-04-01 禹芙蓉 Android terminal and method for implementing screen locked animation
CN102724456B (en) * 2012-06-05 2016-04-06 深圳Tcl新技术有限公司 The OSD compression method that display terminal is applied based on Android and device
CN103021007B (en) * 2012-09-04 2016-01-13 小米科技有限责任公司 A kind of method that animation is play and device
CN104461256A (en) * 2014-12-30 2015-03-25 广州视源电子科技股份有限公司 Method and system for displaying interface elements
CN106157349B (en) * 2015-04-24 2019-06-25 苏宁易购集团股份有限公司 A kind of automatic generation method and automatic creation system of motion tweening
CN105719332B (en) 2016-01-20 2019-02-19 阿里巴巴集团控股有限公司 The implementation method and device of animation between color is mended
CN106843944B (en) * 2017-01-04 2020-08-25 武汉天喻教育科技有限公司 Host container and method for playing Flash in WPF

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1689046A (en) * 2003-05-09 2005-10-26 微软公司 System supporting animation of graphical display elements through animation object instances
CN101276376A (en) * 2007-03-30 2008-10-01 株式会社理光 Method and system to reproduce contents, and recording medium including program to reproduce contents

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6018343A (en) * 1996-09-27 2000-01-25 Timecruiser Computing Corp. Web calendar architecture and uses thereof
US7477254B2 (en) * 2005-07-13 2009-01-13 Microsoft Corporation Smooth transitions between animations
CN101577760A (en) * 2009-05-26 2009-11-11 深圳市融创天下科技发展有限公司 Method for playing animation when cell phone installed with KJAVA application software is networked

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1689046A (en) * 2003-05-09 2005-10-26 微软公司 System supporting animation of graphical display elements through animation object instances
CN101276376A (en) * 2007-03-30 2008-10-01 株式会社理光 Method and system to reproduce contents, and recording medium including program to reproduce contents

Also Published As

Publication number Publication date
CN101833447A (en) 2010-09-15

Similar Documents

Publication Publication Date Title
CN101833447B (en) Method for realizing desktop Widget animation by using tweening animation
US10775971B2 (en) Pinch gestures in a tile-based user interface
KR102324286B1 (en) Application interface management method and device
WO2020038168A1 (en) Content sharing method and device, terminal, and storage medium
US10551995B1 (en) Overlay user interface
CN107765959B (en) Background application program display method and terminal
CN109753326B (en) Processing method, device, equipment and machine readable medium
CN102937861B (en) For the shared edge of display environment
US20140279025A1 (en) Methods and apparatus for display of mobile advertising content
CN101834938A (en) Device and method for realizing horizontal/vertical screen switching of mobile terminal
US11868605B2 (en) Application bar display method and electronic device
Popp et al. Tool support for automated multi-device GUI generation from discourse-based communication models
CN103370689A (en) Cross-environment application compatibility
CN109144649A (en) Display methods, device, terminal and the storage medium of icon
CN109656445B (en) Content processing method, device, terminal and storage medium
CN102591659A (en) Implementation method for widget on main interface of mobile terminal and management method for widget
CN103927163A (en) Plugin frame processing device and plugin system
WO2019233280A1 (en) User interface display method and device, terminal and storage medium
CN104571877A (en) Display processing method and device for pages
CN107765773B (en) Method, device, terminal and storage medium for displaying information
CN104866182A (en) Movement method of picture data and mobile terminal
CN111796821A (en) Page updating method and device
US20210216177A1 (en) Navigation bar controlling method and terminal
CN111708959A (en) Page display method and device, storage medium and electronic equipment
CN111324398B (en) Method, device, terminal and storage medium for processing latest content

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: Changan Town, Guangdong province 523860 usha Beach Road Dongguan City, No. 18 Guangdong Oupo Mobile Communication Co Ltd

Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan Town, Guangdong province 523860 usha Beach Road Dongguan City, No. 18 Guangdong Oupo Mobile Communication Co Ltd

Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CP01 Change in the name or title of a patent holder
CP02 Change in the address of a patent holder

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan Town, Guangdong province 523860 usha Beach Road Dongguan City, No. 18 Guangdong Oupo Mobile Communication Co Ltd

Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CP02 Change in the address of a patent holder
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20121226