ScrollView
안에 목록이있는 대화 상자 (TextView
이 LinearLayout
안에 있음)가 있습니다. 다음과 같이 레이아웃은 다음과 같습니다Scrollview가 아래쪽보기를 사라지게합니다.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ProgressBar
android:id="@+id/delete_progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone" />
<ScrollView
android:id="@+id/filename_scroll"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:id="@+id/filename_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
</LinearLayout>
</ScrollView>
<View
android:id="@+id/horisontal_separator"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:background="@android:color/darker_gray" />
<LinearLayout
android:id="@+id/button_container"
android:layout_width="match_parent"
android:layout_height="48dp" >
<Button
android:id="@+id/load_button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/button_load"
android:gravity="center"
android:layout_weight="1" />
<View
android:layout_width="1dp"
android:layout_height="fill_parent"
android:background="@android:color/darker_gray" />
<Button
android:id="@+id/delete_button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/button_delete"
android:gravity="center"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
:
그러나 화면에 표시 할 수있는 것보다 더 많은 것이있다 (그리고 스크롤 실제 필요가있을 때) 내 단추가 화면 아래로 밀려납니다. 바닥에 모든 방법을 스크롤 할 때, 다음과 같습니다 :
내가 바닥 글로 유지하기 위해 버튼을 포함하는 LinearLayout
, 그것은 어디 스크롤되지 분명히 사라지지해야합니다. 나는 레이아웃 높이와 무게로 부지런히 노력했지만 아무 소용이 없습니다.
ListView를 고정 된 높이 (예 : 200dip)로 설정하려고 시도 했습니까? – Demonick
실제'ListView'가 없지만'LinearLayout'의 높이를 변경해도 차이가 없습니다. 그리고'ScrollView'의 높이를 변경하면 버튼이 다시 튀어 나오게됩니다. – j0ntech