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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T14:35:56+00:00 2026-06-07T14:35:56+00:00

how to arrange controls like below image. i already tried with below xml code,

  • 0

how to arrange controls like below image.

enter image description here

i already tried with below xml code,

<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tableLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >

<TableRow
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:padding="5dip" >

    <TextView
        android:id="@+id/textView1"
        android:text="Device Status"
        android:textAppearance="?android:attr/textAppearanceLarge" />

    <ToggleButton
        android:id="@+id/toggleButton1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="right"
        android:layout_column="2"
        android:textOff="Device Off"
        android:textOn="Device On" />       
</TableRow>

<TableRow
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:padding="5dip" >

    <Button
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_column="2"
        android:text="Save"
        android:onClick="onSaveButtonClick"
         />
</TableRow>    
  </TableLayout>

but i got result like this (i need some gap between device status and on/off)

enter image description here

advance 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-07T14:36:00+00:00Added an answer on June 7, 2026 at 2:36 pm

    Try this

    <?xml version="1.0" encoding="utf-8"?>
    <TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/tableLayout1"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">
        <TableRow android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:padding="5dip">
            <TextView android:id="@+id/textView1"
                android:layout_width="0dp"
                android:layout_weight="1"
                android:text="Device Status"
                android:textAppearance="?android:attr/textAppearanceLarge"/>
            <ToggleButton android:id="@+id/toggleButton1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="right"
                android:layout_column="2"
                android:textOff="Device Off"
                android:textOn="Device On"/>       
        </TableRow>
        <TableRow android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:padding="5dip" 
            android:gravity="right">
            <Button android:id="@+id/button1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_column="2"
                android:text="Save"
                android:onClick="onSaveButtonClick"/>
        </TableRow>    
    </TableLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

please help me arrange these 3 buttons horizontally like this photoshopped image: Please take
I need to arrange Component One below other like Swing's BoxLayout Y axis scenario
Please provide a solution to arrange two EditView controls same horizontal position. How to
I'd like to arrange things so that I have a chain of keyboard event
can any one tell me the details about below displayed control?can i arrange images
I have two repeaters that looks like this : Arrange By: Name | Age
I'm working on a .Net Windows application. All the controls arrange fine, but when
I would like to arrange UIControls in WPF in a similar way to the
Good time! My question is concerned to the arrange of tabs in Android apps.
I have controls in a webpage within a div, my requirement is to arrange

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.