android - ImageView radius with background -


i have imageview has background. need set border-radius imageview. use below code in xml file , set android:src doesn't work when set background.

<shape xmlns:android="http://schemas.android.com/apk/res/android" > <corners android:radius="10dp"/> </shape> 

how can set background , radius @ same time ?

you can set background border-radius xml.

<shape xmlns:android="http://schemas.android.com/apk/res/android" >    <corners android:radius="10dp"/>    <!-- background -->    <solid android:color="@android:color/white" /> </shape> 

Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -