से स्क्रीनशॉट के रूप में नीचे
header.xml फ़ाइल
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:layout_width="match_parent"
android:layout_height="your custom height" // you may set default too
/>
</RelativeLayout>
पाद लेख अपनी सूची दृश्य कोड के साथ अपने कस्टम शीर्ष लेख और पाद बनाने ।xml फ़ाइल
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</RelativeLayout>
ऐड जहाँ आपके सूचीदृश्य
LayoutInflater inflaterHeader = getLayoutInflater();
ViewGroup header = (ViewGroup) inflaterFooter.inflate(
R.layout.header, list_view, false);
yourListView.addHeaderView(header);
LayoutInflater inflaterFooter = getLayoutInflater();
ViewGroup footer = (ViewGroup) inflaterFooter.inflate(
R.layout.footer, list_view, false);
yourListView.addFooterView(footer);
यह काम करता है और बिना किसी बदलाव के मेरे रैखिक लेआउट में सही फिट बैठता है। धन्यवाद – Veeru