0

I have to use this code image is show but radius is not apply.

<?xml version="1.0" encoding="utf-8"?>
 <layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
  <item android:drawable="@drawable/icon_image">
    <shape android:shape="rectangle" android:padding="10dp">
      <corners
        android:bottomRightRadius="5dp"
        android:bottomLeftRadius="5dp"
        android:topLeftRadius="5dp"
        android:topRightRadius="5dp"/>
   </shape>
 </item>
</layer-list>
Harshadcse
  • 225
  • 1
  • 9
  • @pskink rounded corner not apply like this [link](http://www.google.co.in/imgres?imgurl=http%3A%2F%2F1.bp.blogspot.com%2F-s1aUZokppoc%2FT1oo5gmmyKI%2FAAAAAAAABtA%2Fyf9aPYpIuzM%2Fs1600%2Fdevice-2012-03-09-235829.png&imgrefurl=http%3A%2F%2Fblog.gunawan.me%2F&h=800&w=480&tbnid=6qiOy_cw1OJGsM%3A&zoom=1&docid=eLe59bJDgyPxIM&ei=xzjBU-afH9DHuATfgoCIAw&tbm=isch&client=firefox-a&ved=0CAgQMygAMAA4rAI&iact=rc&uact=3&dur=385&page=8&start=266&ndsp=38) – Harshadcse Jul 12 '14 at 13:47

1 Answers1

0

As I see from here you can't use android:padding="10dp" in shape item. Also please see this answers: Android ImageView with Rounded Corners not working
How to make an ImageView with rounded corners? I am not sure will you be able to make a rounded rectangle in xml with custom image. I saw result with inheriting from ImageView.

Community
  • 1
  • 1
Mike
  • 2,547
  • 3
  • 16
  • 30
  • thanks for reply.. Remove this **** line above code working rounded corner. but i want to this type of view like [link](https://c3409409.ssl.cf0.rackcdn.com/xamarin.vanillaforums.com/FileUpload/22/b8ee5d9a058a41bf7dbd6a22f31f62.png). – Harshadcse Jul 12 '14 at 13:53