Android-ScrollView nicht scrollen

Habe ich gelöst, meine Frage. Ich wählte stattdessen eine Kopfzeile und eine Fußzeile, die sich immer auf die oben und unten am Bildschirm jeweils. Dann erstellte ich ein "center-content", die ich eingeschlossen in ein ScrollView-layout. Ich habe aktualisiert, der code unten, wenn die Leute interessiert sind, zu sehen, was es jetzt aussieht.

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:focusable="true"
    android:focusableInTouchMode="true"
    android:background="#FFFFFF">

    <LinearLayout android:id="@+id/header"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@layout/header"
        android:layout_alignParentTop="true">
        <ImageView android:src="@drawable/logo"
            android:contentDescription="@string/logo_description"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:padding="10dip"/>
    </LinearLayout>

    <ScrollView android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="350dip"
        android:layout_below="@id/header">
        <LinearLayout android:orientation="vertical"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:padding="20dip" >
            <!--  Email Label -->
            <TextView android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:textColor="#372C24"
                android:text="@string/email"/>
            <EditText android:id="@+id/email_field"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="5dip"
                android:singleLine="true"
                android:inputType="textEmailAddress"/>
            <!--  Password Label -->
            <TextView android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dip"
                android:textColor="#372C24"
                android:text="@string/password"/>
            <EditText android:id="@+id/password_field"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:singleLine="true"
                android:inputType="textPassword"/>
            <!-- Login button -->
            <Button android:id="@+id/login_button"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="25dip"
                android:text="@string/login"/>
            <!-- Register button -->
            <Button android:id="@+id/register_button"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="25dip"
                android:text="@string/register_button"/>
        </LinearLayout>
    </ScrollView>

    <LinearLayout android:id="@+id/footer"
        android:layout_width="fill_parent"
        android:layout_height="90dip"
        android:background="@layout/footer"
        android:layout_alignParentBottom="true">
    </LinearLayout>

</RelativeLayout>
InformationsquelleAutor Justin Papez | 2012-12-28
Schreibe einen Kommentar