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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:39:14+00:00 2026-06-03T20:39:14+00:00

when i customize title bar in view by adding a image, i face an

  • 0

when i customize title bar in view by adding a image, i face an issue as the images is not fixed to the edges accurately. I have attached the image where you can see space between the window margin and image added. How to overcome this problem. Below are the code that i have used to customize the title bar. Can anyone help me to fix this issue.

java code :

 requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
 setContentView(R.layout.home_view);
 this.getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE,
            R.layout.upwindow);

layout code :

  <?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="32dp">

     <ImageView
         android:id="@+id/imageView1"
         android:layout_width="fill_parent"
         android:layout_height="fill_parent"
         android:background="@drawable/up_bar"
         android:src="@drawable/up_bar" />

<TextView 
    android:id="@+id/pagename"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:text="Sify MyStorage"
    android:textAppearance="?android:attr/textAppearanceMedium" />

</RelativeLayout>

enter image description here

  • 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-03T20:39:15+00:00Added an answer on June 3, 2026 at 8:39 pm

    create style xml in values folder :

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

    then refer it in manifest as :

     android:theme="@style/CustomTheme">
    

    this will solve it .

    hope this help .

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

Sidebar

Related Questions

I created a View that gets the title, body and attached image of some
I want to customize the title bar for an Android application. I have the
I am looking to customize an AQGridViewCell by adding a title, date, and image
I have customised the navigation controller title bar with a background image, but I
Is there any way to customize Java application's title bar? I don't mean app
I would like to have a customized title bar in my Java Swing desktop
I am not sure if I have set the right title for this post
Does anybody know how can I customize title bar of a main window in
I'd like to customize the way I draw the window title bar on OS
I'll show you my problem by image. I have tableView in which i customize

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.