实现如图白色方框所示效果。白色方框为一个自定义的RelativeLayout,里面包含一个TextView和一个ImageView图片。
1、XML定义
<RelativeLayout
android:id="@+id/layout_main_Object"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="14dp"
android:background="@drawable/preference_single_item"
android:clickable="true"
android:gravity="center_vertical" >
<TextView
android:layout_width="wrap_content"