In Android development, when the border needs to be set, the background image is used to achieve it, and the code is as follows:

<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > <! - even the frame color value - > < item > < shape > < solid android: color = "# CCCCCC" / > < / shape > < / item > <! <item android:bottom="1dp" Android :left=" 1DP "Android :right=" 1DP" Android :top=" 1DP "> <! <shape> <solid Android :color="# FFFFFF "/> </shape> </item> </layer-list>Copy the code

In this case, adjust the bottom part according to your actual needs and control the display of the top, bottom, left and right borders.

    android:bottom="1dp"
    android:left="1dp"
    android:right="1dp"
    android:top="1dp"
Copy the code