java - Android: api 16 draws outline of rectangle as filled rectangle -
the following code on api 21 shows outline of rectangle 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'm seeing solid black rectangle. why , there workaround?
edit: in logcat i'm seeing continuous messages of:
hardwarerenderer﹕ draw surface valid dirty= rect(107, 214 - 109, 251)
i had same problem few weeks ago. added transparent solid. try with:
<?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"/> <solid android:color="@android:color/transparent" /> </shape>
Comments
Post a Comment