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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T16:14:54+00:00 2026-05-20T16:14:54+00:00

In my custom list activity, I have added header in my list activity, it

  • 0

In my custom list activity, I have added header in my list activity, it works fine when the list is populated, when it is empty the header also gone, so is there any option to place a permanent header in the list activity.

My XML code is,

<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:background="@drawable/background">

<ListView
    android:id="@android:id/list"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_weight="1"
    android:layout_marginTop="10dip"
    android:layout_marginBottom="10dip"
    android:drawSelectorOnTop="false"
    android:cacheColorHint="@color/black"/>

<TextView
    android:id="@android:id/empty"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:gravity="center_vertical"
    android:textSize="24dip"
    android:text="@string/empty"/>

ad_header.xml

<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:myapp="http://schemas.android.com/apk/res/com.example.Password"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:orientation="vertical">

<ImageView
    android:id="@+id/add"
    android:layout_height="wrap_content"
    android:layout_width="fill_parent"
    android:layout_gravity="center"
    android:layout_weight="1"
    android:paddingTop="5dip"
    android:paddingBottom="5dip"
    android:src="@drawable/add_new_item"
    android:background="@color/white"/>

Thanks.

  • 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-20T16:14:55+00:00Added an answer on May 20, 2026 at 4:14 pm

    Here is another thread related to your question Android: Adding static header to the top of a ListActivity

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

Sidebar

Related Questions

I wonder if there is a way to create a Custom List in Sharepoint,
I have defined a custom Sharepoint list for special attributes related to a software
I have a DataGridView with its datasource set to a generic list of custom
I have a custom class Contact . I am trying to bind a List<Contact>
I have an activity that has two tabs and a list view in each.
I have a custom ListView activity that maintains a state array (3 choices, default=black,
I've created a custom list, and made some changes to the way the CQWP
Like many other SharePoint users, I've had to create a custom list definition. After
I'm creating a custom drop down list with AJAX dropdownextender. Inside my drop panel
I'm trying to bind a list of custom objects to a WPF Image 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.