0

I have created a customized title. The supported xmls are

 <?xml version="1.0" encoding="UTF-8"?>
  <resources> 
    <style name="CustomWindowTitleBackground" /> 
    <style name="CustomTheme" parent="android:Theme"> 
     <item name="android:windowTitleSize">50dp</item>
     <item name="android:windowTitleBackgroundStyle">@style/CustomWindowTitleBackground
     </item>
    </style> 
 </resources>

customtitle.xml

<shape xmlns:android="http://schemas.android.com/apk/res/android" >

<gradient
    android:angle="90"
    android:endColor="@color/grey7"
    android:startColor="@color/black" />

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

</shape>

The resultant title bar should be rounded from four corners but it is only rounded on top left and top right. How to make it rounded on all corners???

Richa Laad
  • 259
  • 5
  • 21

1 Answers1

0

you can use android:background to control the round effect: for example:

<shape xmlns:android="http://schemas.android.com/apk/res/android" >

    <gradient
        android:angle="270"
        android:startColor="@color/bar_more_main_start"
        android:endColor="@color/bar_more_main_end" />

    <corners
        android:bottomLeftRadius="6dip"
        android:bottomRightRadius="6dip"
        android:topLeftRadius="6dip"
        android:topRightRadius="6dip" />

</shape>
Lune
  • 241
  • 1
  • 3
  • 13