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. Building HelloWorld App problem java.lang.OutOfMemoryError: Java heap

Hello,

I am using Vista with jdk 1.6.7 with Eclipse and ADT and am having the
following error message when I try to build Android apps.
It looks like the keytool is generating the following error.

Any Ideas?

[2008-09-18 00:45:45 - HelloAndroid] Signing Key Creation: Exception
in thread "main" java.lang.OutOfMemoryError: Java heap space
[2008-09-18 00:45:45 - HelloAndroid] Signing Key Creation:      at
java.io.WinNTFileSystem.list(Native Method)
[2008-09-18 00:45:45 - HelloAndroid] Signing Key Creation:      at
java.io.File.list(Unknown Source)
[2008-09-18 00:45:45 - HelloAndroid] Signing Key Creation:      at
sun.security.provider.SeedGenerator$1.run(Unknown Source)
[2008-09-18 00:45:45 - HelloAndroid] Signing Key Creation:      at
java.security.AccessController.doPrivileged(Native Method)
[2008-09-18 00:45:45 - HelloAndroid] Signing Key Creation:      at
sun.security.provider.SeedGenerator.getSystemEntropy(Unknown Source)
[2008-09-18 00:45:45 - HelloAndroid] Signing Key Creation:      at
sun.security.provider.SecureRandom.engineNextBytes(Unknown Source)
[2008-09-18 00:45:45 - HelloAndroid] Signing Key Creation:      at
java.security.SecureRandom.nextBytes(Unknown Source)
[2008-09-18 00:45:45 - HelloAndroid] Signing Key Creation:      at
java.math.BigInteger.randomBits(Unknown Source)
[2008-09-18 00:45:45 - HelloAndroid] Signing Key Creation:      at
java.math.BigInteger.<init>(Unknown Source)
[2008-09-18 00:45:45 - HelloAndroid] Signing Key Creation:      at
java.math.BigInteger.largePrime(Unknown Source)
[2008-09-18 00:45:45 - HelloAndroid] Signing Key Creation:      at
java.math.BigInteger.probablePrime(Unknown Source)
[2008-09-18 00:45:45 - HelloAndroid] Signing Key Creation:      at
sun.security.rsa.RSAKeyPairGenerator.generateKeyPair(Unknown Source)
[2008-09-18 00:45:45 - HelloAndroid] Signing Key Creation:      at
java.security.KeyPairGenerator$Delegate.generateKeyPair(Unknown
Source)
[2008-09-18 00:45:45 - HelloAndroid] Signing Key Creation:      at
sun.security.x509.CertAndKeyGen.generate(Unknown Source)
[2008-09-18 00:45:45 - HelloAndroid] Signing Key Creation:      at
sun.security.tools.KeyTool.doGenKeyPair(Unknown Source)
[2008-09-18 00:45:45 - HelloAndroid] Signing Key Creation:      at
sun.security.tools.KeyTool.doCommands(Unknown Source)
[2008-09-18 00:45:45 - HelloAndroid] Signing Key Creation:      at
sun.security.tools.KeyTool.run(Unknown Source)
[2008-09-18 00:45:45 - HelloAndroid] Signing Key Creation:      at
sun.security.tools.KeyTool.main(Unknown Source)


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

2. What all do I need to begin programming in Android

Hello everyone!!!

I wanted to know what all I will be needing to begin programming with
android.
I have downloaded sdk 0.9 and a whole lot of test(which appears clumsy
& unhelpful)
Please help me out

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

3. Can Android be ported to other mobiles..??????(couple of questions)

4. Hello Android crashes

5. Parse JSON

6. Got the MapView loading, but the map is blank?

7. Vote for invitation for "Plusminus" to the HTC/T-Mobile announcement on Sept 23.