The following api 21 code shows the outline of a rectangle with a black border of 1 px width:
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <stroke android:width="1dp" android:color="#000000" /> <size android:width="300dp" android:height="50dp"/> </shape>
However, on api 16 I see a solid black rectangle. Why is this a workaround?
Edit: in logcat, I see continuous messages:
HardwareRenderer﹕ draw surface is valid dirty= Rect(107, 214 - 109, 251)
source share