there are only five animations for android? how can i extend this feature

by LemonDev » Wed, 02 Sep 2009 10:16:27 GMT


Sponsored Links
 as we known we can use predefined animations in android
developing, they are : alpha animation, scale animation, rotate
animation, translate animation and skew animation(extend animation
using Matrix's setSkew function).  though ,we can implement other
effect using the Matrix, but it can only realize some shape
transformations(i think the real color pixels don't changed).
    If i want to make some effects like "blur" , it can't work,because
animation only give the transformation matrix . we can't not
manipulate the color pixels.
    Please do me a favor, how can i realize effect like "blur" ?

--~--~---------~--~----~------------~-------~--~----~



there are only five animations for android? how can i extend this feature

by LemonDev » Wed, 02 Sep 2009 11:10:05 GMT


 thanks. you mean i can't use the Animation object anymore, and i
should do the "blur" in my code .
but the problem is i don't use the "blur" separately: i want  to mix
the blur , scale and alpha , so i need to code the "scale"
and "alpha" myself ?
   the android use Skia to draw bitmap, so weather i can modify the
framework to invoke a blurfilter in skia? it seems a big workload, any
advice is appreciated !




--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


there are only five animations for android? how can i extend this feature

by Timothy F » Thu, 03 Sep 2009 02:54:23 GMT


 The animations don't do anything to the bitmap, per se.  For every
"tick" of the animation, the method getTransformation is called on
each Animation so that it can return a Transformation that describes
an affine transformation and an alpha value.  If you want to do more
than those two things you can use the getTransformation method as a
hook to do other things during the animation, such as change the
background colour of a View.  If you want something more complex than
that, such as blurring the image (which is not an affine
transformation), you'll need to start looking at Canvas and Paint and
overriding the onDraw method.





--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. MapView out of memory exception workaround

Map view has a memory leak which was discussed in this thread :
http://code.google.com/p/android/issues/detail?id=2181 .

Has it be resolved? Else is there any other workaround for the same?

-- 

2. Put EditText on top of WebView

Hi guys,

I have been trying to mimic the behavior of the android browser with
the scrolling of the address bar on top of the WebView. If you notice,
if the user scrolls down, the address bar "moves" up with the WebView
(but the WebView doesn't scroll). Only when the address bar disappears
completely the WebView starts to scroll. At first I tried to override
the onScrollChanged method of WebView, and got something but it wasn't
as smooth as the desired goal.

I also noticed in the docs that WebView inherits from AbsoluteLayout,
so I treated the WebView in my main.xml as a Layout and put inside the
address bar layout - now it scrolls but the WebView's browser is not
being presented well, and it's partly obscured by the address bar.

What do you think?

Thanks

-- 

3. Fwd: Radio Waves

4. Upload youtube videos by intent

5. WebView and Linear Layout

6. Connect WEB SQL SERVER 2005 Using WEB SERVICE

7. App capable of uninstalling itself