I have one full screen surface view which renders the video in full screen 
and one 4:3 local camera preview  which is overlaid on the full
screen surface view and which renders the local camera feed also one 
options layout to display the options.

Surface view which renders the local cam feed has an border around it.

This is my layout xml:

<RelativeLayout
       xmlns:android="http://schemas.android.com/apk/res/android";
       android:orientation="vertical"
       android:layout_width="fill_
parent"
       android:layout_height="fill_parent"
       android:background="@drawable/background_bg"
       >

       <SurfaceView
               android:id="@+id/video_surface_view_full_screen"
               android:layout_height="fill_parent"
               android:layout_width="fill_parent"
               android:layout_centerInParent="true" />

       <RelativeLayout
               android:id="@+id/local_preview"
               android:layout_alignParentRight="true"
               android:layout_alignParentBottom="true"
               android:layout_marginRight="10px"
               android:layout_marginBottom="10px"
               android:padding="10dp"
               android:focusable="true"
               android:clickable="true"
               android:background="#fff"
               android:layout_width="wrap_content"
               android:layout_height="wrap_content"
               android:gravity="center"
               android:layout_gravity="center"
               >
               <SurfaceView
                       android:layout_height="wrap_content"
                       android:layout_width="wrap_content"
                       android:id="@+id/surface_view"
                       android:layout_centerInParent="true"
                      
 android:layout_alignLeft="@+id/local_video_background"
                       android:layout_alignTop="@+id/local_video_background"
                      
 android:layout_alignRight="@+id/local_video_background"
                      
 android:layout_alignBottom="@+id/local_video_background"
                       />
               <LinearLayout
                       android:id="@+id/video_off_bg_fill"
                       android:layout_height="161dp"
                       android:layout_width="286dp"
                       android:layout_centerInParent="true"
                       android:background="#ffcc" />
               <ImageView
                       android:layout_width="wrap_content"
                       android:layout_height="wrap_content"
                       android:id="@+id/no_vide_img"
                       android:src="@drawable/no_vide_img_small"
                       android:layout_centerInParent="true" />
       </RelativeLayout>

       <include
               layout="@layout/options"
               android:id="@+id/ptions_layout"
               android:layout_width="wrap_content"
               android:layout_width="wrap_content"
               android:layout_marginBottom="10px"
               android:layout_centerHorizontal="true"
               android:layout_alignParentBottom="true" />
</RelativeLayout>

*I am facing following two problems with above layout:*

* *1)   I am setting the options layout to invisible after some time out 
and after detecting the user action i again set it   to visible but i
am facing issue in this. After setting option layout as visible it is there 
on the screen but not visible, it react to touch/key/focus
actions properly but i am unable to see it on screen.

2) Second issue that i am facing is when i set the "local_preview" 
RelativeLayout as visible and invisible then it does not draw the
border around the local preview, initially when i display the this layout 
using "setContentView" it does display the border around
local_preview surface view, but when i set it as invisible and visible 
again then it does not draw the border around the surface view but i
am able to see the video.

I think Z-Order of the widgets is causing the problem, How do i setup
the Z-Order or priority?

I have tried  this layout with FrameLayout also but it has the same
behavior.
I have also tried using "bring_to_front" for local preview and options
layout but it does not work.

What might be the cause and the possible solution to these problems.
What is the proper way of doing this.


Thanks,
Pradeep.

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