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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:16:17+00:00 2026-05-27T11:16:17+00:00

I have created a custom titlebar for all my listview activities using the following

  • 0

I have created a custom titlebar for all my listview activities using the following window_title.xml

window_title.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="horizontal"
        android:layout_width="fill_parent"
        android:layout_height="35dp"
        android:gravity="center_vertical"
        android:paddingLeft="5dp"
        android:background="#323331">

        <ImageView
                android:id="@+id/header"
                android:src="@drawable/ic_launcher"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" />


        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="fill_parent"
            android:layout_weight="1"
            android:gravity="right|center_vertical"
            android:paddingRight="5dp" >

                <TextView
                        android:id="@+id/title"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:textSize="11dp"
                        android:paddingRight="5dp" />

            <ImageView
                        android:id="@+id/icon"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"/>

        </LinearLayout>

</LinearLayout>

My main.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:paddingTop="4dp">   


    <ListView
        android:id="@android:id/list"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:drawSelectorOnTop="false"
        android:background="#CFECEC"
        android:cacheColorHint="#00000000"/>

</RelativeLayout>

list_item.xml

<?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="horizontal"
    android:padding="8dp" >

    <ImageView
        android:id="@+id/icon"
        android:layout_width="22dp"
        android:layout_height="22dp"
        android:layout_marginLeft="4dp"
        android:layout_marginRight="10dp"
        android:layout_marginTop="4dp"
        android:src="@drawable/list_icon" >
    </ImageView>

    <TextView
        android:id="@+id/firstName"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textColor="#4AA02C"
        android:textSize="20dp"
        android:layout_marginLeft="38dp"
        android:textStyle="bold" />

    <TextView
        android:id="@+id/lastName"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="2dp"
        android:layout_toRightOf="@id/firstName"
        android:textColor="#4AA02C"
        android:textSize="20dp"
        android:textStyle="bold" />

    <TextView
        android:id="@+id/title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@id/firstName"
        android:textColor="#254117"
        android:textSize="12dp" 
        android:layout_marginLeft="38dp"/>

</RelativeLayout>

This is a screenshot of the activity.

ScreenShot of Main Activity

Here you can notice a black space below the titlebar. How can this be removed?

  • 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-27T11:16:17+00:00Added an answer on May 27, 2026 at 11:16 am

    I think android:paddingTop="4dp" in your relative layout of My Main.xml is the problem. Try after removing that.

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

Sidebar

Related Questions

friends, i have created custom title bar using following titlebar.xml file with code <?xml
I am making a custom titlebar using the following xml file: <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:id=@+id/myTitle
We have created custom listview by using the Base adapter. List view contains Text
I have created custom MembershipUser, MembershipProvider and RolePrivoder classes. These all work and I
I have created a custom dialog for Visual Studio Setup Project using the steps
I have created a custom attribute that I am using on my class MyClass
I have created a custom module and am using hook_block to programmatically create some
I have created custom result class to serialize json data to xml. I want
I have created a Custom Edit Form for a custom list using SharePoint designer.
I have created a Custom preference which has the following constructor public CoordinatesPreference(Context context,

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.