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 8706227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:33:50+00:00 2026-06-13T03:33:50+00:00

Hi im trying to create an sticky footer that will show in every activity

  • 0

Hi im trying to create an sticky footer that will show in every activity in my application, i already have the header i used windows feautre custom titlebar to achieve this so my header always shows in all my activities.

I have:

  1. Activity with listview using lazyadapter to get data from xml file.
  2. Activity with basic audio player.

i want to create a sticky footer si i t always shows not only when i scroll at the bottom of listview something like this:

enter image description here

i already have this:

footer.xml

<?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" >
       <TextView
        android:text="Footer"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" 
        android:layout_gravity="bottom"/>


</LinearLayout>

and in my listview activity i used:

View footerView = ((LayoutInflater) this.getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(R.layout.footer, null, false);
        list.addFooterView(footerView);

the footer shows but just if i scroll to the end of listview isnt sticky, which method i could use to create that sticky footer?

thanks.

edit:

main.xml

<?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="vertical">

    <ListView
        android:id="@+id/list"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:divider="#b5b5b5"
        android:dividerHeight="1dp"
        android:fadingEdge="none"
        android:listSelector="@drawable/list_selector" />  

</LinearLayout>

list_row.xml:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:background="@drawable/list_selector"
    android:orientation="horizontal"
    android:padding="5dip" >

    <!--  ListRow Left sied Thumbnail image -->
    <LinearLayout android:id="@+id/thumbnail"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:padding="3dip"
        android:layout_alignParentLeft="true"

        android:layout_marginRight="5dip">
      <!-- android:background="@drawable/image_bg" -->
        <ImageView
            android:id="@+id/miniatura"
            android:layout_width="80dip"
            android:layout_height="50dip"
            android:src="@drawable/rihanna"/>

    </LinearLayout>

    <!-- Title Of Song-->

    <TextView
        android:id="@+id/nombre"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignTop="@+id/thumbnail"
        android:layout_marginTop="8dp"
        android:layout_toRightOf="@+id/thumbnail"
        android:text="Rihanna Love the way lie"
        android:textColor="#040404"
        android:textSize="15dip"
        android:textStyle="bold"
        android:typeface="sans" />

    <!-- Artist Name -->
    <TextView
        android:id="@+id/web"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/nombre"
        android:textColor="#343434"
        android:textSize="10dip"
        android:layout_marginTop="1dip"
        android:layout_toRightOf="@+id/thumbnail"
        android:text="Just gona stand there and ..." />

    <!-- Rightend Duration -->

    <TextView
        android:id="@+id/shoutcast"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_alignTop="@id/nombre"
        android:layout_marginRight="5dip"
        android:gravity="right"
        android:text="5:45"
        android:textColor="#10bcc9"
        android:textSize="10dip"
        android:textStyle="bold"
        android:visibility="gone" />
    <TextView
        android:id="@+id/logo"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_alignTop="@id/shoutcast"
        android:layout_marginRight="5dip"
        android:gravity="right"
        android:text="5:45"
        android:textColor="#10bcc9"
        android:textSize="10dip"
        android:textStyle="bold"
        android:visibility="gone" />

     <!-- Rightend Arrow -->
     <ImageView android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/arrow"
        android:layout_alignParentRight="true"
        android:layout_centerVertical="true"/>

</RelativeLayout>
  • 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-06-13T03:33:52+00:00Added an answer on June 13, 2026 at 3:33 am

    You don’t want your footer to be in the list, because then it will only show up at the bottom of the list. Instead you want it to be another level up, inside the root element. The header and footer height should be set to wrap content so they only take up as much space as they need, and the list should be set to height=0dp weight=1 so that it takes up all the rest of the available space. Have a look at this replacement I’m providing for main.xml. You should work with your footer in the .xml layout file (if possible) and try to avoid doing it in the code.

    Main:

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical">
    
        <ListView
            android:id="@+id/list"
            android:layout_width="fill_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:divider="#b5b5b5"
            android:dividerHeight="1dp"
            android:fadingEdge="none"
            android:listSelector="@drawable/list_selector" />  
    
        <include layout="footer"/>
    
    </LinearLayout>
    

    Footer:

    <?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="wrap_content"
        android:orientation="vertical">
    
        <TextView
            android:text="Footer"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" 
            android:layout_gravity="bottom"/>
    
    </LinearLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a floating header. content area and then a sticky footer.
I am trying to create a bottom aligned, fluid width sticky footer that contains
I'm trying to create a menu that will stick at the bottom of the
I am trying to create a JTable that has a row header that looks
I have been trying to create a website with a fixed header but which
I am trying to create a footer that sticks to the bottom of the
Trying to create a new Dedicated Cache Role in Windows Azure but get the
Trying to create a macro which can be used for print debug messages when
I am trying to create a sticky accordion menu, where the background scrolls depending
Does anyone know of any software that can be used to create Agile User

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.