2011-05-13 5 views
0

아마도 내 질문은 어리 석을 수 있습니다. Relativelayout 아래에 두 개의 표면보기 개체를 추가 할 수 있는지 여부를 알리기 위해 게시했습니다.안드로이드 단일 표면에 두 개의 표면보기를 추가하십시오.

비디오를 뒤집기 위해 하나의 표면보기가 필요하고 다른보기가 애니메이션을 스프라이트해야합니다.

나는 그것들을 상대적인 레이아웃 아래에 놓으려고했으나 레이아웃에 먼저 붙인 표면 뷰는 선호도를 취하고 두 번째 뷰는 사라진다.

친절하게 해결책을 제안합니다.

편집 :

지금은 코드에있는 LinearLayout - widget30 안에 내 그래픽의 서피스 뷰 SurfaceView를 추가

<RelativeLayout android:id="@+id/widget31" 
android:orientation="vertical" 
android:layout_width="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="fill_parent"> 
    <LinearLayout android:layout_height="fill_parent" android:layout_width="fill_parent" android:id="@+id/widget30" android:orientation="vertical"> 

    </LinearLayout> 
    <com.mycalss.CameraView 
    android:id="@+id/camerapreview" android:clickable="true" 
    android:layout_width="wrap_content" android:layout_height="wrap_content" 
    android:focusable="true"/> 



</RelativeLayout> 

+0

시도하고있는 것을 할 수 있어야합니다. 현재 레이아웃 파일을 게시 할 수 있습니까? –

답변

0

당신은 당신의보기 크기 조정이 제대로되지 않는 것 같습니다 다음을 설정하려고 layout_height을 모두 0dp로 설정 한 다음 layout_weight을 1로 설정하고 둘 다 표시되는지 확인합니다.

관련 문제