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. opengl es texture created from bitmap is all white?

Why are you using the ARGB_4444 mode?






-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

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

2. PackageManager( 458): Package com.google.android.browser has mismatched uid: 1000 on disk, 10003 in setting

D/        (  458): zip_openZipFile(/system/app/MasfProxyService.apk)
D/        (  458): zip_openZipFile(/system/app/SettingsProvider.apk)
E/PackageManager(  458): Package com.google.android.browser has
mismatched uid: 1000 on disk, 10003 in settings
D/        (  458): zip_openZipFile(/system/app/Browser.apk)
E/PackageManager(  458): Package
com.google.android.providers.telephony has mismatched uid: 1000 on
disk, 1001 in settings
D/        (  458): zip_openZipFile(/system/app/TelephonyProvider.apk)
E/PackageManager(  458): Package
com.google.android.providers.contacts
has mismatched uid: 1000 on disk, 10000 in settings
D/        (  458): zip_openZipFile(/system/app/ContactsProvider.apk)
E/PackageManager(  458): Package com.google.android.development has
mismatched uid: 1000 on disk, 10004 in settings
D/        (  458): zip_openZipFile(/system/app/Development.apk)
E/PackageManager(  458): Package com.google.android.phone has
mismatched uid: 1000 on disk, 1001 in settings
D/        (  458): zip_openZipFile(/system/app/Phone.apk)
E/PackageManager(  458): Package com.google.android.home has
mismatched uid: 1000 on disk, 10005 in settings
D/        (  458): zip_openZipFile(/system/app/Home.apk)
E/PackageManager(  458): Package com.google.android.maps has
mismatched uid: 1000 on disk, 10000 in settings
D/        (  458): zip_openZipFile(/system/app/Maps.apk)
E/PackageManager(  458): Package com.google.android.providers.im has
mismatched uid: 1000 on disk, 10000 in settings
D/        (  458): zip_openZipFile(/system/app/ImProvider.apk)
E/PackageManager(  458): Package
com.google.android.providers.googleapps has mismatched uid: 1000 on
disk, 10000 in settings
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. setting a listview height when items are below it

4. Broken search on developer.android.com

5. G1 UAProf?

6. setting a listview height when items are below it

7. Will [all] attachments be included with email