Hi Mark,

Unfortunately, that's not an option. I don't create programs for Android, i 
create a virtual machine that runs side by side with Dalvik. All i need 
from Android is to start the program, handle pen and keyboard events, and 
show the contents drawn by my VM on the screen. Too bad that this can't be 
done fully in native mode, like in iOS, Windows Mobile and (dead) Palm OS.

Anyway, i got some evolution by calling the runOnUiThread method. I can 
start the animation, i can see it has stopped, but nothing happens on 
screen. I'm pretty sure its because of my very small knowledge about the 
Android UI stuff (as i said, i use very few of the UI). 

This is the situation:

1. I have a SurfaceView that calls a native code that draws on a bitmap. 
The native code then asks the screen to be repainted.
2. Sometimes, the native code may ask to paint it with some effects, like a 
transition between screens. So, it fills the offscreen bitmap and asks 
dalvik to show it on screen with some effect.

I searched the net to find if there's a way to let a bitmap be applied over 
another bitmap with animation, but found nothing. So, i realized that a 
view can be shown on the top of another view with animation. The idea is to 
write to the offscreen bitmap, create an ImageView, draw the bitmap on it, 
and apply the animation transition from the SurfaceView to the ImageView.

So, I tried this code:

1         if (iview == null)
2            iview = new ImageView(instance.getContext());
3         iview.setImageBitmap(sScreenBitmap);
4         ScaleAnimation anim = trans == TRANSITION_CLOSE ? new 
ScaleAnimation(1f,1f,0f,0f) : new ScaleAnimation(0f,0f,1f,1f);
5         anim.setDuration(2000);
6         anim.setAnimationListener(this);
7         iview.setVisibility(ImageView.VISIBLE);
8         instance.startAnimation(anim);


I already tried iview.startAnimation, but nothing occurs visually.

Any help is appreciated.

thanks
 
     guich

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to