Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6226035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:57:09+00:00 2026-05-24T08:57:09+00:00

I have a listview as below <?xml version=1.0 encoding=UTF-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=horizontal

  • 0

I have a listview as below

<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent" android:layout_height="fill_parent"
    android:orientation="horizontal"
    android:background="#E6E7E2">
    <ImageView android:id="@+id/Thumbnail" android:layout_width="wrap_content"
        android:layout_height="wrap_content" android:src="@drawable/icon" />
    <TextView android:id="@+id/FilePath" android:layout_width="wrap_content"
        android:layout_height="wrap_content" 
        android:textColor="#E6E7E2"
        />
</LinearLayout>

and I have the footer as below

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical"
  android:layout_width="match_parent"
  android:layout_height="match_parent" android:layout_gravity="bottom">
    <LinearLayout android:layout_width="fill_parent" 
            android:layout_alignParentBottom="true" 
            android:layout_height="wrap_content"
            android:id="@+id/layoutfooterbutton" android:layout_gravity="bottom">

            <Button android:layout_weight=".30" android:layout_margin="2dp"
                android:layout_height="60dp" android:layout_width="100dp"
                android:textColor="#FFF" android:gravity="bottom|center"
                android:textSize="12dp" android:id="@+id/ButtonAudio" android:background="@drawable/vid_red"/>

            <Button android:layout_weight=".30" android:layout_height="60dp" android:layout_width="100dp"
                android:gravity="bottom|center" android:background="@drawable/redblank"
                android:textColor="#E6E7E2" android:id="@+id/ButtonBrowse" android:layout_marginTop="2dp"/>
            <Button android:layout_weight=".30" android:layout_margin="2dp"
                android:layout_height="60dp" android:layout_width="100dp"
                android:textColor="#FFF" android:gravity="bottom|center"
                android:textSize="12dp" android:background="@drawable/reddelete" android:id="@+id/ButtonDelete"/>

        </LinearLayout>
</RelativeLayout>

When I add the footer to the listview using

View header = getLayoutInflater().inflate(R.layout.header, null);
View footer = getLayoutInflater().inflate(R.layout.footer, null);
ListView lv = getListView();

// setting header for the list view
lv.addHeaderView(header);
lv.addFooterView(footer);
setListAdapter(new ArrayAdapter<String>(AudioListActivity.this, R.layout.row_audio,  R.id.label, db_results));

It goes to right below the last listview item. I want the footer to be in the bottom. How can I acheive it??

PS: Header perfectly sits on the top.

thanks for your time in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T08:57:09+00:00Added an answer on May 24, 2026 at 8:57 am

    for your scenario i think you need something similar to this.

    <RelativeLayout>
        <include android:id="@+id/header" layout="@layout/header" android:layout_width="fill_parent" android:layout_alignParentTop="true" />
    
        <include android:id="@+id/footer" layout="@layout/footer" android:layout_width="fill_parent" android:layout_alignParentBottom="true" /> 
    
        <ListView android:layout_below="@id/header" android:layout_above="@id/footer"/> 
    </RelativeLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use the following main.xml for my app. <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent
I have XAML File as below: <Window x:Class=ComboBoxCheck.Window1 xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml xmlns:check=clr-namespace:ComboBoxCheck Title=Window1 Height=300 Width=320>
I have defined a List View in xml as below <ListView android:id=@+id/mylist android:layout_width=fill_parent android:layout_height=wrap_content
I have followed this tutorial to get my ListView populating data -- http://android.amberfog.com/?p=296 .
I have a listView with custom objects defined by the xml-layout below. I want
I have a ListView (shown below). I would like the cells to flash a
I have a simple requirement as mentioned below: A ListView or any control displays
I have a simple list with a listselector like so. <ListView android:id=@+id/list android:layout_width=fill_parent android:layout_height=fill_parent
I have a ListView with a Button below it. When I fill the list
I have defined style for TabWidget as below: <style name=MyTheme parent=@android:style/Theme.Light> <item name=android:tabWidgetStyle>@style/LightTabWidget</item> </style>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.