I was following the accepted answer of this question: Custom ImageView with drop shadow to add a shadow to my simple app's image view. I am reusing the exact the same drawable 9-patch image from the answer, and here is my code:
<ImageView
android:id="@+id/photo"
android:background="@drawable/imageview_shadow"
android:paddingLeft="6px"
android:paddingTop="4px"
android:paddingRight="8px"
android:paddingBottom="9px"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:adjustViewBounds="true"
android:src="@drawable/test_img" />
It looks good on ADT preview 720P screens, but when I install it to my Nexus 5 which has 1080P resolution, it became like this:
Which looks pretty bad. I wasn't aware of 9-patch images could behave differently under different screen resolutions. So what could be the issue the shadow is not showing correctly?
Thank you