解决方案 »

  1.   

    http://stackoverflow.com/questions/12155353/legend-and-fieldset-in-android  这个地址有案例
      

  2.   

    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent" android:layout_height="fill_parent"
        android:background="@android:color/white">    <!--  This is the main content -->
        <RelativeLayout
            android:layout_width="fill_parent" android:layout_height="fill_parent"
            android:layout_margin="15dp" android:background="@drawable/frame"
            android:orientation="vertical" android:padding="20dp">        <TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
                android:text="Main Content" android:layout_centerInParent="true" />    </RelativeLayout>    <!--  This is the title label -->
        <TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
            android:background="@android:color/white" android:padding="5dp"
            android:text="Testing"
            android:layout_marginLeft="30dp" android:textColor="@android:color/black" /></RelativeLayout>
      

  3.   

    可以用圆角背景 
    <!-- 圆角背景-->
    <shape xmlns:android="http://schemas.android.com/apk/res/android" >    <solid android:color="@color/white" />    <corners
            android:bottomLeftRadius="10dp"
            android:bottomRightRadius="10dp"
            android:topLeftRadius="10dp"
            android:topRightRadius="10dp" />
     <stroke android:width="1dp" android:color="#ffa8abad"  />  
        <!-- //或者将这段换成下面这个也可以达到效果   <corners android:radius="8dp"/> --></shape>