How to control the SurfaceView's z-order

Showing 1-4 of 4 messages
How to control the SurfaceView's z-order hurri 3/23/09 2:12 AM
Hi,
I created a RelativeLayout which has 2 SurfaceView. The layout looks
like below
<RelativeLayout
      android:layout_width="wrap_content"
      android:layout_height="wrap_content">
      <SurfaceView android:id="@+id/main"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_centerInParent="true"
      >
      <SurfaceView android:id="@+id/pip"
             android:layout_width="120dip"
             android:layout_height="90dip"
             android:layout_alignBottom="@id/main"
             android:layout_alignRight="@id/main"
      >
</RelativeLayout>

It seems that the main surface is always above on pip surface even put
the pip definiation before the main. So how can i change the z-order
to bring the pip to front.
Re: [android-developers] How to control the SurfaceView's z-order Dianne Hackborn 3/23/09 10:32 AM
I strongly recommend against using multiple surface views in a window.  The way surface view is implemented is that a separate surface is created and Z-ordered behind its containing window, and transparent pixels drawn into the rectangle where the SurfaceView is so you can see the surface behind.  We never intended to allow for multiple surface views.--
Dianne Hackborn
Android framework engineer
hac...@android.com

Note: please don't send private questions to me, as I don't have time to provide private support.  All such questions should be posted on public forums, where I and others can see and answer them.

Re: [android-developers] How to control the SurfaceView's z-order NoraBora 5/22/13 1:08 AM
Hello, Dianne Hackborn.
Is this 'multiple surfaceview' still not-recommended?

I'm making Filter camera app with 1 SurfaceView(camera) and 1 GLSurfaceView(filter) targeting Froyo and higher.
but their z-order are sometimes changed.

I know TextureView is introduced but it is much higher than Froyo.

2009년 3월 24일 화요일 오전 2시 32분 18초 UTC+9, Dianne Hackborn 님의 말:
Re: [android-developers] How to control the SurfaceView's z-order NoraBora 5/22/13 3:41 AM
Oh, the answer is here.
https://groups.google.com/forum/?fromgroups#!msg/android-developers/nDNQcceRnYA/ps9wTBfXIyEJ
Never mind :)

2013년 5월 22일 수요일 오후 5시 8분 25초 UTC+9, NoraBora 님의 말: