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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:24:21+00:00 2026-05-26T20:24:21+00:00

EDITED: I HAVE FOUND THE SOLUTION MYSELF. THANK YOU! I want to create the

  • 0

EDITED: I HAVE FOUND THE SOLUTION MYSELF. THANK YOU!

I want to create the following screen for an Android App:
ideal screen

Right now I have this:
current dev

with this code:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="horizontal"
    android:weightSum="1" >

    <LinearLayout
        android:id="@+id/linearLayout1"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical"
        android:layout_weight=".65"
        android:weightSum="5" >

        <TextView
            android:id="@+id/textView1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="TOURNAMENT: "
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:layout_weight="1"
            android:layout_marginLeft="10dp"/>
        <TextView
            android:id="@+id/textView1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="GAME: "
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:layout_weight="1"
            android:layout_marginLeft="10dp" />
        <TextView
            android:id="@+id/textView1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="BEST OF: "
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:layout_weight="1"
            android:layout_marginLeft="10dp" />
        <TextView
            android:id="@+id/textView1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="BRACKET STYLE: "
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:layout_weight="1"
            android:layout_marginLeft="10dp" />

    </LinearLayout>

    <LinearLayout
        android:id="@+id/linearLayout1"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical"
        android:layout_weight=".35"
        android:weightSum="5" >

        <EditText
            android:id="@+id/editText1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:layout_marginRight="10dp" />

        <EditText
            android:id="@+id/editText1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:layout_marginRight="10dp" />

        <EditText
            android:id="@+id/editText1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:layout_marginRight="10dp" />
        <EditText
            android:id="@+id/editText1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:layout_marginRight="10dp" />

        <RelativeLayout
            android:id="@+id/linearLayout1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:layout_weight="1" >

            <Button
                android:id="@+id/button2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:layout_marginRight="15dp"
                android:text="CANCEL" />

            <Button
                android:id="@+id/button1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:layout_toLeftOf="@+id/button2"
                android:text="CREATE" />

        </RelativeLayout>

</LinearLayout>

</LinearLayout>

The text can be aligned to the right using android:gravity=”right”, but how can I make it
centered vertically?

–> AISHH, it’s: android:gravity=”center_vertical|right”

Thank you!!

  • 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-26T20:24:22+00:00Added an answer on May 26, 2026 at 8:24 pm

    So this is the implementation I came up with. Not the best but worked for me 🙂

    <LinearLayout
        android:id="@+id/linearLayout1"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical"
        android:layout_weight=".65"
        android:weightSum="5"
        android:paddingTop="10dp" >
    
        <TextView
            android:id="@+id/textView1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="TOURNAMENT: "
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:layout_weight="1"
            android:layout_marginLeft="10dp"
            android:gravity="center_vertical|right"/>
        <TextView
            android:id="@+id/textView1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="GAME: "
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:layout_weight="1"
            android:layout_marginLeft="10dp"
            android:gravity="center_vertical|right"/>
        <TextView
            android:id="@+id/textView1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="BEST OF: "
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:layout_weight="1"
            android:layout_marginLeft="10dp"
            android:gravity="center_vertical|right"/>
        <TextView
            android:id="@+id/textView1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="BRACKET STYLE: "
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:layout_weight="1"
            android:layout_marginLeft="10dp"
            android:gravity="center_vertical|right"/>
    
        <!-- fill up the space so that the components on top are displayed correctly -->
    
        <TextView
            android:id="@+id/textView1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text=""
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:layout_weight="1"
            android:layout_marginLeft="10dp"
            android:gravity="center_vertical|right"/>
    </LinearLayout>
    
    <LinearLayout
        android:id="@+id/linearLayout1"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical"
        android:layout_weight=".35"
        android:weightSum="5"
        android:paddingTop="10dp" >
    
        <EditText
            android:id="@+id/tourName"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:layout_marginRight="10dp"
            android:gravity="center_vertical|left" />
    
        <Spinner
            android:id="@+id/spinGameName"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:layout_marginRight="10dp"
            android:gravity="center_vertical|left" />
    
        <Spinner
            android:id="@+id/spinBestOf"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:layout_marginRight="10dp"
            android:gravity="center_vertical|left" />
    
        <Spinner
            android:id="@+id/spinBracketType"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:layout_marginRight="10dp"
            android:gravity="center_vertical|left" />
    
        <RelativeLayout
            android:id="@+id/linearLayout1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:layout_weight="1" >
    
            <Button
                android:id="@+id/btnCancel"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:layout_marginRight="15dp"
                android:text="CANCEL" />
    
            <Button
                android:id="@+id/btnCreate"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:layout_toLeftOf="@+id/btnCancel"
                android:text="CREATE" />
    
        </RelativeLayout>
    
    </LinearLayout>
    

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

Sidebar

Related Questions

I have asked the same question before and I found this solution : if
UPDATE I am still debugging this issue and still have not found a solution.
EDITED with solution (below...) I have a Splash screen that is packaged into it's
--edited for clarity (hopefully) I have an XML file that looks something like this:
Hi there I have edited some code I have found on-line and everything works
I found a nice solution on this webiste http://www.thesilvermethod.com/Default.aspx?Id=ModalDialogManagerAsimpleapproachtodealingwithmodaldialogsinMVVM But had to do some
I have found quite a few questions related to this but I haven't found
EDIT: I have edited my post... Working on a project (c#), I have a
i have an edited version of a config file specific for my machine. i
I have a bunch of different objects that are commonly edited in the same

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.