Probleme mit EditText und Softkey in einem Fragment

Ich bin derzeit der Aufbau einer android-Anwendung, die Benutzern ermöglicht, Fotos zu machen und schreiben details. Die Anwendung verwendet Sherlock Bibliotheken.

Habe ich umgesetzt SherlockFragment um das Bild anzuzeigen, und ein paar EditText und TextView Benutzern zu ermöglichen, die Schlüssel in die Informationen der Bild. Wenn man allerdings von der EditText ist im Fokus, alle Felder werden nach oben gedrückt und die soft-Tastatur eingeblendet.

Hier ist mein layout:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/linear"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" 
    android:background="#FFFFFF">

    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="fill_parent"
        android:layout_height="200dip"
        android:layout_above="@+id/textView"
        android:layout_marginTop="20dip"
        android:layout_marginBottom="20dip"
        android:contentDescription="desc" />

    <TextView
        android:id="@+id/textView"
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:text="Title:"
        android:textStyle="bold"
        android:layout_above="@+id/editTextSimple" 
        android:layout_marginBottom="2dip"
        android:textSize="15sp"/>

     <EditText
        android:id="@+id/editTextSimple"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_above="@+id/textView1"
        android:layout_marginBottom="4dip">
        <requestFocus />
    </EditText>

    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:text="Description:"
        android:textStyle="bold"
        android:layout_above="@+id/editTextSimple1" 
        android:layout_marginBottom="2dip"
        android:textSize="15sp"/>

    <EditText
        android:id="@+id/editTextSimple1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_above="@+id/textView2"  
        android:layout_marginBottom="12dip">
    </EditText>

    <Button android:textColor="#FF000000" 
        android:id="@+id/submitButton" 
        android:text="@string/memorySubmit" 
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_marginBottom="24dip"
        android:onClick = "submit"/>
</RelativeLayout>

Aus, was ich verstehe, in einer Tätigkeit, einem Ort dieser <activity android:windowSoftInputMode="...." > im Android-Manifest anpassen der Ansicht, wenn der soft-Tastatur aufgerufen. Jedoch, wie wir setzen das für Fragmente?

InformationsquelleAutor der Frage user1140240 | 2012-12-26

Schreibe einen Kommentar