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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:28:29+00:00 2026-06-04T13:28:29+00:00

I was looking at an example from the below website. link for the layout

  • 0

I was looking at an example from the below website.

link for the layout

Has an wonderful tutorial on developing dashboard layout.

For Main Screen footer sits perfectly at the end of the layout but for other screens when I try to put footer it renders at the middle of the layout.

I have also attached the code for the better understanding.

this is for style.xml

<resources>
<style name="ActionBarCompat">
    <item name="android:layout_width">fill_parent</item>
    <item name="android:layout_height">50dp</item>
    <item name="android:orientation">horizontal</item>
    <item name="android:background">@drawable/actionbar_background</item>
</style>

<style name="DashboardButton">
    <item name="android:layout_gravity">center_vertical</item>
    <item name="android:layout_width">wrap_content</item>
    <item name="android:layout_height">wrap_content</item>
    <item name="android:gravity">center_horizontal</item>
    <item name="android:drawablePadding">2dp</item>
    <item name="android:textSize">16dp</item>
    <item name="android:textStyle">bold</item>
    <item name="android:textColor">#ff29549f</item>
    <item name="android:background">@null</item>
</style>    

 <style name="FooterBar">
    <item name="android:layout_width">fill_parent</item>
    <item name="android:layout_height">40dp</item>
    <item name="android:orientation">horizontal</item>
    <item name="android:background">#dedede</item>
</style>     
</resources>

this is for header(action_bar) actionbar_layout.xml

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
style="@style/ActionBarCompat" >

<ImageView
    android:layout_width="wrap_content"
    android:layout_height="fill_parent"
    android:clickable="false"
    android:paddingLeft="15dip"
    android:scaleType="center"
    android:src="@drawable/facebook_logo" />

</LinearLayout>

Below is for footer bar footer_layout.xml

  <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
   style="@style/FooterBar"
   android:id="@+id/footerMenuOptions" >
<TextView android:text="www.facebook.com"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:textColor="#606060"
        android:gravity="center"
        android:paddingTop="10dip"/>
  </LinearLayout>

Below is the layout for the attached screen

<?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"  
android:background="#f8f9fe">
<include layout="@layout/actionbar_layout"/>

<LinearLayout android:layout_width="fill_parent"
            android:layout_height="wrap_content">
        <TextView android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="Events Screen"
                android:textSize="25dip"
                android:padding="15dip"
                android:textStyle="bold"
                android:textColor="#ff29549f"/> 

</LinearLayout>   
 <include layout="@layout/footer_layout"/>
</LinearLayout>

We can clearly see how the footer is getting in middle of the screen in the attached image.footer rendering in between the layout

Tried with setting with RelativeLayout but the same rendering problem

Tried with LinearLayout with setting
android:layout_alignParentBottom="true" and placing the include of the footer <include layout="@layout/footer_layout"> in the Linear Layout but the same rendering problem.

Looking forward to your reply.
thanks.

  • 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-04T13:28:30+00:00Added an answer on June 4, 2026 at 1:28 pm

    Try with RelativeLayout and use its android:layout_below and android:layout_above for center contents and android:layout_alignParentBottom for View to stick to bottom
    Do this way:

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="wrap_content" android:layout_height="wrap_content"
        android:orientation="vertical">
        <RelativeLayout android:layout_width="fill_parent"
            android:layout_height="wrap_content" android:id="@+id/top_control_bar">
            <include layout="@layout/actionbar_layout"/>
        </RelativeLayout>
        <LinearLayout android:id="@+id/bottom_control_bar"
            android:layout_width="fill_parent" android:layout_height="wrap_content"
            android:layout_alignParentBottom="true">
             <include layout="@layout/footer_layout"/>
        </LinearLayout>
        <LinearLayout android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_below="@id/top_control_bar"
                android:layout_above="@id/bottom_control_bar">
                <TextView android:layout_width="fill_parent"
                        android:layout_height="wrap_content"
                        android:text="Events Screen"
                        android:textSize="25dip"
                        android:padding="15dip"
                        android:textStyle="bold"
                        android:textColor="#ff29549f"/> 
    
        </LinearLayout>   
    
    </RelativeLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was looking at the example code below from the developers site outlining OAuth
I've been looking at an example of LINQ from the following link; I've posted
thank you for looking i got this example from my book but i cant
I'm looking at the TPL exception handling example from MSDN @ http://msdn.microsoft.com/en-us/library/dd537614(v=VS.100).aspx The basic
I'm looking to remove duplicate phrases from any give string. Example: My_First_Post_My_First_Post.htm Would have
I'm looking for example of how I would solve the scenario below: Imagine my
Looking for an example of how to dynamically add controls from the activity. Inside
Here is only an example from my code. I'm looking for a good way
Per example below...Looping through an object from a parsed JSON string returns an error
Aim I am looking to scrape 20/20 cricket scorecard data from the Cricinfo website

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.