Blurred 1dip shape lines (borders) on Android -


here screenshot app:

enter image description here

it's taken samsung galaxy note 10.1 (mdpi 149 ppi).

my client thinks border line around bottom buttons , rounded rectangle above blurred.

i'm using shape background looks this:

<shape xmlns:android="http://schemas.android.com/apk/res/android"     android:shape="rectangle"     >     <corners         android:radius="8dp" />      <stroke android:width="1dp" android:color="@color/dark_gray" />      <solid android:color="@color/sepia_bright" />  </shape> 

when use simple view line 1dp height this:

<view     android:background="@color/bright_gray"     android:layout_width="match_parent"     android:layout_height="1dp" /> 

it's sharp can see on next screenshot:

enter image description here

simple horizontal lines ok, rectangle around graph blurred again.

what doing wrong?

thanks help.

my first guess problem bi-linear filtration (http://en.wikipedia.org/wiki/bilinear_filtering).

to fix it, see view#setlayertype method.

i had issue in custom view. inside view's init method, have following code:

    if(android.os.build.version.sdk_int >= android.os.build.version_codes.honeycomb){         this.setlayertype(view.layer_type_software, null);               } 

this fixed issue, same thing using android:layertype xml attribute, or setlayertype method in code on view.


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -