Tuesday, August 2, 2011

[android-developers] SurfaceView is sometimes not clipped within the bounds of the parent

I have a SurfaceView that is larger than its parent LinearLayout, and
I display the camera preview on it. The parent LinearLayout has
clipChildren set to true (that is the default value anyway). I get
differing behaviors of whether the SurfaceView is clipped by the
bounds of the parent LinearLayout or not (Screenshots are at the issue
I opened at http://code.google.com/p/android/issues/detail?id=18988):

1. On Gingerbread, the SurfaceView sometimes gets clipped and
sometimes not.
2. On Honeycomb, the SurfaceView always gets clipped when no
notifications are popping up.
3. On Honeycomb, the SurfaceView is not clipped if any notification
pops are shown from the bottom right of the screen. When I tried to
capture this using the Device view in Eclipse, it actually captured an
image where the SurfaceView seemed to be clipped. I had to get a
picture with a camera to show that the SurfaceView was actually not
clipped when a notification has popped up. clipChildren should be
honored in all cases. Is there any workaround to reliably get clipping
of a SurfaceView?

My question is if there is any workaround which will allow me to
consistently get clipping of a SurfaceView?

Thanks
Shri

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