Tuesday 29 May 2012

Set Round Corner Layout in android Using Shape xml

1) create Drawable xml (Shape type) in res folder :-
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
   
    <corners android:radius="10dp" />
    <solid android:color="#CCFFFFFF"/>

</shape>

2) Now set this to layout background :-
             layout.setBackgroundResource(R.drawable.shape);

No comments:

Post a Comment