since Android 4.3 Update with Sense 5.5 for HTC One I'm experiencing some stange behaviour with my homescreen widgets but ONLY on this device. They have a Background-Shape-Drawable like this:
<?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="#CCFFFFFF" />
<gradient
android:angle="225"
android:endColor="#99346b9f"
android:startColor="#55346b9f" />
<corners
android:bottomLeftRadius="17dp"
android:bottomRightRadius="17dp"
android:topLeftRadius="17dp"
android:topRightRadius="17dp" />
</shape>
Sometimes the background is displayed correctly, but often the background becomes white instead of transparent-blue. I haven't found any Open-GL error Logs or something else that could explain this error. So I tried to work with the background drawable. And now I think I have found a solution, I need more testing to verify this but I will spread this cause I haven't found any other help for that. The only thing I have changed is to combine the four corner attributes to the android:radius attribut. Take a look:
<?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="#CCFFFFFF" />
<gradient
android:angle="135"
android:endColor="#884d8bc3"
android:startColor="#881d3449" />
<corners
android:radius="17dp" />
</shape>
So this seams to help, but I don't know why cause:
android:radius Dimension. The radius for all corners, as a dimension value or dimension resource. This is overridden for each corner by the following attributes.
http://developer.android.com/guide/topics/resources/drawable-resource.html#Shape
It should be equivalent. But on HTC One it isn't.