直接上代码
layout代码:
<LinearLayout android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="match_parent"> <RelativeLayout android:onClick="iv_1" android:layout_gravity="center" android:layout_weight="4" android:layout_width="0dp" android:layout_height="match_parent"> <ImageView