0
遺憾的英語不好Android的XML滾動視圖沒有工作,layout_alignParentBottom不工作
我想對XML的項目,並在我想有2個按鈕horizantally XML的鈕, 所有的項目我希望能夠滾動,我會給我什麼,我試過了,但我仍然在XML的按鈕具有空間和元素沒有滾動
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#FFFFFF"
android:orientation="vertical"
android:paddingLeft="5dip"
android:paddingRight="5dip" >
<TextView
android:id="@+id/tv_address_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="10dip"
android:text="@string/tv_address_title"
android:textColor="#000000"
android:textSize="20dip"
android:typeface="serif" />
<!-- Label Label -->
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="25dip"
android:layout_weight="1" >
<TextView
android:id="@+id/tv_address_username"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="@string/tv_address_labelName"
android:textColor="#000000" />
<TextView
android:id="@+id/tv_address_errorUsername"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:text="@string/require"
android:textColor="#FF0000" />
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/tv_address_username"
android:layout_marginTop="5dip"
android:hint="@string/et_hint_enterLabel"
android:inputType="text" />
</RelativeLayout>
<!-- Province Label -->
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="25dip"
android:layout_weight="1" >
<TextView
android:id="@+id/tv_address_province"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="@string/tv_province"
android:textColor="#000000" />
<TextView
android:id="@+id/tv_address_errorProvince"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:text="@string/require"
android:textColor="#FF0000" />
<Spinner
android:id="@+id/s_address_province"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/tv_address_province"
android:layout_marginTop="5dip"
android:entries="@array/provinces"
android:prompt="@string/s_province" />
</RelativeLayout>
<!-- City Label -->
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="25dip"
android:layout_weight="1" >
<TextView
android:id="@+id/tv_address_city"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="@string/tv_city"
android:textColor="#000000" />
<TextView
android:id="@+id/tv_address_errorCity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:text="@string/require"
android:textColor="#FF0000" />
<Spinner
android:id="@+id/s_address_city"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/tv_address_city"
android:layout_marginTop="5dip"
android:prompt="@string/s_city" />
</RelativeLayout>
<!-- Street Label -->
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="25dip"
android:layout_weight="1" >
<TextView
android:id="@+id/tv_address_street"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="@string/tv_street"
android:textColor="#000000" />
<TextView
android:id="@+id/tv_address_errorStreet"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:text="@string/require"
android:textColor="#FF0000" />
<Spinner
android:id="@+id/s_address_street"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/tv_address_street"
android:layout_marginTop="5dip"
android:prompt="@string/s_street" />
</RelativeLayout>
</LinearLayout>
<!-- Save Cancel Label -->
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginTop="25dip"
android:background="#000000"
android:orientation="horizontal"
android:weightSum="2" >
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/b_save" />
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/b_cancel" />
</LinearLayout>
</RelativeLayout>
</ScrollView>
按鈕將不會與elemetnet滾動,我想保持在按鈕elemetns而且還可以與elemetns地滾動,因爲元素是LARG和肯定我需要滾動 – 2013-02-09 12:20:19