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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:16:46+00:00 2026-06-15T11:16:46+00:00

Here’s a layout of my Activity XML: For some reason I can’t see that

  • 0

Here’s a layout of my Activity XML:

enter image description here

For some reason I can’t see that button t the bottom of my screen.
Here’s the code:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/app_bg"
    android:orientation="vertical" >    

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content" >

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@drawable/bg_transparent"
        android:orientation="vertical"
        android:minHeight="44dip"
        android:minWidth="44dip" >

        <TextView
            android:id="@+id/lblNotesCount"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:textSize="18sp"
            android:textStyle="bold"
            android:textColor="@color/lblNotesCountColor" />

        <TextView
            android:id="@+id/lblTxtNotes"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:textSize="14sp"
            android:textStyle="bold"
            android:textColor="@color/lblNotesCountColor" />
    </LinearLayout>


    <TextView
        android:id="@+id/txtActivityListByCategory_Header"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:ellipsize="end"
        android:gravity="center_vertical|center_horizontal"
        android:paddingLeft="2dp"
        android:singleLine="true"
        android:textStyle="bold"
        android:textColor="@color/color_WHITE" />

    <Button
        android:id="@+id/btnAddNote"
        style="?android:attr/buttonStyleSmall"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@drawable/btn_new_note_selector"
        android:minHeight="44dip"
        android:minWidth="44dip" />
</LinearLayout>

<TextView
    android:id="@+id/emptyList"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:paddingLeft="2dp"
    android:text="@string/txtEmptyList"
    android:textAppearance="?android:attr/textAppearanceMedium"
    android:textColor="@color/emptyList" />

<ListView
    android:id="@+id/lstNotesByCategory"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:drawSelectorOnTop="false" >
</ListView>


<Button
    android:id="@+id/btnaBack"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="@string/btnBack" />

I tried to put the bottom TextView and ListView in a separate LinearLayout, I tried to give that button a layout_weight – nothing helped, I still don’t see that button, the LinearLayout goes till the bottom of the activity.

What is wrong here? Why don’t I see that button?

EDIT: Wrote down the entire XML code

  • 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-15T11:16:47+00:00Added an answer on June 15, 2026 at 11:16 am

    Make your ListView’s android:layout_height="0dp" and android:layout_weight="1"

    Like this:

    <ListView
        android:id="@+id/lstNotesByCategory"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:drawSelectorOnTop="false" >
    </ListView>
    
    <Button
        android:id="@+id/btnaBack"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/btnBack" />
    

    This will make your ListView expand vertically till the borders of your Button.

    Hope this helps

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

Sidebar

Related Questions

Here is the code for a small program I just wrote to test some
Here is a scenario: User installs .NET application that you have made. After some
Here's the code I have. It works. The only problem is that the first
Here's my situation. I've noticed that code gets harder to maintain when you keep
Here's the situation, i want to have a user that can enter time on
here are 2 screen shots when i try to debug my code in visual
Here's my code in the <head></head> : <link rel=stylesheet href=http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.css /> <script type=text/javascript src=http://code.jquery.com/jquery-1.7.1.min.js></script>
Here is the code in a function I'm trying to revise. This example works
Here is the code: create table `team`.`User`( `UserID` bigint NOT NULL AUTO_INCREMENT , `Username`
Here's some sample HTML <style> .icon {display:none;} </style> <ul> <li>ABC <i id=abc class=icon>x</i></li> <li>DEF

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.