Thanks Dianne for quick response.  My requirement is to show a video
as a list item  (there is only 1 video item and rest of the items in
the list are simple views) and the video item should scroll with the
list. I was able to implement this using videoview inside listview and
noticed that video plays fine when within a list. However, there were
rendering artifacts during scrolling. I was wondering if there are any
other alternate ways to make the video scrolling possible ??

One option that I was thinking is to place the video view on top of
the list view and change its position as the list scrolls. But, I
don't know if it would be possible to move the video view at the same
speed as list during scroll/fling.

The built in android contacts application has implemented the section
headers or separators (A, B, C etc) and pinned header to get a similar
effect. Is the same thing possible with VideoView?

Regarding your comment on recycling view, my understanding was that
when you return the IGNORE_ITEM_VIEW_TYPE in the adapter method
"public int getItemViewType(int position)", ListView does not recycle
that view. I was thinking of implementing along these lines. Do you
recommend this way?

public int getItemViewType(int position) {
            if (isVideoViewAt(position) != 0) {
                // We don't want the video view to be recycled.
                return IGNORE_ITEM_VIEW_TYPE;
            }

            return super.getItemViewType(position);
}

Thanks,
Sandy

On Aug 12, 6:17 pm, Dianne Hackborn <hack...@android.com> wrote:
> Er.  Just don't do that.  A list view contains views that are created and
> destroyed dynamically as you scroll through the list so that it doesn't need
> to have an object instantiated for every single row.
>
> This is so very much not how you want a video view to work.
>
>
>
>
>
> On Thu, Aug 12, 2010 at 3:31 PM, Sandy <snarr...@gmail.com> wrote:
> > I am trying to play a video via VideoView in my android application.
> > The VideoView is one of items inside a ListView. Video playing
> > functionality works good but when the list scroll happens, there are
> > rendering artifacts at the boundaries of the list. Also, the video
> > view surface changes location only after scroll/flick is complete.
>
> > Anyone tried this before in android? Does android allow this ? If so,
> > can you please suggest of how to fix the rendering artifacts?
>
> > Thanks,
> > Sandy
>
> > --
> > 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<android-developers%2Bunsubs 
> > cr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.

-- 
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