(The control interfaces provided by widgets in the androidrom specification are very limited. This can be seen from the few files in the source code. I think widget programs are important in mobile phone programs, Because multitasking in the current system does not represent the difficulty of multiple windows in front of us (if you can't find out, please study it again): 1. There are few controls and functions that widgets can support. But I carefully looked at each part of the program and found a breakthrough -- LayoutAnimation, Layout? you 're right! That's it! When a layout is loaded, the system will automatically play a certain set layout animation element. With direction, there are new difficulties (hey hey, this is a natural rule): 1. How can I make the Layout image freely set? Layout scenery can only be defined in a layout. A: Put an image in a LinearLayout, and you can control the animation picture by setting an image. 2. The rule of LayoutAnimation is that the animation process becomes fully displayed after playing, so the original hidden picture will be revealed? A: I'm stuck -- hold it! 1lt;? xmlversion=1.0encoding=utf-8? gt; 2lt; setxmlns:android=schemas. android/apk/res/android3android:interpolator=@android:anim/accelerate_ interpolatorgt; 4lt; translateandroid:fromYDelta=0android:toYDelta=100Zndroid:toXDelta=0android:duration=1500/gt; 6lt; alphaandroid:fromAlpha=1.0android:toAlpha=1.07android:duration=6000000gt; lt;/ alphagt; 8lt;/ setgt; Look at the definition above: the translate action moves the original picture down gradually. It's important to see the alpha part from Alpha=1.0 android: toAlpha=1.0//I'm dizzy. I haven't done any office work? Android: duration=6000000//Maintain such a long term? That's right. In this way, the picture will be permanently stuck outside the viewing area. 3. The playback of LayoutAnimation is only performed when it is loaded for the first time. Isn't it only played once? Answer: Use two identical Layouts with different names (for example: a, b). Each time you rewrite and replace them, they will play forever. I'm satisfied, but the office is not finished yet: using the above knowledge, you can design and combine actions to achieve the purpose of animation, Of course, the design action still requires a good use of your mind, Let me start with one: use setImageViewUri to set pictures. The uri can point to a file. Of course, the simplest is the file on the SD card
AnimationWidget\bin\AnimationWidget\com\AnimationService$1.class
AnimationWidget\bin\AnimationWidget\com\AnimationService.class
AnimationWidget\bin\AnimationWidget\com\AnimationWidget.class
AnimationWidget\bin\AnimationWidget\com\R$anim.class
AnimationWidget\bin\AnimationWidget\com\R$attr.class
AnimationWidget\bin\AnimationWidget\com\R$drawable.class
AnimationWidget\bin\AnimationWidget\com\R$id.class
AnimationWidget\bin\AnimationWidget\com\R$layout.class
AnimationWidget\bin\AnimationWidget\com\R$string.class
AnimationWidget\bin\AnimationWidget\com\R$xml.class
AnimationWidget\bin\AnimationWidget\com\R.class
AnimationWidget\bin\AnimationWidget.apk
AnimationWidget\bin\classes.dex
AnimationWidget\bin\resources.ap_
AnimationWidget\gen\AnimationWidget\com\R.java
AnimationWidget\res\anim\in_ move.xml
AnimationWidget\res\anim\out_ move.xml
AnimationWidget\res\anim\set_ move_ in.xml
AnimationWidget\res\anim\set_ move_ out.xml
AnimationWidget\res\drawable\edit_ focused_ theme_ black.png
AnimationWidget\res\drawable\edit_ over_ theme_ blac)