This seems like a mistake when creating a stroke in an XML drawing. After several attempts, I narrowed it down to this; It seems to make the wrong stroke size on the bottom and right sides of the form, even if specified in pixels. If I just change the stroke width to 2dip instead of 1dip (everything else remains as it is), this is the result:

This is the border.xml that I used for the background after the image:
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <stroke android:width="2dp" android:color="#59000000"/> <padding android:bottom="1dp" android:left="1dp" android:right="1dp" android:top="1dp"/> </shape>
Which, again, is only yours, with an increased stroke width. Well, this does not change the expected result at all , since the indentation remains unchanged. In fact, you can change the stroke tag to solid and still have the same result (however, if your images contain transparency, you will see a solid background in transparent areas).
Try it; let me know how it works for you!
kcoppock
source share