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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T01:53:31+00:00 2026-06-17T01:53:31+00:00

This is my layout. I want these button should come at a center of

  • 0

This is my layout. I want these button should come at a center of screen either its is mobile or tablet. How can i achieve this. Please help me.

<?xml version="1.0" encoding="utf-8"?>
<ScrollView android:id="@+id/scrollView" xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@color/ubc_grey">
    <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content">

        <TextView android:id="@+id/titleTextView" android:layout_width="fill_parent" android:layout_height="60dp"
            android:background="@color/slate_grey"  android:text="@string/title_home_map_view" android:textColor="@color/white"
            android:gravity="center" android:textSize="20dp"/>

        <LinearLayout android:id="@+id/linearLayout" android:layout_width="fill_parent" android:layout_height="fill_parent"
            android:orientation="vertical" android:layout_centerInParent="true" android:layout_below="@+id/titleTextView" 
            android:layout_centerHorizontal="true" android:gravity="center"  android:layout_marginTop="20dp">

            <Button android:id="@+id/category" android:layout_width="250dp" android:layout_height="60dp"
                android:text="@string/choose_category" android:textColor="@color/white" android:textSize="18dp"
                android:layout_gravity="center"/>

            <Button android:id="@+id/range" android:layout_width="250dp" android:layout_height="60dp"
                android:text="@string/select_range" android:textColor="@color/white" android:layout_marginTop="20dp" 
                android:textSize="18dp" android:layout_gravity="center"/>

            <Button android:id="@+id/useMyCurrentLocation" android:layout_width="250dp" android:layout_height="60dp"
                 android:layout_marginTop="20dp" android:textColor="@color/white" android:text="@string/button_use_my_current_location" 
                 android:layout_gravity="center" android:textSize="18dp"/>
        </LinearLayout>

    </RelativeLayout>
</ScrollView>

This is what I’m trying to achieve

enter image description here

  • 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-17T01:53:33+00:00Added an answer on June 17, 2026 at 1:53 am

    Please check this xml code. Here i have removed your color and the String Part.

    <?xml version="1.0" encoding="utf-8"?>
    

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_gravity="center_vertical"
        android:gravity="center_horizontal"
        android:orientation="vertical" >
    
        <LinearLayout
            android:id="@+id/linearLayout"
            android:layout_width="wrap_content"
            android:layout_height="fill_parent"
            android:gravity="center_vertical"
            android:orientation="vertical" >
    
            <Button
                android:id="@+id/category"
                android:layout_width="250dp"
                android:layout_height="60dp"
                android:text="choose_category"
                android:textSize="18dp" />
    
            <Button
                android:id="@+id/range"
                android:layout_width="250dp"
                android:layout_height="60dp"
                android:layout_marginTop="20dp"
                android:text="select_range"
                android:textSize="18dp" />
    
            <Button
                android:id="@+id/useMyCurrentLocation"
                android:layout_width="250dp"
                android:layout_height="60dp"
                android:layout_marginTop="20dp"
                android:text="button_use_my_current_location"
                android:textSize="18dp" />
        </LinearLayout>
    </LinearLayout>
    

    Also you can see the Screen shot attached below:

    enter image description here

    Hope you got the point.

    feel free to comment.

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

Sidebar

Related Questions

This is what I want: I had created the top red layout by this
I have a layout like this in which I want to display a label
This is possible to disabled layout for few seconds? I want to layout shows
This layout is a shelf with 3 books each row. I current come up
In my app I want to create a main menu screen layout. The layout
Okay there are 2 scenarios: I have a layout like this: ---------------- button header
Where should I put this code Button txt = (Button) findViewById(R.id.button1); Typeface font =
I want to achieve following layout using javascript/jquery and css. I have a project
I want to read several lines from a text file. These line should be
i want to bulid a table layouts like this.how? alt text http://privateevent.co.uk/underground/img/gallery/19_1236343602.png

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.