2011-05-13 32 views
0

可能我的問題可能很愚蠢。我張貼以瞭解是否有可能在Relativelayout下添加兩個surfaceview對象。Android將兩個表面視圖添加到單個版面

我需要一個表面以流視頻的後面,另一種觀點認爲做精靈動畫。

我試圖把它們放在一個相對的佈局下,但我首先放在佈局上的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> 

現在我加我圖形的surfaceview的LinearLayout,widget30內部代碼

+0

你應該可以做你正在嘗試的。你能發佈你當前的佈局文件嗎? – 2011-05-13 06:32:15

回答

0

你似乎並沒有得到妥善調整您的瀏覽:嘗試設置layout_height都設爲0dp,然後將layout_weight設爲1,看看它們是否都顯示出來。

相關問題