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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:02:20+00:00 2026-05-31T06:02:20+00:00

I have been trying to get this layout correct and having trouble. Here is

  • 0

I have been trying to get this layout correct and having trouble.

Here is what i would like it to look like in landscape mode.

-------------------------------------------------
A Button                 |A TextView
-------------------------|
A ListView               |
                         |
                         |
                         |
                         |
                         |
-------------------------------------------------

I have tried a few different ways. Below is the closest i have got. However, it makes the TextView take up the majority of the screen.

I want the first half to take up 50% and the second half to take up the other 50% of the width of the screen. I have tried a way that used weights, but i have read that using nested weights is bad.

So i tried switching to RelativeLayout and it had the same problem mentioned above. Thanks for the help in advance!

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

    <TableRow>

        <LinearLayout
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical" >

            <include
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="0"
                layout="@layout/new_note_button" />

            <fragment
                android:id="@+id/note_list"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                class="ashton.learning.projects.simplenotes.NoteListFragment" />
        </LinearLayout>

        <FrameLayout
            android:id="@+id/note_details"
            android:layout_width="wrap_content"
            android:layout_height="fill_parent">
        </FrameLayout>

    </TableRow>

</TableLayout>
  • 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-31T06:02:21+00:00Added an answer on May 31, 2026 at 6:02 am

    Here is my answer with screen shot from graphical editor, you may want to add your own padding and alignment. The trick to 50/50 (or any other split) is using weightSum on the parent layout then specifying how you want the weights distributed.

    In this example the weightSum is 2 and the left side and right share it equally by having a weight of 1. Last trick is to set the layout_width to 0dp.

    Screenshot

    <?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="2" >
    
        <LinearLayout
            android:id="@+id/linearLayout1"
            android:layout_width="0dp"
            android:layout_height="fill_parent"
            android:orientation="vertical"
            android:background="#c6c6c6"
            android:layout_weight="1" >
    
            <Button
                android:id="@+id/button1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Button" />
    
                <TextView
            android:id="@+id/textView1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="REPLACE ME WITH A LIST VIEW"
            android:textAppearance="?android:attr/textAppearanceLarge" />
    
    
        </LinearLayout>
    
        <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="I am the right pane text view"
            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 have been trying to get this one section of my UI to immediatly
I have been trying to get around this error for a day now and
I have been trying to days now to get this website completed ... however,
This is crazy, I have been trying for hours to get this to work.
So I have been trying for hours to get this to work and I
Hi been trying to get this to work for ages, i have a deals
I have been trying to get this seemingly simple problem fixed for about half
I have been trying to get it to work using this thread but can't
So I have been asking questions here trying to get the answer for myself
I have been trying to get more in to TDD. Currently keeping it simple

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.