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

  • Home
  • SEARCH
  • 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 8720379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:01:38+00:00 2026-06-13T07:01:38+00:00

I have this layout file as my main activity’s layout. when I don’t have

  • 0

I have this layout file as my main activity’s layout. when I don’t have the linear layout and the two textview in the middle, the list view worked. however, when i have them in the file, the view wont show the listview content. Can anyone tell whats the problem?

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

      <LinearLayout    
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:orientation="horizontal">
        <TextView
            android:id="@+id/today_header"
            android:layout_width="fill_parent"
            android:layout_weight="2"
            android:layout_height="70dip"
            android:textColor="#dc6800"
            android:textSize = "20sp"
            android:paddingTop="12dip"
            android:paddingLeft="10dip"

           >
        </TextView>
        <TextView
            android:id="@+id/today_total"
            android:layout_width="fill_parent"
            android:layout_weight="3"
            android:layout_height="70dip"
            android:textSize = "6sp"
            android:textColor="#4A4A4A"
            android:paddingTop="20dip"
            android:paddingRight="25dip"
            android:textStyle="bold"
             />

    </LinearLayout>
    <ListView
        android:id="@android:id/list"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"/>

</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-13T07:01:39+00:00Added an answer on June 13, 2026 at 7:01 am

    It is because the LinearLayout is set to android:layout_height="fill_parent"
    and the TextViews, well they take up the whole screeen because you set weights to them, so the actuall height of the TextViews does not get applied.

    Change it to:

    <?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">
    
          <LinearLayout    
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">
            <TextView
                android:id="@+id/today_header"
                android:layout_width="fill_parent"
                android:layout_weight="2"
                android:layout_height="70dip"
                android:textColor="#dc6800"
                android:textSize = "20sp"
                android:paddingTop="12dip"
                android:paddingLeft="10dip"
    
               >
            </TextView>
            <TextView
                android:id="@+id/today_total"
                android:layout_width="fill_parent"
                android:layout_weight="3"
                android:layout_height="70dip"
                android:textSize = "6sp"
                android:textColor="#4A4A4A"
                android:paddingTop="20dip"
                android:paddingRight="25dip"
                android:textStyle="bold"
                 />
    
        </LinearLayout>
        <ListView
            android:id="@android:id/list"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"/>
    
    </LinearLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a main activity with this layout file: <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android
I have a main.xml file describing the layout of my main activity: <?xml version=1.0
I have this class: class View(object): def main_page(self, extra_placeholders = None): file = '/media/Shared/sites/www/subdomains/pypular/static/layout.tmpl'
I have this layout that works correctly, a relative layout with a text view
I have a question about Android. Assume we have our main xml layout file,
I have following goal: From a list in main activity that extends ListActivity, I
I have a main activity, that holds the main menu. This menu has an
I have created an xml file like this: <?xml version=1.0 encoding=utf-8?> <ListView xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=match_parent
I have been told to edit this file in Sharepoint Designer: /_layouts/KWizCom_WikiPlus/CreateNew.aspx I found
I have this layout: <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=match_parent android:layout_height=wrap_content android:orientation=horizontal android:gravity=left> <LinearLayout android:layout_width=wrap_content android:layout_height=wrap_content android:orientation=horizontal>

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.