I try to create imageview with rounded corners.i searched and found xml code
<?xml version="1.0" encoding="utf-8"?>
<solid android:color="#00ffffff" />
<padding
android:bottom="6dp"
android:left="6dp"
android:right="6dp"
android:top="6dp" />
<corners android:radius="12dp" />
<stroke
android:width="6dp"
android:color="#ffffffff" />
and this is a my imageview xml code
<ImageView
android:id="@+id/slidemenuuserimage"
android:layout_width="90dp"
android:layout_height="90dp"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_marginBottom="16dp"
android:layout_marginLeft="14dp"
android:background="@drawable/frame" />
i have one problem.when i added background image programmatically i receive divirent result.
slidemenuuserimage=(ImageView)findViewById(R.id.slidemenuuserimage);
slidemenuuserimage.setBackgroundResource(R.drawable.myuserimg);
this is a my result
how i can add padding left or right programmatically.in my option this is a my problem if anyone knows solution please help me