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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:07:29+00:00 2026-06-06T08:07:29+00:00

Description : I am creating customized title bar. The codes for customization is as

  • 0

Description : I am creating customized title bar. The codes for customization is as follow :

styles.xml

<?xml version="1.0" encoding="UTF-8"?>
<resources>
    <style name="CustomTheme" parent="android:Theme">
        <item name="android:windowTitleSize">50dp</item>
     </style>
</resources>

title.xml

<?xml version="1.0" encoding="UTF-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/relativeLayout1"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@drawable/customtitlecolor" >

    <Button
        android:id="@+id/about_back"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:layout_marginLeft="9px"
        android:layout_marginTop="6px"
        android:background="@drawable/custombuttoncolor"
        android:paddingBottom="8px"
        android:paddingLeft="8px"
        android:paddingRight="8px"
        android:paddingTop="8px"
        android:text="Back"
        android:textColor="#ffffff" />

    <TextView
        android:id="@+id/about_text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_centerVertical="true"
        android:text="Large Text"
        android:textAppearance="?android:attr/textAppearanceLarge" />

</RelativeLayout>

and finally 

customizedtitlecolor.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <shape xmlns:android="http://schemas.android.com/apk/res/android">
     <gradient android:startColor="#000000" android:endColor="#777777" android:angle="90"/>
     <corners android:radius="7dp"/>
    </shape>

code in my main activity

requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.title);

Question: My customized title is not adopting fill parent width. There are grey spaces at right and left side. how to remove these spaces??

  • 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-06T08:07:30+00:00Added an answer on June 6, 2026 at 8:07 am

    do it this way it will be solved :

    your style XML:

    <resources> 
     <style name="CustomWindowTitleBackground" /> 
     <style name="CustomTheme" parent="android:Theme"> 
     <item name="android:windowTitleSize">50dp</item>
     <item name="android:windowTitleBackgroundStyle">@style/CustomWindowTitleBackground
     </item>
     </style> </resources>>
    

    then refer it in manifest as :

     android:theme="@style/CustomTheme">  
    

    Hope this help .

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

Sidebar

Related Questions

Problem description: Read an xml file, traverse to a particular node (element), if it
How do I create a custom description and image when im creating a share-link
We document our SQL Server database by creating table and column level Description extended
I am creating a gallery/albums site in Drupal 6. Perhaps the description will be
I'm creating login form using JSF 2.0. Below is the detailed description. When I
i'm creating a map app that displays events with a description overlay that pops
I am creating description label in which i want my description label height should
I am creating an online system that matches bank statements (description, value, type, etc)
description_id description -------------- ------------- 1 Ampicillin Oral 1 Ofloxacin Oral 1 Sulfamoxole+Trimethoprim Oral 2
Description: If we use java objects jruby get permgen too: System.out.println(Initialazing..); //Spring applicaton 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.