我想在我的視圖中添加滾動視圖。根據我的放置,所有元素都正確顯示在視圖上。我已將「LogoutLabel」和「LogoutButton」放置到android:layout_alignParentBottom = "true"
將它們附加到視圖的底部。但我的問題是,當我添加滾動視圖到我的視圖「LogoutLabel」和「LogoutButton」改變其位置並進入視圖的中間即不保持在底部。我希望他們在在視圖上啓用滾動的視圖底部。無法將UI元素添加到Android視圖的底部
請任何人都有這個解決方案。
感謝
<?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">
<TextView android:id="@+id/SettingsLabel"/>
<TextView android:id="@+id/ProfileLabel"/>
<Button android:id="@+id/EditButton"/>
<TextView android:id="@+id/MyIdLabel"/>
<TextView android:id="@+id/idLabel"/>
<TextView android:id="@+id/EmailIdLabel"/>
<TextView android:id="@+id/emailLabel"/>
<TextView android:id="@+id/PasswordIdLabel"/>
<TextView android:id="@+id/passwordLabel"/>
<TextView android:id="@+id/AccountLabel" />
<TextView
android:id="@+id/LogoutLabel"
android:layout_width="200sp"
android:layout_height="wrap_content"
android:text="Do not want to Logout?"
android:layout_alignParentBottom = "true"
android:textColor = "#000000"
android:paddingLeft = "10px"/>
<Button
android:id="@+id/LogoutButton"
android:layout_height="wrap_content"
android:text="Logout"
android:layout_alignBaseline = "@id/LogoutLabel"
android:layout_alignParentRight = "true"
android:layout_alignParentBottom = "true"
android:layout_width="100sp"/>
</RelativeLayout>
@Kartik:鏈接不起作用。 – Salil 2011-04-08 08:15:41
yes鏈接無效。 – Rishi 2011-04-08 08:48:51
好的。我正在刪除它。當我上個月遇到同樣的問題時,它正在工作。 – 2011-04-08 10:43:06