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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:08:54+00:00 2026-06-10T14:08:54+00:00

simple question. I have this XML layout: <?xml version=1.0 encoding=utf-8?> <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent android:layout_height=fill_parent

  • 0

simple question. I have this XML layout:

<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
    android:id="@+id/plancus">

     <LinearLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/LoggerContents"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="horizontal"
        android:layout_above="@+id/ButtonsTopLine">
        <TextView
            android:id="@+id/leftpane"
            android:layout_width="0dip"
            android:layout_height="fill_parent"
            android:ems="10"
            android:gravity="center"
            android:layout_weight="1" 
            android:text="@string/logger"/>
        <TextView
            android:id="@+id/rightpane"
            android:layout_width="0dip"
            android:layout_height="fill_parent"
            android:gravity="top"
            android:freezesText="true"
            android:maxLines = "50"
            android:scrollbars = "vertical"
            android:layout_weight="2"/>
    </LinearLayout>
    <LinearLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/ButtonsTopLine"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:layout_above="@+id/ButtonsBottomtLine">
        <Button
            android:id="@+id/askas2"
            android:layout_width="0dip"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="@string/askas2"
            android:onClick="rollLogger"/>
        <Button
             android:id="@+id/askas3"
             android:layout_width="0dip"
             android:layout_height="wrap_content"
             android:layout_weight="1"
             android:text="@string/askas3"
             android:onClick="rollLogger"/>
        <Button
             android:id="@+id/askas4"
             android:layout_width="0dip"
             android:layout_height="wrap_content"
             android:layout_weight="1"
             android:text="@string/askas4"
             android:onClick="rollLogger"/>
        <Button
             android:id="@+id/askas6"
             android:layout_width="0dip"
             android:layout_height="wrap_content"
             android:layout_weight="1"
             android:text="@string/askas6"
             android:onClick="rollLogger"/>
    </LinearLayout>
    <LinearLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/ButtonsBottomtLine"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" 
        android:layout_alignParentBottom="true">
        <Button
           android:id="@+id/askas8"
           android:layout_width="0dip"
           android:layout_height="wrap_content"
           android:layout_weight="1"
           android:text="@string/askas8"
           android:onClick="rollLogger"/>
        <Button
           android:id="@+id/askas10"
           android:layout_width="0dip"
           android:layout_height="wrap_content"
           android:layout_weight="1"
           android:text="@string/askas10"
           android:onClick="rollLogger"/>
        <Button
           android:id="@+id/askas12"
           android:layout_width="0dip"
           android:layout_height="wrap_content"
           android:layout_weight="1"
           android:text="@string/askas12"
           android:onClick="rollLogger"/>
        <Button
           android:id="@+id/askas20"
           android:layout_width="0dip"
           android:layout_height="wrap_content"
           android:layout_weight="1"
           android:text="@string/askas20"
           android:onClick="rollLogger"/>
    </LinearLayout>         
</RelativeLayout>

Is there a way to change it so the first LinearLayout, which contains two TextViews, is not needed?

The first TextView is a left pane while the other is a rightpane. The last should be bigger (not neccesarily 2:1) than the first. The TextViews should fill all the space from the top to the start of the buttons linearviews

  • 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-10T14:08:55+00:00Added an answer on June 10, 2026 at 2:08 pm
    > Is there a way to change it so the first linear layout, which contains two textviews, is not needed?
    
    yes, there is, 
    
        <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/plancus"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical" >
    
        <LinearLayout
            android:id="@+id/ButtonsTopLine"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_above="@+id/ButtonsBottomtLine"
            android:orientation="horizontal" >
    
            <Button
                android:id="@+id/askas2"
                android:layout_width="0dip"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:onClick="rollLogger"
                android:text="@string/askas2" />
    
            <Button
                android:id="@+id/askas3"
                android:layout_width="0dip"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:onClick="rollLogger"
                android:text="@string/askas3" />
    
            <Button
                android:id="@+id/askas4"
                android:layout_width="0dip"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:onClick="rollLogger"
                android:text="@string/askas4" />
    
            <Button
                android:id="@+id/askas6"
                android:layout_width="0dip"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:onClick="rollLogger"
                android:text="@string/askas6" />
        </LinearLayout>
    
        <LinearLayout
            android:id="@+id/ButtonsBottomtLine"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:orientation="horizontal" >
    
            <Button
                android:id="@+id/askas8"
                android:layout_width="0dip"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:onClick="rollLogger"
                android:text="@string/askas8" />
    
            <Button
                android:id="@+id/askas10"
                android:layout_width="0dip"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:onClick="rollLogger"
                android:text="@string/askas10" />
    
            <Button
                android:id="@+id/askas12"
                android:layout_width="0dip"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:onClick="rollLogger"
                android:text="@string/askas12" />
    
            <Button
                android:id="@+id/askas20"
                android:layout_width="0dip"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:onClick="rollLogger"
                android:text="@string/askas20" />
        </LinearLayout>
    
        <TextView
            android:id="@+id/leftpane"
            android:layout_width="wrap_content"
            android:layout_height="fill_parent"
            android:layout_above="@+id/ButtonsTopLine"
            android:layout_alignParentLeft="true"
            android:layout_alignParentTop="true"
            android:ems="10"
            android:gravity="center"
            android:text="@string/logger" />
    
        <TextView
            android:id="@+id/rightpane"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_above="@+id/ButtonsTopLine"
            android:layout_alignParentTop="true"
            android:layout_toRightOf="@+id/leftpane"
            android:freezesText="true"
            android:gravity="top"
            android:maxLines="50"
            android:scrollbars="vertical" />
    
    </RelativeLayout>
    
    
    
    **notice the build order which start from the bottom to the up,**  
    
    by the way `xmlns:android="http://schemas.android.com/apk/res/android"`
    not needed in every layout just once for the root layout
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following layout for my ImageView : <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android
I have a tabLayout where main.xml: <?xml version=1.0 encoding=utf-8?> <TabHost xmlns:android=http://schemas.android.com/apk/res/android android:id=@android:id/tabhost android:layout_width=fill_parent android:layout_height=fill_parent>
Short Question I have a 50dip by 40dip button in my Android XML layout.
I have a basic Android question here: I have a main.xml layout that loads
i have a simple question: i have this var: $v = 24000,1500,1500,1500,1500,1500,; i would
Possible Duplicate: Check if a variable is empty Simple PHP question: I have this
i have this simple question please. I have this part of code which sets
I have a simple question. I have this bitmap Is there a way with
Simple question: I have the following markup... <a href='#'> <img src='icon.png'> This is the
This is hopefully a simple question: I have an OpenGL texture and would like

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.