2012-10-25 51 views
1

enter image description here佈局會在狀態欄的下方,這裏是我用來佈局

我在我的應用程序所面臨的問題的代碼,我必須設置從相機拍攝作爲畫布背景圖像。我打電話給默認相機拍照。拍完照片後,預覽會顯示拍攝的圖像,並會要求我們保存或不保存。如果同時按下保存和回原點,我們將進入主屏幕。在此之後,我從應用程序啓動我的應用程序。打開時,放置按鈕的佈局位於狀態欄上方。

編輯:

<?xml version="1.0" encoding="utf-8"?> 
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/layout" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:background="@color/background" 
    android:src="@drawable/dbg_bg" > 

    <RelativeLayout 
     android:id="@+id/dd_layout" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" > 

     <RelativeLayout 
      android:id="@+id/header" 
      android:layout_width="310dip" 
      android:layout_height="35dip" 
      android:layout_alignParentTop="true" > 



      <ImageButton 
       android:id="@+id/tools" 
       android:layout_width="25dip" 
       android:layout_height="21dip" 
       android:layout_alignParentLeft="true" 
       android:layout_marginLeft="15dip" 
       android:layout_marginTop="8dip" 
       android:background="@drawable/ic_launcher" 
       android:tag="3" 
       /> 


     </RelativeLayout> 

     <View 
      android:id="@+id/border" 
      android:layout_width="fill_parent" 
      android:layout_height="2dip" 
      android:layout_below="@id/header" 
      android:background="@drawable/border" /> 

     <RelativeLayout 
      android:id="@+id/footer" 
      android:layout_width="fill_parent" 
      android:layout_height="35dip" 
      android:layout_alignParentBottom="true" > 

      <ImageButton 
       android:id="@+id/imgbtn" 
       android:layout_width="21dip" 
       android:layout_height="21dip" 
       android:layout_alignParentLeft="true" 
       android:layout_marginLeft="10dip" 
       android:layout_marginRight="5dip" 
       android:layout_marginTop="8dip" 
       android:background="@drawable/ic_launcher" 
       android:tag="1" 
       android:visibility="invisible" /> 

      <ImageButton 
       android:id="@+id/pt_imgbtn" 
       android:layout_width="24dip" 
       android:layout_height="19dip" 
       android:layout_alignParentRight="true" 
       android:layout_marginLeft="2dip" 
       android:layout_marginRight="15dip" 
       android:layout_marginTop="8dip" 
       android:background="@drawable/ic_launcher" 
       android:tag="4" 
       android:visibility="invisible" /> 
     </RelativeLayout> 

     <RelativeLayout 
      android:layout_width="fill_parent" 
      android:layout_height="fill_parent" 
      android:layout_above="@id/footer" 
      android:layout_below="@id/border" > 

      <com.xyz.ddd.canvas.SurfaceCanvas 
       android:id="@+id/surfacecanvas" 
       android:layout_width="fill_parent" 
       android:layout_height="fill_parent" /> 
     </RelativeLayout> 

     <View 
      android:id="@+id/footerborder" 
      android:layout_width="fill_parent" 
      android:layout_height="2dip" 
      android:layout_above="@id/footer" 
      android:background="@drawable/ic_launcher" /> 
    </RelativeLayout> 

</RelativeLayout> 
+0

請添加一些您嘗試編寫的代碼。 –

+0

Yul我加了我的代碼 –

+0

如果可能的話請也張貼屏幕截圖... –

回答

1

爲什麼你在你的RelativeLayout src和背景是什麼?

刪除你不需要的那個。

android:background="@color/background" 
android:src="@drawable/dbg_bg" 

希望這會有所幫助。