I have designed one shape for applying to the background of my linear layout. it works perfect in API level 21. but didn't work in API level 16.please help me.
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke
android:drawable="@android:id/background"
android:width="3dp"
android:color="#023e64">
</stroke>
<corners
android:bottomLeftRadius="16dp"
android:bottomRightRadius="16dp"
android:topLeftRadius="16dp"
android:topRightRadius="16dp"/>
</shape>
It is a known bug, that on API 16 the drawable background becomes black.
Just set the background to android.color.R.transparent
:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke
android:drawable="@android:id/background"
android:width="3dp"
android:color="#023e64">
</stroke>
<solid android:color="@android:color/transparent"/>
<corners
android:bottomLeftRadius="16dp"
android:bottomRightRadius="16dp"
android:topLeftRadius="16dp"
android:topRightRadius="16dp"/>
</shape>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With