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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:24:06+00:00 2026-05-27T05:24:06+00:00

I am using a RelativeLayout on the screen. I have RadioButtons docked to the

  • 0

I am using a RelativeLayout on the screen. I have RadioButtons docked to the right side of the screen and I want to align the TextViews to the left of the RadioButtons.

So here is an example of my text view:

    <TextView
        android:id="@+id/editText2"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_toLeftOf="@+id/radioButton1"
        android:gravity="right"
        android:hint="@string/error1" />

I am not sure if it aligns them to the center of the RadioButton and not below because that doesn’t work for me. I hate Eclipse’s (adt) xml gui, and editing in xml file because I don’t get what I want. Is there an easier gui, xml editor?

  • 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-27T05:24:07+00:00Added an answer on May 27, 2026 at 5:24 am

    Well there is no better xml gui editor for android for now. IntelliJ Idea 10.5 doesnot even have screen preview only xml editor.

    Now the trick to use the screen gui editor and xml editor. You start with basic gui editing by screen editor that comes with ADT and then to fine tune either use properties or raw xml editor.

    As per what you want for above problem. Here is the soln:

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >
    
    <RadioButton
        android:id="@+id/radioButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_alignParentTop="true" />
    
    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:layout_toLeftOf="@+id/radioButton"
        android:text="TextView" />
    
    </RelativeLayout>
    

    For creating this i didnot edit the xml file myself. I just used the gui screen editor that comes with ADT. Here are the steps

    • I created the xml with Relative layout via wizard that is also part of ADT.
    • Added RadioButton from left pane and dragged it towards the right edge of the screen till i can see two green anchor points appear and in the yellow info appeared stating the properties for alignment.
    • Then I added TextView and drag towards the left till I see green anchor points.
    • Then I dragged the right edge of TextView towards the RadioButton till I see green anchor and the correct layout_toLeftOf property in the yellow info box.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have designed the screen using this relative layout. <?xml version=1.0 encoding=utf-8?> <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android
I have a screen filled with buttons, but want the onTouch-method to use the
I have a RelativeLayout filling the screen and a couple of ImageView positioned on
I want to have two TextView elements appear side by side (in a list
i am using following code. <RelativeLayout android:layout_width=310dp android:layout_height=70dp android:layout_below=@+id/UIReportView android:layout_marginLeft=4dp android:layout_marginTop=2dp android:background=@drawable/small_corners > small_corners
Using Nunit, I want to be able to write a test fixture that will
Using C# for ASP.NET and MOSS development, we often have to embed JavaScript into
I have an Android Activity with a RelativeLayout and I have implemented the following
I'm using a Relative layout as the root or parent container and I have
I have a strange situation. I'm using NexPlayer to render streaming video in openGL

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.