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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T10:00:43+00:00 2026-06-08T10:00:43+00:00

In my screen layout contain a central button, i want to align that button

  • 0

In my screen layout contain a central button, i want to align that button to bottom of the screen. I tried with some code, but it became terrific…

my xml code as follows

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

   <Button
       android:id="@+id/btnButton1"
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       android:text="Button 1"/>

    <RelativeLayout 
       android:id="@+id/belowLayout"
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       android:layout_alignParentBottom="true"
       >

    <Button
        android:id="@+id/btnButton2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:text="Left"/>

    <Button
        android:id="@+id/btnButton3"
        android:layout_width="75px"
        android:layout_height="50px"
        android:layout_centerHorizontal="true"
        android:text="..."/>

    <Button 
        android:id="@+id/btnButton4"
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:text="Right"/>

      </RelativeLayout>
 </RelativeLayout>

screen shot

enter image description here

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-08T10:00:45+00:00Added an answer on June 8, 2026 at 10:00 am

    Try this

    <Button
            android:id="@+id/btnButton3"
            android:layout_width="75px"
            android:layout_height="50px"
            android:layout_centerHorizontal="true"
            android:layout_alignBottom="@+id/btnButton2"
            android:text="..."/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How to align the buttons bottom of the screen.In the layout i have header
When the screen is too small to contain all the layout elements at their
I am trying to get a layout that always takes up the entire screen,
I want to zoom text that is displayed at center of screen as per
I want to design layout which contains one button which is on the top
I've tried for hours but nothing achieved. Thats my code: <?xml version="1.0" encoding="utf-8"?> <LinearLayout
I have a simple login layout that contains two EditText fields and a Button
I am working on a fairly basic screen layout for my first Android application
I have an issue with how to organise the the screen layout for my
I have selected two components in the Customize Layout screen using a hint from

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.