View footerView = ((LayoutInflater)ActivityContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(R.layout.footer_layout, null, false);
ListView.addFooterView(footerView);
Footer_layout xmlファイルを試してみてください、あなたはフッターのように設定したいButton
からなるfooterview layout
を作成し、
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="7dip"
android:paddingBottom="7dip"
android:orientation="horizontal"
android:gravity="center">
<LinearLayout
android:id="@+id/footer_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center"
android:layout_gravity="center">
<Button
android:id="@+id/footer_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dip">
</Button>
</LinearLayout>
</LinearLayout>
footer_layout.xmlはありがとうは何が含まれていますか?そのリストビューのみ、またはボタンと一緒に? – Jyosna
@jyosna:答えを更新しました。 – Hussain