一、定义控件布局
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android=“http://schemas.android.com/apk/res/android”
android:layout_width=“match_parent”
android:layout_height=“match_parent”
android:background="#f2f2f2"
android:orientation=“vertical”
android:padding=“5dp” >
<LinearLayout
android:id="@+id/layout"
android:layout_width=“match_parent”
android:layout_height=“wrap_content”
android:layout_margin=“5dp”
android:background="#cbcbcb"
android:orientation=“vertical”
android:padding=“0.2px” >
<RelativeLayout
android:layout_width=“wrap_content”
android:layout_height=“42dp” >
<TextView
android:id="@+id/tv_value"
android:layout_width=“match_parent”
android:layout_height=“match_parent”
android:layout_centerVertical=“true”
android:layout_marginRight=“50dp”
android:background="#fff"
android:ellipsize=“end”
android:gravity=“