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):
And my tiled background image along with the xml that defines the tiled pattern:
<?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:
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?