Serkay Sarıman
Serkay Sarıman

Reputation: 475

9patch image looks blurry

I want to use 9patch image,but it's looking blurry in device.Here you can see:

enter image description here

You can see edges are blurry.

This is my goal:

enter image description here

And this is my 9patch image:

enter image description here

You can see,it's looking big and blurry in device.This is my xml:

<TextView
    android:id="@+id/user_name"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginTop="6dp"
    android:layout_marginRight="6dp"
    android:layout_marginLeft="4dp"
    android:paddingTop="10dp"
    android:paddingLeft="15dp"
    android:paddingRight="5dp"
    android:gravity="left"
    android:layout_gravity="left"
    android:text="dfgdfgdf"
    android:textSize="12dp"
    android:background="@drawable/mes3" />

How can I fix this ?

Upvotes: 0

Views: 592

Answers (1)

Larry Schiefer
Larry Schiefer

Reputation: 15775

Remove the black border on the left side, just to the left of the "arrow" pointing left and also along the bottom where you have that shadow. The black bars on the left and top are telling the UI what parts can be stretched, so that's why they are being stretched and look blurry.

Upvotes: 1

Related Questions