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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:57:15+00:00 2026-05-31T08:57:15+00:00

I have 3 layouts. First and third ones are RelativeLayout and the middle one

  • 0

I have 3 layouts. First and third ones are RelativeLayout and the middle one is TableLayout. What I want is the TableLayout should lay over 80% of screen. And 10% for the others. How could I do this? android:layout_weight did not help me. Please could you put a code for this solution?

  • 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-31T08:57:17+00:00Added an answer on May 31, 2026 at 8:57 am

    Ok here are some steps:

    • set to the relative and table layouts android:layout_width to 0dp
    • in the parent layout add android:weightSum to 10
    • in each of the 3 child layouts add android:layout_weight and set the first & third to the value of 1 and the middle table layout to 8.

    Here is the code and screenshot:

    graphical editor view

    <?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="10" >
    
        <RelativeLayout
            android:id="@+id/leftPane"
            android:layout_width="0dp"
            android:layout_height="fill_parent"
            android:background="#336699"
            android:layout_weight="1">
    
            <TextView
            android:id="@+id/textView1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="10% wide"
            android:textAppearance="?android:attr/textAppearanceLarge" />
    
        </RelativeLayout>
    
        <TableLayout
            android:id="@+id/tableLayout1"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="8">
    
                <TableRow
                    android:id="@+id/tableRow1"
                    android:layout_width="wrap_content"
                    android:layout_height="fill_parent" 
                    android:background="#00FFFF">
    
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="row 1" />
    
                </TableRow>
    
                <TableRow
                    android:id="@+id/tableRow2"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:background="#33FFFF" >
    
                                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="row 2" />
                </TableRow>
    
                <TableRow
                    android:id="@+id/tableRow3"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:background="#66FFFF" >
    
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="row 3" />
    
                </TableRow>
    
                <TableRow
                    android:id="@+id/tableRow4"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:background="#99FFFF" >
    
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="row 4" />
    
                </TableRow>
    
            </TableLayout>
    
        <RelativeLayout
            android:id="@+id/rightPane"
            android:layout_width="0dp"
            android:layout_height="fill_parent"
            android:background="#336699"
            android:layout_weight="1">
    
            <TextView
            android:id="@+id/textView1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="10% wide"
            android:textAppearance="?android:attr/textAppearanceLarge" />
    
        </RelativeLayout>
    
    </LinearLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want to create a Listview with two different Layouts. The first item should
Suppose I have 3 completely different layouts for one site. The first is shown
I have two layouts, one is the main layout inside which I am including
I want to have different layouts like [left|content|right] and [left|content] or [content|right] when using
I have a doubt in layouts.I have designed one layout using group layout using
In my application i am using 3relative layouts. First one for header, second one
I would like to have two linear layouts inside a third parent layout. I
I have three Relative layouts in may app, on above another. <RelativeLayout_1><CheckBox></CheckBox></RelativeLayout> <RelativeLayout_2></RelativeLayout> <RelativeLayout_3></RelativeLayout>
I have a relative layout with 3 ImageViews. The first one is a square
In one of my views, I have three EditText fields. The first two are

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.