四周边框:
textView:
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="带边框的文本"
android:background="@drawable/bg_border"/>
res--drawable--bg_border:
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#ffffff"/>
<stroke android:width="1dip" android:color="#4fa5d5"/>
</shape>
上下边框:
<LinearLayout
android:id="@+id/linearLayoutUp1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/colorLine"/>
<TextView
android:id="@+id/et_left"
android:layout_width="90dp"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:background="@color/colorEditText"
android:paddingBottom="10dp"
android:paddingLeft="10dp"
android:paddingTop="10dp"
android:text="@string/payment_txt"/>
<pre name="code" class="html"> <View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/colorLine"/>
</LinearLayout>