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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:12:11+00:00 2026-05-27T16:12:11+00:00

I want to give a custom title above my listView . After reading some

  • 0

I want to give a custom title above my listView. After reading some threads here I made the code as follows, but the title bar size is becoming very small, i want to make it a little bigger. Also while scrolling down the list a big gap is created between the listview top and title bar. How can I avoid this? Can anybody help me?

public void onCreate(Bundle savedInstanceState) {
     super.onCreate(savedInstanceState);
   requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
   setContentView(R.layout.main);
   getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.citylisttitle);
    }
  • 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-27T16:12:12+00:00Added an answer on May 27, 2026 at 4:12 pm

    Here’s how I did it.
    First, in the manifest set your activity to have no title.

    <activity android:name="Detail"
        android:label="@string/app_name"
        android:theme="@android:style/Theme.Light.NoTitleBar"/>
    

    Then add your custom title bar at the top of the layout.

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">
    
        <LinearLayout android:id="@+id/detail_titleBar"
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@android:drawable/title_bar"
        android:layout_alignParentTop="true">
    
            <TextView android:id="@+id/detail_account" 
            android:layout_width="wrap_content" 
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:paddingTop="5dp"
            android:paddingBottom="5dp"
            android:textSize="18sp"
            android:textColor="@android:color/white"/>
    
        </LinearLayout>
    
        <ListView android:id="@+id/detail_list"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_below="@id/detail_titleBar"
        android:layout_above="@+id/detail_iconbar"/>
    
    <LinearLayout android:id="@+id/detail_iconbar"
        android:orientation="horizontal"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:background="@android:drawable/bottom_bar"
        android:gravity="center_vertical">
        ....
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to give custom cell's UIButton IBAction event. I tried with below code
i want to add a custom listview with an title aboce the list. I
I want to give a custom CSS property to the specified range of the
I am creating the custom textview i want to give black textcolor to this
I want to give an alert after person sign up successfully. And then I
I want to give the name of MainWindow.xib file in plist file through code,
I want to give a user access to a stored procedure, but not to
So the title is a tad ambiguous, but I'll try and give an example.
I want to give tooltip on my attribute on lead form. I set: crmForm.all.my_custom_attribute_c.title=My
I want to give entirely custom url to my article something like: /games/2010/junee2010/6/Dexter%20the%20Game.html Because

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.