我有以下 XML 布局
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@android:color/white" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ImageView
android:id="@+id/CanLogoImageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_margin="30dp"
android:src="@drawable/can__logo" />
<LinearLayout android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<RelativeLayout android:layout_width="fill_parent"
android:layout_height="fill_parent">
<EditText android:id="@+id/emailEditText"
android:layout_width="300dp"
android:layout_height="50dp"
android:layout_centerHorizontal="true"
android:hint="@string/email_hint"
android:inputType="textEmailAddress"
android:textColor="@color/black" />
<EditText android:id="@+id/passwordEditText"
android:layout_width="300dp"
android:layout_height="50dp"
android:layout_marginTop="15dp"
android:layout_below="@+id/emailEditText"
android:layout_centerHorizontal="true"
android:hint="@string/password_hint"
android:inputType="textPassword"
android:textColor="@color/black" />
<Button android:id="@+id/loginButton"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_below="@+id/passwordEditText"
android:layout_centerHorizontal="true"
android:layout_marginTop="30dp"
android:text="@string/login_button_text" />
<!-- Forgot Password? TextView -->
<TextView android:id="@+id/forgot_password_textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginLeft="15dp"
android:gravity="center"
android:layout_below="@+id/loginButton"
android:text="@string/forgot_password_textview"
android:textColor="@color/blue" />
<!-- My payment methods test textView - TO BE REMOVED LATER! USED THIS FOR TESTING -->
<!-- <TextView android:id="@+id/paymentmethodstest_textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/payment_methods_test_textView"
android:layout_below="@+id/loginButton"
android:layout_marginTop="5dp"
android:layout_marginLeft="40dp"
android:layout_toRightOf="@+id/forgot_password_textView"
android:textStyle="bold"
android:textColor="@color/red"/> -->
<!-- Don't have an account TextView -->
<TextView android:id="@+id/dontHaveAccountTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:layout_marginLeft="15dp"
android:layout_below= "@+id/forgot_password_textView"
android:text="@string/donthave_account_textview"
android:textColor="@color/black" />
<!-- Sign up now TextView -->
<TextView android:id="@+id/signup_now_textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:layout_toRightOf="@+id/dontHaveAccountTextView"
android:layout_below= "@+id/forgot_password_textView"
android:text="@string/signup_now_textview"
android:textColor="@color/blue" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
屏幕显示如下。
屏幕没有完全纵向拉伸。如您所见,屏幕截图底部有黑色补丁。
谁能让我知道我哪里出错了?