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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:38:33+00:00 2026-05-24T19:38:33+00:00

When I set 9.PNG image as RelativeLayout ‘s background, all elements inside it gets

  • 0

When I set 9.PNG image as RelativeLayout‘s background, all elements inside it gets shrunken to the middle. Here is the XML and the snapshot.

<RelativeLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:background="@drawable/bg"
        >
    <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Just a simple white text which does not show up"
            android:textColor="#ffffff"
            />
</RelativeLayout>

nine-patch background

If I change background to a color or a normal image, I get the text.

android:background="@drawable/bg2" //normal image

normal-image background

Can anyone explain why is this happening?

  • 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-24T19:38:35+00:00Added an answer on May 24, 2026 at 7:38 pm

    Did you define the content area of your nine-patch? Because it looks like the content area is the little pixel in the middle.

    The content area is defined by the bottom and right sides of your nine patch. You can for example make it as big as your patch.

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

Sidebar

Related Questions

How can i set png image with transparency for background of section's header in
I have an image (PNG file) that has an alpha channel that is set
I have a image (png file) with opacity 35%, i want for example: Set
Here is my IB setup: http://img145.imageshack.us/img145/5929/picture1gxr.png When both NSScrollView and NSTableView are set to
In css you may normally set both a background-image, and a background-color, and the
my app's orientation is in landscape right. and i want to set default.png image
How does one set the CSS background-image property to just load one particular icon
I have an image button with a background image .png of a circle. I
I use this code to create an image from another png image, the background
I am trying to set a 9-patch image as the background for one of

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.