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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:39:40+00:00 2026-05-26T04:39:40+00:00

I created a 9-patch PNG but it won’t work. In the Android SDK Tool

  • 0

I created a 9-patch PNG but it won’t work. In the Android SDK Tool everything looks ok. But when i add it to a Button then i only see a pink background. The text placement (padding from the patch) seems to be ok. What am i doing wrong?

     <Button 
    android:id="@+id/button_settings"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:focusable="true"
    android:text="Settings"
    android:textColor="#fff"
    android:background="@drawable/button_settings_idle"
/>

The 9-patch in the Android SDK Tool:

The 9-patch in the Android SDK Tool

A normal Button and the Button with the PNG:

A normal Button and the Button with the PNG

The PNG used in my project

The PNG used in my project

  • 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-26T04:39:40+00:00Added an answer on May 26, 2026 at 4:39 am

    Paint your background image like a rainbow (diagonal gradient is the best), you will then see which part of image overlaps which and possibly why.

    My guess: trim your picture horizontally (remove the middle part and make 9patch do it’s job) then see what happens. If background picture is bigger than actual button, strange things happen – like overlapping “text area” over “fixed” image parts.

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

Sidebar

Related Questions

I want to create some kind of row image that looks like that but
I am trying to create a 9-patch image but the text is not being
I tried to convert all my buttons background to .9.png, but I have a
Hello, see above for my 9 patch image. It is created using the 9
I am creating 9 patch images using draw9patch tool and saving images with extension
I have a Rails 3.1 app with an image: app/assets/images/icons/button.png It seems like the
I use JNI calls to load PNG files with Android class Bitmap using this
I'm trying to create a patch for cf.vim to resolve an issue with hashes.
I have a bash script that creates a Subversion patch file for the current
I have a WPF Path object which is created by reading nodes from a

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.