Warum funktioniert mein layout_weight nicht?

Ich habe diese XML-Datei. Ich kann nicht verstehen, warum mein zweites lineares Layout, das editText und callButton enthält, nicht richtig aussieht. Es sieht so aus (die Zeile mit dem Teilbild des Telefons):

Ich habe die layout_weights in jeder dieser Ansichten, editText und callButton, auf 1 gesetzt, sodass das Telefonbild die Hälfte des Bildschirms einnehmen sollte, oder? Hier ist mein Code. Ich möchte, dass beide Ansichten die gleiche Breite haben - und der editText sollte nicht gedehnt werden, wenn Text eingegeben wird, wie es derzeit geschieht. Vielen Dank für jede Hilfe.

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/LinearLayout1"
    android:layout_height="match_parent"
    android:layout_width="match_parent"
    android:orientation="vertical"
    android:paddingBottom="0dp"
    android:paddingLeft="0dp"
    android:paddingRight="0dp"
    android:paddingTop="0dp"
    tools:context=".MainActivity">

    <ListView
        android:id="@+id/ListView_2"
        android:layout_height="wrap_content"
        android:layout_width="match_parent"
        android:layout_weight="1">
    </ListView>

<LinearLayout
    android:id="@+id/LinearLayout2"
        android:layout_width="match_parent"
        android:layout_height="60dp"
        android:orientation="horizontal"
        >
        <!--android:adjustViewBounds="true"-->
    <!-- we want the text to begin in the centre of the edittext view
    that's what gravity does-->

    <EditText
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:id="@+id/editText"
        android:inputType="phone"
        android:gravity="center"
        android:background="#d9d9d9"
        android:layout_weight="1"

        />


        <ImageButton
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:id="@+id/callButton"
            android:src="@drawable/call"
            android:clickable="true"
            android:onClick="softkeyboardButton"
            android:background="#ffa62b"
            android:layout_weight="1"

            />
</LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="60dp"
        android:orientation="horizontal" >

    <CheckBox
        android:layout_height="match_parent"
        android:layout_width="wrap_content"
        android:background="#ffa500"
        android:text="New CheckBox"
        android:id="@+id/checkBox"
        android:layout_weight="4"
        />


        <ImageButton
            android:layout_height="match_parent"
            android:layout_width="wrap_content"
            android:id="@+id/imageButton"
            android:src="@drawable/softkeyboard"
            android:clickable="true"
            android:onClick="softkeyboardButton"
            android:layout_gravity="center_horizontal"
            android:layout_weight="1"
            android:background="@drawable/buttonstates"
             />

        <View android:layout_height="fill_parent"
            android:layout_width="2px"
            android:background="#90909090"/>

        <ImageButton
            android:layout_height="match_parent"
            android:layout_width="wrap_content"
            android:id="@+id/imageButton2"
            android:src="@drawable/settingsicon"
            android:background="@drawable/buttonstates"
            android:layout_gravity="center_horizontal"
            android:layout_weight="1" />

    </LinearLayout>

    </LinearLayout>

Antworten auf die Frage(6)

Ihre Antwort auf die Frage