私が設計しているAndroid 4.1アプリでは、2つのボタンを持つ下部バーを動的にしようとしています。つまり、ページの上部にいても画面の下部にくっつかないようにしています。ユーザーがページの最後までスクロールしたときにのみ表示されるようにします。今のところ、いくら頑張っても画面の下に固定されたままです。助けていただければ幸いです。ありがとう。
project_search_list.xml
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ListView android:id="@android:id/list"
android:layout_width="fill_parent" android:layout_height="0dip"
android:layout_weight="1" android:drawSelectorOnTop="false"
/>
<ImageView
android:id="@+id/image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:contentDescription="@string/description"
android:gravity="left"
android:scaleType="fitXY" />
<TextView
android:id="@+id/empty"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="left"
android:text="" />
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="wrap_content">
<LinearLayout android:id="@+id/footer" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:orientation="horizontal"
android:layout_alignParentBottom="true" style="@android:style/ButtonBar">
<Button android:id="@+id/prev_10_results" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_weight="1"
android:text="@string/prev_10_results" />
<Button android:id="@+id/next_10_results" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_weight="1"
android:text="@string/next_10_results" />
</LinearLayout>
</ScrollView>
</LinearLayout>
これがスクリーンキャプチャです。下部にあるボタン バーに注目してください。ページの最後までスクロールしたときにのみ表示されるようにします。