You can create your own drawable to achieve this.
The code for your Border.xml
<?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="@android:color/darker_gray" />
<corners android:radius="5dp"/>
</shape>
</item>
<item android:right="1dp" android:left="1dp" android:bottom="2dp">
<shape
android:shape="rectangle">
<solid android:color="@android:color/white"/>
<corners android:radius="5dp"/>
</shape>
</item>
</layer-list>
Implement this in your layout by using android:background="@drawable/border"
.
Android also has some options.
android:background="@android:drawable/dialog_frame"
You could also use websites like http://inloop.github.io/shadow4android/ to achieve it. Here is tutorial for 9Patch: http://radleymarx.com/blog/simple-guide-to-9-patch/
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…