<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context="com.toby.personal.datatypeconverttest.MainActivity"
android:orientation="vertical">
<!--带边框的文本-->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/test"
android:textSize="24pt"
android:background="@drawable/bg_border" />
<!--圆角边框、渐变背景的文本-->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/ellipsize"
android:background="@drawable/bg_border_radius" />
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#0000" />
<stroke
android:width="1sp"
android:color="#f00" />
</shape>