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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:29:43+00:00 2026-06-17T17:29:43+00:00

I have a layout that has a horizontal container, then 2 vertical containers inside

  • 0

I have a layout that has a horizontal container, then 2 vertical containers inside it.
The first vertical container has a web view followed by a textview. The textview does not get created and the webview fills the height. I tried to set the height of the web control by
android:layout_height=”60px”, but it seems like it is not working.

The xml file

<?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="vertical" >

    <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/hello" />

    <LinearLayout
        android:id="@+id/mainLayout"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_gravity="center" 
        android:orientation="horizontal">


        <LinearLayout
            android:id="@+id/mainLayout"
            android:layout_width="wrap_content"
            android:layout_height="fill_parent"
            android:orientation="vertical">

         <WebView
            android:id="@+id/webAuthor"
            android:layout_width="60px"
            android:layout_height="60px"
            android:layout_weight="1.0"  />

          <TextView
            android:id="@+id/textChats"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="hello" />

        </LinearLayout> 

        <LinearLayout
            android:id="@+id/mainLayout"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:background="@drawable/eventsbakground"  
            android:orientation="vertical">

            <ImageView                  
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/addbanner"
                android:id="@+id/butAdd"    
                android:layout_gravity="center"   
                android:layout_marginTop="12px" />

            <ListView
                android:id="@+id/mylist"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" >
            </ListView>    

        </LinearLayout>                    
    </LinearLayout>          
</LinearLayout>
  • 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-17T17:29:44+00:00Added an answer on June 17, 2026 at 5:29 pm

    As mentioned @Vikram Singh , Remove android:layout_weight="1.0", when you set your view’s layout_weight to “1.0” it means that this view must fill hole parent.

    With layout_weight you can specify a size ratio between multiple views. E.g. you have a MapView and a table which should show some additional information to the map. The map should use 3/4 of the screen and table should use 1/4 of the screen. Then you will set the layout_weight of the map to 3 and the layout_weight of the table to 1. But When you are setting 1 to only one it’ll fill parent

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hy, I have a layout in the views/layout that has 2 cols and then
I have a Linear Layout that has a Button and a TextView on it.
I have an ExtJS Viewport with a container that has the border layout and
I have a layout that has some horizontal scroll on top, some text box
I have a layout that has a ViewPager inside of a custom ScrollView and
I have a two column site layout that has the content of the left
I have been able to design my layout so that it has 2 columns
I have this layout that works correctly, a relative layout with a text view
I have an XML layout that defines a TextView box 50px x 320px who
I have a layout that has 3 buttons. And I want to locate two

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.