Reputation: 856
I need a rounded corner on top left and top bottom corners. So I have the shape xml that is set to the button as background.
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<solid android:color="@color/footer_bg_normal" />
<padding
android:bottom="10dp"
android:left="10dp"
android:right="10dp"
android:top="10dp" />
<corners
android:bottomLeftRadius="0dp"
android:bottomRightRadius="0dp"
android:topLeftRadius="20dp"
android:topRightRadius="20dp" />
</shape>
This works as expected on my phone (Nexus 4)
But on a tablet it does not work.
However if I remove all the attributes of corners tag and add only the generic radius (for all the corners), it works. But it has rounded corners on all 4.
android:radius="20dp"
Does anyone have idea, why is this happening? And how can i achieve only top left and top right rounded corners for all the devices?
If this is a known issue in Android, is there any work around?
Upvotes: 1
Views: 1365