Android development, encountered the need to set the border of the scene, using the background map to achieve, the code is as follows:
<layer-list xmlns:android= "Http://schemas.android.com/apk/res/android" > <!--box color values-- < item> <shape> <solid android:color= "#CCCCCC"/> </shape> </item> <!--body background color values-- <item android:bottom= "1DP" android:left= "1DP" android:right= "1DP" android:top= "1DP" > <!--border with white background color--- < shape> <solid android:color= "#ffffff"/> </shape> </item></layer-list>
Here, depending on what you need to actually adjust the following section, control displays the upper and lower left and right borders.
Android:bottom= "1DP" android:left= "1DP" android:right= "1DP" android:top= "1DP"
Android development, using the background map (XML drawable) to set the border for the view