2011-02-12 87 views
1

我試圖用一些填充來定位兩個按鈕之一下方的另一個。不幸的是,最下面的那個填滿了整個屏幕,並排在第一個之後。 :-S儀表板佈局模式

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:padding="6dip"> 
    <LinearLayout 
     android:id="@+id/linearLayout1" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:orientation="horizontal" 
     android:padding="6dip" 
     android:layout_weight="1"> 
     <ImageButton 
      android:layout_width="wrap_content" 
      android:src="@drawable/gallery" 
      android:layout_height="wrap_content" 
      android:scaleType="centerInside" 
      android:id="@+id/gallery_btn"></ImageButton> 
    </LinearLayout> 
    <LinearLayout 
     android:id="@+id/linearLayout2" 
     android:orientation="horizontal" 
     android:layout_height="match_parent" 
     android:layout_width="match_parent" 
     android:padding="6dip" 
     android:layout_weight="1"> 
     <ImageButton android:id="@+id/camera_btn" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:src="@drawable/camera" 
      android:scaleType="centerInside" /> 
    </LinearLayout> 
</LinearLayout> 
+0

發現它原來的ADT Eclipse插件具有一個混亂的圖形預覽器。按鈕在真實設備上正確顯示 – siamii 2011-02-13 00:05:34

回答