0

I am giving a custom shape to a Button. The xml file which is used as background for Button is as follows:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:padding="10dp"
    android:shape="rectangle" >
<solid android:color="#2E8B57" />

<corners
    android:bottomLeftRadius="0dp"
    android:bottomRightRadius="20dp"
    android:topLeftRadius="0dp"
    android:topRightRadius="20dp" />

</shape>

I am using fragments in the application. The Benter code hereutton which uses this drawable displays the expected behavior in tablet, but when viewed in a phone, the display changes. These are the screenshots of tablet and phone:

enter image description here enter image description here

As can be seen, in the tablet view, Buttons are rounded from topright and bottomright, but not from topleft and bottomleft (which is what I want). However in phone, the topright and bottomleft are rounded. Am I missing something ?

Rajat
  • 1,449
  • 5
  • 20
  • 33

0 Answers0