0

私は、いくつかのボタンとテキストビューを備えたいくつかの編集テキストがあるxmlを作成しようとしています。しかし、複数行の編集テキストを追加しようとすると、「java.util.LinkedHashMap.eldest()Ljava/util/Map$Entry;」のようなエラーが表示され始めます。私のXMLコードは次のとおりです。

  <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <TextView
        android:id="@+id/to"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:layout_marginLeft="24dp"
        android:layout_marginTop="15dp"
        android:text="@string/to"
        android:textAppearance="?android:attr/textAppearanceMedium" />

    <EditText
        android:id="@+id/toname"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignLeft="@+id/to"
        android:layout_below="@+id/to"
        android:layout_marginLeft="28dp"
        android:layout_marginTop="18dp"
        android:ems="10"
        android:hint="@string/toname"
        android:inputType="textPersonName" >

        <requestFocus />
    </EditText>

    <EditText
        android:id="@+id/tophone"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignLeft="@+id/toname"
        android:layout_below="@+id/toname"
        android:layout_marginTop="16dp"
        android:hint="@string/tophone"
        android:ems="10"
        android:inputType="phone" />

    <Button
        android:id="@+id/importbutton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignRight="@+id/tophone"
        android:layout_below="@+id/tophone"
        android:text="@string/importbutton" />



    <EditText
        android:id="@+id/text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignLeft="@+id/to"
        android:layout_alignRight="@+id/importbutton"
        android:layout_below="@+id/importbutton"
        android:layout_marginTop="38dp"
        android:ems="10"
        android:hint="@string/text"
        android:inputType="textMultiLine"
        android:lines="7"/>


    <Button
        android:id="@+id/sendbutton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignRight="@+id/text"
        android:text="@string/sendbutton" />

</RelativeLayout>

これの作り方を教えてください...

4

1 に答える 1

0

これを確認する必要があります また、やってみてください

android:inputType="textNoSuggestions"
于 2012-07-28T09:43:59.447 に答える