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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T09:51:44+00:00 2026-06-08T09:51:44+00:00

I am having trouble removing anti-aliasing on a 9-patch png and a normal drawable

  • 0

I am having trouble removing anti-aliasing on a 9-patch png and a normal drawable that is tiled to make a background. I am using the 9-patch as a background for my EditText controls and the tiled drawable is used as a background for an ImageView to create the ‘divider’.

Here is some enlarged versions of my 9 patch png (it’s hard to show white graphics so I filled in the transparent areas in blue):

9 patch

And my tiled background image along with the xml that defines the tiled pattern:

tile

<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
    android:src="@drawable/border_diagonal_lines"
    android:tileMode="repeat"
    />

Here is the whole thing put together:

app screenshot

The screenshot on the left is what I currently get and the screenshot on the right is what I want it to look like. What could I do to achieve the desired effect?

I also would like the imageview with the tiled background to always be 3 pixels tall regardless of screen resolution but using ‘pixels’ as units is generally a bad idea. Is there a way round this?

  • 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-08T09:51:46+00:00Added an answer on June 8, 2026 at 9:51 am

    It isn’t anti-aliasing your graphics, it’s probably scaling them (which, granted, may also perform anti-aliasing, but it’s not the cause). Are you placing them in the correct density-specific folder? (e.g. drawable-hdpi, drawable-xhdpi, etc.) If you are doing that, also make sure you are not using the android:anyDensity="true" tag in your manifest.

    I also would like the imageview with the tiled background to always be
    3 pixels tall regardless of screen resolution but using ‘pixels’ as
    units is generally a bad idea. Is there a way round this?

    It’s discouraged in general cases, when the system should be handling scaling for multiple densities (using DP instead), but if you specifically need something 3 pixels tall, then there’s nothing “bad” about specifying a pixel height.

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

Sidebar

Related Questions

I am using Ruby and I am having trouble removing a gem. The gem
I'm new to DOM and I'm having trouble removing multiple images that I loaded
I'm having some trouble removing an element that gets added dynamically to the DOM.
I am having trouble removing leaks from an iPhone app that i'm working on.
I'm having trouble removing that 1px border directly under the UISearchBar view. Now it
I am having trouble programmatically removing stacks from a view. I am doing things
I am having trouble with hiding/removing the card owner and image from the card
I'm having some trouble dynamically removing UITextFields from my scrollview when the user taps
I'm having trouble with adding and then removing an AjaxSelfUpdatingTimerBehavior in Apache Wicket. The
I'm having trouble removing a gem from my system. When i ask gem where

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.