解决方案 »

  1.   

    让中间那个控件的 weight 属性设为一个大于0的数就好了
      

  2.   

      android:layout_width="50dp"
    不是写了吗
      

  3.   


    <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal" >        <ImageButton
                android:layout_gravity="left"
                android:layout_width="50dp"
                android:layout_height="50dp"
                android:src="@drawable/ic_launcher" />        <EditText
                android:layout_width="match_parent"
                android:layout_weight="1"
                android:layout_height="50dp" />        <ImageButton
                android:layout_gravity="right"
                android:layout_width="50dp"
                android:layout_height="50dp"
                android:src="@drawable/ic_launcher" />
        </LinearLayout>