Skip to content

Instantly share code, notes, and snippets.

@rajankur
Forked from Antarix/layout_border_bottom
Created June 22, 2017 07:30
Show Gist options
  • Save rajankur/88d4f812c1e4dd0920d9bfa68c7566fb to your computer and use it in GitHub Desktop.
Save rajankur/88d4f812c1e4dd0920d9bfa68c7566fb to your computer and use it in GitHub Desktop.
Setting specific border i.e top,bottom,left,right or all for Android layout
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<shape
android:shape="rectangle">
<!-- Set the border color of your layout here -->
<stroke android:width="1dp" android:color="#3AFB03" />
<solid android:color="#3AFB03" />
</shape>
</item>
<!-- This is for border bottom but
you can change this according to your need -->
<item android:bottom="4dp" >
<shape
android:shape="rectangle">
<!-- Set the background color of your layout here -->
<stroke android:width="1dp" android:color="#000000" />
<solid android:color="#000000" />
</shape>
</item>
</layer-list>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment