thanks for the response. the view hosting the camera preview is indeed a surface view. i was using a regular SurfaceView, but then tried subclassing it and returning false in gatherTransparentRegion() as you suggested. unfortunately this doesn't affect the behaviour - upon switching to the playback tab after a preview, the black rectangle remains.
did i misunderstand your message? making the views visible and invisible when their respective tabs are selected doesn't work, so i think i might instead have the tabs hooked up to placeholder views, which then inflate the appropriate VideoView and SurfaceView instances when selected. if *that* doesn't work, then something is seriously up with the view handling in 'droid. any suggestions gratefully appreciated! j >Assuming one of these is a surface view, it may be asking its parent >container to be transparent so it can, as the docs say, "punch a >hole" in the view hierarchy, since the surface is Z-ordered behind >the native views. The parent here is the FrameLayout in the tab host >that contains the tab content. > >You might try wrapping the view in a secondary frame layout to >protect the "real" frame layout "behind" it. I haven't tried this. > >If it was your own views causing this, you could also override >gatherTransparentRegion and return false. I have done this and it >works. > >-- Ward > > >>hey all, >> >>i have TabActivity which does camera previews in one tab and has a >>VideoView in another. they don't get on very well - seems like each >>thinks it has control of the screen. >> >>in particular, once a preview has been done in the camera tab, then >>the VideoView tab has a black rectangle the size of the preview frame >>parked in the middle of it. >> >>i suspect that both facilities write direct to the frame buffer, and >>so some contention would be expected. is there any way round this? >> >>i'm setting the views' visibility accordingly in onTabChanged(), but >>it makes no difference, which i suspect is a bug. >> >>thanks for any help with this one >>j >> >> >> > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

