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

  • SEARCH
  • Home
  • 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 3961082
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T02:55:56+00:00 2026-05-20T02:55:56+00:00

I have an application in which there are two buttons side-by-side at the bottom

  • 0

I have an application in which there are two buttons side-by-side at the bottom (in a TableLayout inside a RelativeLayout). This looks fine on small screens, but on larger screens there is an ugly black space left at the bottom. I want to expand the buttons vertically to fill the space, but can’t work out how!

I’ve included the code below (with the contents of the RelativeLayout removed for simplicity; the below behaves in exactly the same way as the version with it)

<RelativeLayout android:id="@+id/RelativeLayout01" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    xmlns:android="http://schemas.android.com/apk/res/android">

    <TableLayout android:id="@+id/TableLayout01" android:layout_width="fill_parent" android:layout_height="fill_parent">
        <TableRow android:layout_width="fill_parent" android:layout_height="fill_parent">
            <Button android:layout_width="wrap_content" android:id="@+id/Button01" android:text="@string/Button01" android:layout_weight="50" android:layout_height="fill_parent"></Button>
            <Button android:layout_width="wrap_content" android:id="@+id/Button02" android:text="@string/Button02" android:layout_weight="50" android:layout_height="fill_parent"></Button>
        </TableRow>
    </TableLayout>

</RelativeLayout>

Anyone have any idea how to stretch the buttons in the current layout, or a different layout that will allow me to do this more easily?

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-05-20T02:55:57+00:00Added an answer on May 20, 2026 at 2:55 am

    After a little (lot) more experimentation, it turns out that I was approaching this the wrong way. By removing the TableLayout, and replacing it with a LinearLayout the fill_parent attribute for height started working as expected, and all is good.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an MFC dialog in which there are two radio buttons. I have
I have an android application (written in java) which has two buttons ( connect
I have an application in which there is a form which I want to
I have a application which handles picture chosen from gallery. But there is a
I have an application which displays properties dialogs for various GUI-accessible objects. Because there
We have the following setting: There is a web application which has a jboss
I have a .NET 2005 (C#) desktop application, in which there is a login
I have made a swings application but there is one problem in that which
I have a grid in my GWT application there are columns and rows which
I have a gridview in which there are two elements in each of its

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.