1
I copied on the net this code to give an edge but do not understand why it has three items, someone help me?
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- most important is order of layers -->
<!-- Bottom right side 2dp Shadow -->
<item >
<shape android:shape="rectangle">
<solid android:color="#363636" />
</shape>
</item>
<!-- Bottom 2dp Shadow -->
<item>
<shape android:shape="rectangle">
<solid android:color="#363636" />
</shape>
</item>
<!-- White Top color -->
<item android:bottom="3dp" android:right="3dp" android:top="3dp" android:left="3dp" >
<shape android:shape="rectangle">
<solid android:color="#FFFFFF" />
</shape>
</item>
</layer-list>
It seems that on android there is no concept of border. So they suggested to Voce create rectangles to have the same effect. It seems that the border also has different colors and they ended up creating 1 rectangle for each color.
– Bruno Costa
@ramaral Voce left a repeated item unintentionally
– Bruno Costa
@Brunocosta was no mistake. xml was not properly formatted, so only two appeared. What drew my attention to this was the AP mention 3 items and only appear 2.
– ramaral
@right ramaral I will erase.
– Aline