Skip to main content

Linear Layout with border

Save this xml with name border.xml and add as a background for the linear layout.... 


<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <stroke android:width="4dp" android:color="#FF00FF00" />
    <solid android:color="#ffffff" />
    <padding android:left="7dp" android:top="7dp"
            android:right="7dp" android:bottom="7dp" />
    <corners android:radius="4dp" />
</shape>

Comments

  1. Hi I'm new to android. Could you please tell me that how to add this linear layout border dynamically without resource file.

    ReplyDelete

Post a Comment