Make View with rounded corners

suggest change

Create drawable file named with custom_rectangle.xml in drawable folder:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle" >

    <solid android:color="@android:color/white" />

    <corners android:radius="10dip" />

    <stroke
        android:width="1dp"
        android:color="@android:color/white" />

</shape>

Now apply rectangle background on View:

mView.setBackGround(R.drawlable.custom_rectangle);

Reference screenshot:

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents