Saturday, October 1, 2011

[android-developers] Re: Force the whole main activity to redraw

On Sep 30, 11:03 am, New Developer <secur...@isscp.com> wrote:
> I have an activity which has my own media class which extends ImageView  
> with some special functions.
> I use this to play a video frame by frame using MediaMetadataRetrieve
> The problem is that it only shows the first frame even  though the code
> does step through and collect multiple frames and bitmaps and places
> them on the ImageView.
>
> The code, does but visually only the first frame ever shows.  Show How
> can I force the whole Activity to redraw .

You don't need to draw the whole Activity over. If you set a bitmap
into an ImageView, Android will render that after your code completes
its current run and allows the UI thread to process that change. You
need to put each frame into the ImageView followed by some delay. You
can use a Handler to schedule delays on the UI thread.

Doug

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment