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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:06:57+00:00 2026-05-23T09:06:57+00:00

Searched all day and came up with a poor solution i think. i want

  • 0

Searched all day and came up with a poor solution i think.
i want three ImageButton placed on the right sida of the screen.
Not centered but just above center position..

With the code below i get the result i want but,
If the user have a bigger screen they will not have this position right?

I have tried the android:gravityall day and all i can do with it is
to center the three buttons very nicely.

What should i use to make the three buttons always stay at the positions that
they are on the image belove.
i have the button image in 3 different sizes in hdpi,mdpi,xhdpi folder.

      <RelativeLayout 
        android:id="@+id/rightRelativeLayout"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        >
            <ImageButton
                android:id="@+id/btn_A" 
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="100dp"
                android:text="A"
                android:src="@drawable/drawer_1"
                android:background="@android:color/transparent"
                android:layout_alignParentRight="true"

            /> 
            <ImageButton
                android:id="@+id/btn_B" 
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dp"
                android:text="B"
                android:src="@drawable/drawer_1"
                android:background="@android:color/transparent"
                android:layout_alignParentRight="true"
                android:layout_below="@+id/btn_A"
            />
            <ImageButton
                android:id="@+id/btn_C" 
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dp"
                android:text="C"
                android:src="@drawable/drawer_1"
                android:background="@android:color/transparent"
                android:layout_alignParentRight="true"
                android:layout_below="@+id/btn_B"

            />
        </RelativeLayout>

Picture of the three buttons placed on the right side, and my daughter of course.

  • 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-23T09:06:58+00:00Added an answer on May 23, 2026 at 9:06 am

    One option would be to put all three buttons within a LinearLayout (for simplicity’s sake) and then set the layout of this container programmatically.

    You can see the size of the screen using getResources().getDisplayMetrics().heightPizels and then set the top margin accordingly.

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

Sidebar

Related Questions

I've searched stackoverflow all day long to find an answer without luck, so here
I have searched all morning and yesterday afternoon and still cannot find an solution
So I have searched all over the place and I can not seem to
I've searched all day and tried everything to remove the black around my PNGs
I've searched Google all day and can't find the correct answer to my issue,
I have searched SO but all the examples here are not working for me.
Good day, I have searched far and wide but all I can find is
I have been trying to figure this out all day. I've searched SO and
I am having a nightmare, been trying all day with this, and searched google
I've searched this all day (its 2pm here atm, so quite a bit of

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.