I have a TextView and I'd like to add border with different colors along its top and bottom edges. I know that inorder to add a border of one color along all edges we can simply use following code:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="#000000"/>
</shape>
</item>
<item
android:top="1dp" android:bottom="1dp">
<shape android:shape="rectangle">
<solid android:color="#ffffff"/>
</shape>
</item>
But what needs to be done if we require edges with different colors?